Thứ Ba, 18 tháng 6, 2019

Plesk 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

Share This!


Không có nhận xét nào:

Đăng nhận xét