You are not logged in.
I have set up a small server at home running arch and was wandering what my options are to be able to send email from it.
What I'm looking for is only to be able to send email, not to receive anything. I'll be using it to send notifications to my "real" email address (on the internet that is) from e.g. crontasks that have finished, maybe fail2ban etc.
I've been looking at the wiki and have seen postifx but it seems to be too much. For me it would be enough if I could send email via the command line and use an external smtp server. Or if it's not too much trouble to set up an outgoing-mail-only server....
Well, I don't really know where to go from here. Any ideas what I should set up?
Offline
Have a look here.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Apart from ssmtp, there's also msmtp and nbsmtp, with more-less the same functionality. I prefer nbsmtp, since I needed a bit more than ssmtp and msmtp had a ssl bug.
Offline
I'd vote for msmtp. It's very easy to setup and support multiple accounts
Offline
Thanks alot for the suggestions. I've set up msmtp and I can now send notifications from my server
There is however a small problem. The mails that are sent doesn't contain "date" or "from" info wich makes the mail look quit weird when they arrive in my inbox. Am I missing something on my connfig file?
defaults
account default
host my.host.com
port 26
from root
auth on
user my@address.com
password ******
tls on
tls_certcheck off
logfile /var/log/msmtp
Offline
I think it's better to send mails from Mutt or you've to format
your mails properly (put in the Date: and From: fields)
Offline
I use msmtp, and like its featureset. But one thing it doesn't handle is local mail, i.e., mail addressed to just a user on the local machine rather than an email address. So why would want to do that on a server? you ask. Well, the cron implementations I'm using (dcron from Arch's core repo, and anacron) will only send cron output to local users. (I forget atm whether this limitation is in both of them or only one.) So it was a bit tricky getting them to mail my cron output with msmtp.
Possible fixes:
* switch to a heavier cron implementation (this assumes the problem was only with dcron, don't remember if that's true)
* switch to a heavier mail sending agent, such as esmtp, which does handle mail to local users. You can then configure it to forward all such mail to whatever email address you like. esmtp is heavier than msmtp but still not obese, and not hard to configure.
* (what I did) patch anacron and/or dcron to make them understand who's boss around here
Offline
Option 4: Pipe cronjob output to a mailer script
Offline
Yeah, that too.
Offline