Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 10 down vote accepted

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.)

share|improve this answer
I don't have this file, I'm using ubuntu server 11.0 – lovespring Oct 27 '11 at 14:44
No /etc/syslog.conf? Sorry, I don't know much about Ubuntu. Forget this then, how about /var/log/mail or similar? According to this, there should be a /var/log/mail.err log, I suppose. You'll find some Ubuntu-specific Postfix debugging hints on that page, too. – sr_ Oct 27 '11 at 14:51
/var/log/mail.err this is it! Are all unix log file puted in this /var/log dir? Is it a 'must be'? – lovespring Oct 27 '11 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 '11 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' – Dom Jun 22 '12 at 9:44

log files for postfix can be


and also you can grep logs for /var/log/syslog file.

share|improve this answer
I found mine in /usr/local/psa/var/log/maillog, of all places. (CentOS server managed by Plesk.) – TRiG Apr 29 '14 at 10:50

Your Answer


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.