I cannot sent mail by using Postfix (SMTP) on Ubuntu Server 11.04. So, there must be some errors, But where to see the error message?
3 Answers
Have you already stumbled upon this comprehensive Postfix Debugging Howto? There's the following notice concerning logging:
Postfix logs all failed and successful deliveries to a logfile. The file is usually called
/var/log/maillog
or/var/log/mail
; the exact pathname is defined in the/etc/syslog.conf
file.
(syslog.conf
specifies where the mail
-facility logs get written to, it's rather self-explaining when you look at it.)
-
-
-
1/var/log/mail.err this is it! Are all unix log file puted in this /var/log dir? Is it a 'must be'? Oct 27, 2011 at 15:23
-
For system logs this is mostly true, possibly varying for different distributions (and of course user-space programs, e.g.
~/.xsession-errors
on some distributions).– sr_Oct 27, 2011 at 18:12 -
On ubuntu, the syslogger is rsyslog. The configuration file is /etc/rsyslog.conf and in the /etc/rsyslog.d/ directory. In your case, /etc/rsyslog.d/50-default.conf say 'mail.* -/var/log/mail.log' and 'mail.err /var/log/mail.err'– DomJun 22, 2012 at 9:44
log files for postfix can be
/var/log/mail.log
/var/log/mail.err
/var/log/mail.info
and also you can grep logs for /var/log/syslog
file.
-
I found mine in
/usr/local/psa/var/log/maillog
, of all places. (CentOS server managed by Plesk.)– TRiGApr 29, 2014 at 10:50
I was not able to locate logs anywhere and I was running Ubuntu 20.04 LTS, turns out this was a permission issue for some strange reason. the problem was with the syslog permission. The following helped me to resolve it:
sudo chown syslog:adm /var/log
sudo chmod 0775 /var/log
sudo service rsyslog restart
sudo service postfix restart