On CentOS, mail or mutt never sends my emails

5,188

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:
5,188

Related videos on Youtube

Jayan Vidanapathirana
Author by

Jayan Vidanapathirana

Updated on September 17, 2022

Comments

  • Jayan Vidanapathirana
    Jayan Vidanapathirana over 1 year

    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" [email protected] < test_message.txt 
    [root@server ~]# mutt -s "hello subject" [email protected] < 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?

  • Jayan Vidanapathirana
    Jayan Vidanapathirana over 13 years
    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...
  • Rafiq Maniar
    Rafiq Maniar over 13 years
    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.
  • Jayan Vidanapathirana
    Jayan Vidanapathirana over 13 years
    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:<[email protected]> SIZE=1800: host mail.authsmtp.com [62.13.128.193]: 500 5.0.0 Envelope From Address of <[email protected]> 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?
  • Rafiq Maniar
    Rafiq Maniar over 13 years
    I use AuthSMTP too. Use a ~/.muttrc file and specify the following: set use_from=yes set from="[email protected]" set realname="My Name" (sorry, bad formatting ... not sure how to format these things in comments)
  • Jayan Vidanapathirana
    Jayan Vidanapathirana over 13 years
    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.
  • Rosco
    Rosco over 13 years
    I've added "set envelope_from=yes" to my .muttrc in addition to the parameters given by Rafiq.