12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

376CHAPTER 18Setting Up an Email Server with SendmailTrying 127.0.0.1...Connected to localhost.localdomain (127.0.0.1).Escape character is ‘^]’.+OK Dovecot ready.Also, test the protocols from an email client. If imaps or pop3s is enabled, the client willask you to accept the SSL certificate before prompting for a password.CAUTIONIf the /etc/dovecot.conf file is modified while the service is running, be sure toenable the changes with the service dovecot reload command as root.Logging Sendmail ConnectionsSendmail uses the syslog facility to write log entries to the /var/log/maillog file. Eachentry includes information such as the recipient of the email, when it was sent, and thedelivery status. For example:maillog:May 23 22:46:27 examplehostname sendmail[29858]: k4O2kMUr029858:to=tfox@linuxheadquarters.com, ctladdr=tfox (501/501), delay=00:00:05,xdelay=00:00:05, mailer=relay, pri=42830, relay=[127.0.0.1] [127.0.0.1],dsn=2.0.0, stat=Sent (k4O2kMrC029859 Message accepted for delivery)Because the syslog facility is used, the log file is rotated periodically, and the previous fivelog files are kept. The old log files are named maillog.X, where X is a number. The largerthe number, the older the log file.The log level can be set in sendmail.mc and defaults to level 9. Levels under 10 areconsidered useful, levels 11–64 are verbose, and levels above 64 are for debugging. Furtherexplanation on the commonly used log levels can be found in /usr/share/doc/sendmail/doc/op/op.ps.Remember to enable the changes with the service sendmail reloadcommand if you modify the log level.Basic statistics are also recorded for Sendmail in the /var/log/mail/statistics file. Thefile is not stored in plain text, so the mailstats utility must be used to read it. As root,execute the mailstats command to display the Sendmail stats. By default, it reads thestatistics from the /var/log/mail/statistics file (or whatever file is specified forStatusFile in sendmail.mc). To specify a different file, use the mailstats -f command, where is the alternate file name and location. Listing 18.2 showssample output.LISTING 18.2Example Sendmail StatisticsStatistics from Sat Mar 25 16:04:28 2006M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis msgsqur Mailer4 1054 5467K 1004 6030K 0 0 0 esmtp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!