Table of Contents
Sendmail
http://docs.hp.com/en/B2355-90685/ch04s11.html
How Sendmail works (Badly!!) http://docs.hp.com/en/B2355-90685/ch04s04.html
Starting & Stopping
/sbin/init.d/sendmail stop
On AIX sendmail is managed by SRC and it may be necessary to specify the sendmail options when starting:
startsrc -s sendmail -a “-bd -q30m"
stopsrc -s sendmail
Test Mail Routing
/usr/lib/sendmail -bv -v -oL10 address [address...]
The -bv (verify mode) option causes sendmail to verify addresses without collecting or sending a message.
The -v (verbose) flag causes sendmail to report alias expansion and duplicate suppression.
The -oL10 (log level) option sets the log level to 10. At log level 10 and above, sendmail -bv reports the mailer and host to which it resolves recipient addresses.
Verify delivery
/usr/lib/sendmail -v myname@cup.hp.com
Test access with Telnet
telnet furschlugginer 25 220 furschlugginer.bftxp.edu SMTP server ready vrfy aen 250 Alfred E. Newman <aen@axolotl.bftxp.edu> vrfy blemph@morb.poot 554 blemph@morb.poot: unable to route to domain morb.poot quit 221 furschlugginer.bftxp.edu SMTP server shutting down
Logging at command line
/usr/lib/sendmail -X /var/log/sendmail.log -oL9 &
Logging Level
Log Level Behavior
0 No logging. 1 Major problems only. 2 Message collections and failed deliveries. 3 Successful deliveries. 4 Messages being queued (due to a host being down, and so on). 5 Messages being added to the queue in routine circumstances. 6 Unusual but benign incidents, such as trying to process a locked queue file. 9 Log internal queue ID to external message ID mappings. This can be useful for tracing a message as it travels between several hosts. 10 The name of the mailer used, the host (if non-local), and the user name passed to the mailer are logged. If the log level is 10 or higher, sendmail also reports this information in -bv (verify) mode. 11 For successful deliveries to IPC mailers, the MX (mail exchanger) host delivered to (if any) and the internet address used for the connection are logged. 12 All incoming and outgoing SMTP commands and their arguments are logged at LOG_INFO. 13 Log bad user shells, world-writable files, and other questionable situations. 14-98 Debugging information. This information should be interpreted by your HP service representative.
Domain name and masquarading
The SMTP gateway and HUB Servers may discard email from unknown domains. If this occurs then either specify a valid from address on the sendmail command or update the sendmail.cf to include a masquarading domain name e.g:
DMbirmingham.gov.uk
Checking if mail is on the queue
bash-3.00# sendmail -bp (or mailq) /var/spool/mqueue (1 request) ----Q-ID---- --Size-- -----Q-Time----- ------------Sender/Recipient------------ n5BDeEvP786590 314 Thu Jun 11 14:40 dmadmin (Deferred: Name server: mailhub.brm.pri: host name lookup fail) planning_business_support@birmingham.g Total requests: 1
Flush queue
bash-3.00# sendmail -q -vvv Running /var/spool/mqueue/n5BFcNNS807052 (sequence 1 of 8) user@birmingham.gov.uk... Connecting to mailhub.birmingham.gov.uk. via relay... 220 10.84.0.218 ESMTP Service (Lotus Domino Release 6.5.5FP3) ready at Thu, 11 Jun 2009 16:42:56 +0100 >>> EHLO dmcsp.unix.brm.pri 250-10.84.0.218 Hello dmcsp.unix.brm.pri ([10.84.0.146]), pleased to meet you 250-HELP 250-SIZE 250 PIPELINING >>> MAIL From:<root@dmcsp.unix.brm.pri> SIZE=325 250 root@dmcsp.unix.brm.pri... Sender OK >>> RCPT To:<user@birmingham.gov.uk> >>> DATA 250 user@birmingham.gov.uk... Recipient OK 354 Enter message, end with "." on a line by itself >>> . 250 Message accepted for delivery user@birmingham.gov.uk... Sent (Message accepted for delivery)