Unable to send mail from CLI at Ubuntu 14.04

November 7, 2014 3.5k views

I've set up mail server as described here: how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassasin, but I still can't send email neither from my web-sites nor from CLI with simple echo 'This is a test' | mail -s 'test-out' me@mail.com command
I've digged a lot, but still can't find out where is the problem, any ideas?

1 comment
  • Also I noticed that dovecot status return Fatal: Error in configuration file /etc/dovecot/conf.d/10-master.conf line 91: Unknown setting: unix_listner and so dovecot isn't running I guess.
    line 91: unix_listner /var/spool/postfix/private/auth { and its in service auth { block

1 Answer

Can you check if you're able to connect to port 25 on remote servers?

nc -vz smtp.gmail.com 25

Are there any errors in your mail error log?

sudo tail /var/log/mail.err
  • Connection to smtp.gmail.com 25 port [tcp/smtp] succeeded!

    Error log file is empty (I can't understand why it doesn't write anything there)

    p.s. I deleted original log files, and then created new one with same names - I think this is the reason why postfix doesn't write any errors to log file, but I can't find out how to fix postfix logging..

  • Thank you very match. It's works for me too

Have another answer? Share your knowledge.