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?
Asked
Active
Viewed 7.1k times
3 Answers
18
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/maillogor/var/log/mail; the exact pathname is defined in the/etc/syslog.conffile.
(syslog.conf specifies where the mail-facility logs get written to, it's rather self-explaining when you look at it.)
sr_
- 15,224
- 49
- 55
-
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](https://help.ubuntu.com/11.04/serverguide/C/postfix.html#postfix-logs), 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
-
1/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](http://linux.die.net/man/7/hier), 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 09:44
6
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.
jasonwryan
- 71,734
- 34
- 193
- 226
pankaj sharma
- 177
- 2
- 7
-
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
0
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
Kunal
- 1