• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Mail Log Files

B

bartdaniels

Guest
Hi Guys,

Quick question for yall. We are using Plesk 8.6 and are now finding that Qmail that is packaged with Plesk doesn't log anything. I mean there are no entries in /var/log/maillog nor in /usr/local/psa/var/log/maillog.

Is this a known issue or do we have a misconfigured Server?

This is the same for all our Plesk 8.6 VE's for Linux.

Cheers
Bart
 
No log entries sounds suspicous. /var/log/maillog is not used, at least not with Plesk on CentOS, but our /usr/local/psa/var/log/maillog files certainly contain quite a number of entries. Note that Courier (for POP3 and IMAP) also logs to this file.
 
Hi Breun,

Thanks for that, however we have just deployed a new CentOS 5.2 VE and this one still does not log to that file at all. No POP3 or IMAP entries.

Permissions on the /usr/local/psa/var/log/maillog as follows:

-rw-r----- 1 root root 0 Dec 4 20:00 maillog
-rw-r----- 1 root root 0 Dec 5 04:05 maillog.processed
-rw-r--r-- 1 root root 0 Dec 8 04:06 smtp_pendings.log
-rw-r--r-- 1 root root 0 Dec 8 04:02 xferlog

Is there an option within Plesk we are missing and needs to be enabled?
Also our message log is the same, blank.

Cheers
Bart
 
AFAIK there is no configuration in Plesk for this. It should just work. Have you checked /etc/syslog.conf? It should contain this for mail logging:

# Log all the mail messages in one place.
mail.* -/usr/local/psa/var/log/maillog
 
Hi,

Thanks again for the reply. Yeh that is in the /etc/syslog.conf. It must be something with the Template we are deploying. If i do a basic install of CentOS 5.2 and then install Plesk Manually the Mail logs fine.

Grr...just annoying.


Cheers
Bart
 
Check if syslog is running
# service syslog status

if it is running then check

#lsof -p`pidof syslogd`
It will show all the files associate with syslog and show path of maillog.
 
Check if syslog is running
# service syslog status

if it is running then check

#lsof -p`pidof syslogd`
It will show all the files associate with syslog and show path of maillog.


Thanks bk4linux, i cannot beleive i over looked that. However on our system it is 'rsyslog'. Once started all is logging fine now.

Thanks for that.
 
On my Plesk 8.6 ez-template installation of CentOS 5 on Virtuozzo I have it as rsyslogd and it was stopped. Running service rsyslogd start began logging mail again. But what a different command other than syslogd? Even restarting the VE didn't solve this.
 
Empty maillog

Other causes can be present for the maillog to be empty. A list of causes and resolution thereof.

Remark: the list is validated for a Plesk 9.2.2 / OpenSuse 11.1 install.

Note: should also apply for previous versions of Plesk
Note: in other distributions of linux: replace <syslog-ng> by the corresponding syslog program/names. You can find information (name/pid etc) about the corresponding syslog program with the command: ps aux | grep syslog*

A - syslog-ng.conf not proper

Cause: The configuration file does not contain a line for combined output of maillogs into the file /usr/local/psa/var/log/maillog.

Solution:
1) Find the lines containing the mail logs in /etc/syslog-ng/syslog-ng.conf and change to:

# Mail-messages in separate files:
#
destination mailinfo { file("/var/log/mail.info"); };
log { source(src); filter(f_mailinfo); destination(mailinfo); };

destination mailwarn { file("/var/log/mail.warn"); };
log { source(src); filter(f_mailwarn); destination(mailwarn); };

destination mailerr { file("/var/log/mail.err" fsync(yes)); };
log { source(src); filter(f_mailerr); destination(mailerr); };

#
# and also all in one file:
#
destination mail { file("/usr/local/psa/var/log/maillog"); };
log { source(src); filter(f_mail); destination(mail); };

NOTE: you can leave the first lines out, if you want to prevent double logging

2) restart service with command: service syslog restart

B - AppArmor installed

In a lot of linux installs, AppArmor is activated. That should not be a problem.

Cause: AppArmor profile for /sbin/syslog-ng is not properly configured

Solution:
1) go to /etc/apparmor.d
2) open sbin.syslog-ng (use command: vi sbin.syslog-ng)
3) change the line
@{CHROOT_BASE} = ,
to
@{CHROOT_BASE} = /,
and save
4) restart apparmor with the command: rcapparmor restart

Everything should be fine now and (after some seconds) your file /usr/local/psa/var/log/maillog is filled
 
For problems with QMail logging on Plesk running on CentOS:

Check owner and gowner of maillog, must belong to root (like maillog.processed.gz);
Restart QMail ou plesk service with /etc/init.d/psa stop and /etc/init.d/psa start;
Check if QMail starts logging;
If not, check /etc/rsyslog.conf for the following entry:
# Log all the mail messages in one place.
mail.* -/usr/local/psa/var/log/maillog

Restart rsyslog (/etc/init.d/rsyslog stop and start) and restart QMail or plesk.

QMail will start logging.

This normally happens when maillog file is changed or deleted by anyone else than the service itself.
 
Back
Top