6

I've just installed postfix on my ubuntu server and am trying to debug why outgoing mails are not being sent. This led me to notice that the /var/log/mail.log file is missing. For that matter, there's nothing named mail* in my /var/log. I've tried the following to no avail:

  • Create a mail.log and change owner+group to postfix
  • Restart postfix and rsyslog
  • Delete the dummy log and restart the services, then send a mail
  • sudo apt-get remove rsyslog / sudo apt-get install rsyslog

Running postconf syslog_facility returns syslog_facility = mail

Any other ideas?

4
  • 2
    You'll want to check the syslog configuration file to find out where the mail facility is configured to log to. I don't know if your version of ubuntu uses syslog or syslog-ng - but either way, there should be a configuration file for it. "mail" in this case is the syslog facility (sort of like a type) that postfix is using.
    – malcolmpdx
    Nov 24, 2015 at 4:03
  • He/she uses rsyslog, as stated. In all Ubuntu versions I know, default configuration includes mail.log and mail.err files. @tys, the simplest way can be to remove the entire rsyslog package with all its config files and reinstall it to reget defaults, then you can put your customizations in /etc/rsyslog.d/ again (if you have any). Nov 24, 2015 at 6:31
  • yes i also tried that before. i'll update the question.
    – ystan-
    Nov 24, 2015 at 6:56
  • 1
    I've voted to close this question as a duplicate of the one where the poster found the answer. This will increase the likelihood of other people with the same problem finding that question and answer.
    – Jenny D
    Nov 25, 2015 at 16:28

1 Answer 1

17

Apparently, this was a permission issue for some strange reason. I tried the answers from this post below that sorted the issue.

Ubuntu 14.04 System Logging

sudo chown syslog:adm /var/log
sudo chmod 0775 /var/log

sudo service rsyslog restart
sudo service postfix restart

Not sure why the /var/log was locked to root when I've always been on Ubuntu 14.04 and not upgraded fom 12 where root would be default.

1
  • 1
    This worked in Ubuntu16 also, YOU'RE THE ONE!!!!!
    – mzalazar
    Dec 8, 2018 at 16:20

Not the answer you're looking for? Browse other questions tagged .