Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Arch Linux doesn't have sendmail installed by default. So I get the following messages in my syslog:

Sep 15 13:16:01 zorro crond[18497]: mailing cron output for user collectors sh cronjob.sh
Sep 15 13:16:01 zorro crond[18497]: unable to exec /usr/sbin/sendmail: cron output for user collectors sh cronjob.sh to /dev/null

What is the recommended way to fix this default behaviour so actual messages are sent?

heirloom-mailx is installed and capable of sending email messages using SMTP. Is it possible for crond to use mailx to send notifications?

Is there any drop-in replacement for sendmail that sends using mailx? Sendmail is not even in the repositories.

share|improve this question

2 Answers 2

I usually use (and recommend) small relay-only mail servers like nullmailer for this case. Don't know if it's in your repos, though.

share|improve this answer

I use ssmtp for this. It just requires a small configuration file and you're good to go. It's a drop in replacement for sendmail for sending email through an smtp relay somwehere (such as the one at your isp). It works fine with cron (I use fcron) and it works fine with mailx.

It's in [extra]. My configuration is below.

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < 1000
root=myuser@example.com

# The place where the mail goes.
mailhub=relay.myisp.net

# Where will the mail seem to come from?
rewriteDomain=example.com

To test:

$ mailx -s "this is a test" root
test message body
.
EOT
share|improve this answer
    
ArchLinux improved its support for mail since the time the question was asked. There is now wiki.archlinux.org/index.php/Msmtp package and many more –  nponeccop Apr 2 '12 at 11:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.