You are not logged in.

#1 2008-10-17 12:43:03

antis
Member
From: sweden
Registered: 2007-05-18
Posts: 108

Sending mail from arch, a simple way?

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

#2 2008-10-17 13:12:02

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: Sending mail from arch, a simple way?

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

#3 2008-10-17 13:15:59

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Sending mail from arch, a simple way?

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

#4 2008-10-17 16:48:32

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Sending mail from arch, a simple way?

I'd vote for msmtp. It's very easy to setup and support multiple accounts

Offline

#5 2008-10-18 07:59:33

antis
Member
From: sweden
Registered: 2007-05-18
Posts: 108

Re: Sending mail from arch, a simple way?

Thanks alot for the suggestions. I've set up msmtp and I can now send notifications from my server smile
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

#6 2008-10-18 12:25:02

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

Re: Sending mail from arch, a simple way?

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

#7 2008-10-21 11:44:58

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Sending mail from arch, a simple way?

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

#8 2008-10-21 14:42:10

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Sending mail from arch, a simple way?

Option 4: Pipe cronjob output to a mailer script

Offline

#9 2008-10-23 02:22:46

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Sending mail from arch, a simple way?

Yeah, that too.

Offline

Board footer

Powered by FluxBB