#grep -i mail /etc/syslog.conf
# Log anything (except mail) of level info or higher.
# Log all the mail messages in one place.
mail.* ; -/var/log/maillog
severity = info,err,warn,debug
destination = /var/log/messages, /var/log/maillog
/var/log/messages will be logged other than all mail logs, i.e no maillogs will be logged to /var/log/messages and /var/log/maillog will be logged with all the mail activities.
To log the mail activities separately use the following option in /etc/syslog.conf
Ack Log for msg received in MTA:
Sep 13 09:08:36 centos sendmail: n8D58YWM006265: from=
Daily Time stamp: message came from server: Daemon: Process ID: queue ID: From Server: size of message: class: number of recipient: msg id: relay=root@localhost (who has send the message from which host)
MSG Delivery Log:
Sep 13 09:08:36 centos sendmail: n8D58YWM006265: to=
Time stamp:hostname:daemon:PID:queue ID: to=recipient:ctladdr=is the local user who sends the msg (ctladdr user ID /& Group ID):delay=is expressed the amount of time between the msg recieved and delivered:xdelay=amount of time taken to transfer the msg (from user to user or host to host):mailer=the type of the mailer used in sendmail:pri=priority:dsn= Delivery Status Notification(Email Delivery Error Codes ):status=status of msg delivery
How many times you got your outgoing emails back and wondered what is wrong with it? Every time when your email can not be delivered, the SMTP server sends you a notification, which includes a standard error message, associated with the real problem.
Each code is composed of three digits (X.X.X). The first digit gives the status of the email message:
Here is a complete list of email delivery error codes, based on the Extended SMTP (ESMTP) standards, where X can be 4 or 5, depending on the error type (Persistent Transient or Permanent):
For checking the mail log - Better to grep the queue id from maillog to check the msg status:
# grep queueid /var/log/maillog
# grep "Aug 15" /var/log/maillog