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.

Using CentOS 5 and trying to send an email from the command line (for crontab emailing attachments). mail and mutt execute without errors, but I just never receive any emails. I'm running exim as the local smtp server. My email address is a gmail account.

[root@server ~]# mail -s "hello subject" me@mygmaildomain.com < test_message.txt 
[root@server ~]# mutt -s "hello subject" me@mygmaildomain.com < test_message.txt 
[root@server ~]# 

When I ran mutt by itself, it said there was no /var/spool/mail/root. So I touched it:

[root@server ~]# touch /var/spool/mail/root

still no emails to my gmail account... What do I need to do?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Check /var/log/maillog to see what errors (if any) are present.

/var/spool/mail/root is a local mailbox i.e. for incoming mail rather than an outgoing spool.

For outgoing mail, it's contained in /var/spool/mqueue

At least, this is where sendmail and postfix have their queues on CentOS, I'm not actually sure about exim, but it should be the same.

share|improve this answer
    
Ok, so I found a /var/log/exim/panic.log (many of them actually). And it had many lines ending with "User 0 set for local_delivery transport is on the never_users list". Strange because this only yesterday started not emailing. I removed the never_users line from /etc/exim/exim.conf and now I get these, "User 0 set for local_delivery transport is on the fixed_never_users list." Figuring out how to solve that... –  apptree Dec 3 '10 at 18:35
    
Ah.. yeah.. Exim compiles in the option to never send as root. Can you send as another user? Maybe the easiest way forward is to switch to Postfix or something. Recompiling exim is probably not the way you want to go. –  Rafiq Maniar Dec 3 '10 at 18:59
    
Ok, so I got this to work by specifying an alias for root in /etc/aliases. The problem now is my SMTP provider, AuthSMTP, requires certain from addresses, so email is being rejected by them, "SMTP error from remote mail server after MAIL FROM:<root@server.localdomain> SIZE=1800: host mail.authsmtp.com [62.13.128.193]: 500 5.0.0 Envelope From Address of <root@server.localdomain> is not authorised - go to: http ://control.authsmtp.com". I need exim to go through AuthSMTP for other uses. How can I specify a from address in mutt or another command line email client that can attach files? –  apptree Dec 3 '10 at 19:05
    
I use AuthSMTP too. Use a ~/.muttrc file and specify the following: set use_from=yes set from="me@mydomain.com" set realname="My Name" (sorry, bad formatting ... not sure how to format these things in comments) –  Rafiq Maniar Dec 3 '10 at 19:43
    
I used those settings and even restarted exim, but they didn't work. Got the same error message in the /var/log/exim/main.log. The problem is that it doesn't change the MAIL FROM: header when exim talks to AuthSMTP. –  apptree Dec 3 '10 at 22:27
show 1 more comment

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.