LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Why no log record in /var/log/mail.log? (https://www.linuxquestions.org/questions/linux-server-73/why-no-log-record-in-var-log-mail-log-4175615083/)

luofeiyu 10-05-2017 02:24 AM

Why no log record in /var/log/mail.log?
 
postfix was installed on debian8.

Code:

echo "it is a test" |mail -s "to test log"  xxxx@gmail.com
The email can be received in my gmail account.
Why no log record in /var/log/mail.log?

systemctl status rsyslog
● rsyslog.service - LSB: enhanced syslogd
Loaded: loaded (/etc/init.d/rsyslog)
Active: active (exited)

linux-sys-adm 10-05-2017 10:14 AM

Sounds like mail.log was removed? If not and it's empty rename it (mv or even delete) and then try:

Code:

systemctl restart rsyslog
systemctl restart postfix


luofeiyu 10-06-2017 08:51 AM

Why only one command
Code:

systemctl restart rsyslog
can't do the job?
Why is it necessary to execute two commands
Code:

systemctl restart rsyslog
systemctl restart postfix

??


All times are GMT -5. The time now is 06:36 PM.