To see your Notes mail from the Internet, use https://mail.delphion.com/mail/rjasper.nsf?OpenDatabase You need to use your "Internet Password" as Lotus Notes defines it, which you can see by looking at your entry in the Delphion Address Book on the Domino server. ---------------------------------------------------------------------------- Use the mailq command to see the list of mail that's deferred, waiting to be delivered. Use sendmail -q to run through that queue and attempt to deliver. Use sendmail -q -v to see it work. ---------------------------------------------------------------------------- sendmail gets the IP address of the destination's e-mail server by finding the domain's MX records. For example, on 9-20-2005 from jasper in the Sunnyvale office, nslookup -type=MX delphion.com returned Server: su-dns01.dnt.dialog.com Address: 199.221.80.141 delphion.com preference = 20, mail exchanger = mailin-tlr.thomson.com delphion.com preference = 10, mail exchanger = mailin2-tlr.thomson.com delphion.com preference = 10, mail exchanger = mailin3-tlr.thomson.com delphion.com preference = 20, mail exchanger = mailin-tc.thomson.com delphion.com preference = 20, mail exchanger = mailin-tf.thomson.com ... and 17 more junk lines which shows delphion.com's e-mail server, at least on Dialog's internal DNS server, to be identical to the thomson.com MX records. ---------------------------------------------------------------------------- To test sendmail by hand, - first determine the destination's mail server's IP address (see above), This is usually the same as what gets returned by a host command, but not necessarily. Delphion.com for example, is 84.18.161.10 (www in EDC), but the MX record points to 5 different mailin*.thomson.com sites. - telnet to one of those IP addresses, port 25. Here's an example, (What I typed in is indented to the left) telnet mailin3-tlr.thomson.com 25 Trying... Connected to mailin3-tlr.thomson.com. Escape character is '^]'. 220 mailin3-tlr.thomson.com ESMTP Unauthorized use is prohibited; Tue, 20 Sep 2005 20:53:31 GMT helo thomson.com 250 mailin3-tlr.thomson.com Hello [163.231.10.7], pleased to meet you mail from:rick.jasper@thomson.com 250 2.1.0 rick.jasper@thomson.com... Sender ok rcpt to:rick.jasper@thomson.com 250 2.1.5 rick.jasper@thomson.com... Recipient ok data 354 Enter mail, end with "." on a line by itself This is line 1 This is line 2 This is line 3 blah, blah, blah and this is the last line, followed by a period on a line all by itself. . 250 2.0.0 j8KKrVQh024317 Message accepted for delivery quit 221 2.0.0 mailin3-tlr.thomson.com closing connection Connection closed. Putting all this together for easier cutting & pasting, telnet mailin3-tlr.thomson.com 25 helo thomson.com mail from:rick.jasper@thomson.com rcpt to:rick.jasper@thomson.com data This is line 1 This is line 2 This is line 3 blah, blah, blah and this is the last line, followed by a period on a line all by itself. . quit ---------------------------------------------------------------------------- To get this to work in Eagan, we had to "tell" sendmail that we were sending from the delphion.com domain, else we would get reject e-mail ala *********************************************************************** * --j8L071Q61970.1127261221/rhino.delphion.com * * Content-Type: message/delivery-status * * * * Reporting-MTA: dns; rhino.delphion.com * * Arrival-Date: Tue, 20 Sep 2005 17:07:00 -0700 * * * * Final-Recipient: RFC822; rick.jasper@thomson.com * * Action: failed * * Status: 5.1.8 * * Diagnostic-Code: SMTP; 553 5.1.8 ... * * Domain of sender address root@rhino.delphion.com does not exist * * Last-Attempt-Date: Tue, 20 Sep 2005 17:07:00 -0700 * * * *********************************************************************** To fix this, as root, cd /etc/mail cp -p sendmail.cf sendmail.cf.original vi sendmail.cf and add this last line after this section, # my official domain name # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM Djdelphion.com and have sendmail reread its sendmail.cf file by refresh -s sendmail This changes the "mail from: ..." line in the SMTP session, so instead of telnet mailin3-tlr.thomson.com 25 Trying... Connected to mailin3-tlr.thomson.com. Escape character is '^]'. 220 mailin3-tlr.thomson.com ESMTP Unauthorized use is prohibited; Wed, 21 Sep 2005 16:09:31 GMT helo thomson.com 250 mailin3-tlr.thomson.com Hello [163.231.10.7], pleased to meet you mail from:root@rhino.delphion.com 553 5.1.8 root@rhino.delphion.com... Domain of sender address root@rhino.delphion.com does not exist That "mail from:" line is mail from:root@delphion.com, which works ok. ---------------------------------------------------------------------------- The normal way the sendmail program is started from /etc/rc.tcpip, is startsrc -s sendmail -a '-bd -q30m' Although you could start sendmail by hand with sendmail -bd -q15m, if you do it this way, SRC doesn't know about it, so if you lssrc -s sendmail SRC will tell you that sendmail is "inoperative", although it's running. ---------------------------------------------------------------------------- To remove undeliverable mail from a system, I know of no incantation of sendmail to do it. Mail waiting to be delivered, is kept in the /var/spool/mqueue directory in two pieces. The df* file is the data and the qf* file is the delivery information. To purge a file in the mail queue, simply erase both (all) files in /var/mail/mqueue associated with that piece of mail. ---------------------------------------------------------------------------- To send an attachment via AIX's sendmail, you first need to uuencode your attachment file into a temporary file, then pipe both the normal text of your e-mail and the uuencoded attachment, to sendmail. For example, to send motd as my mail text and .kshrc file as an attachment, uuencode .kshrc .kshrc > /tmp/attachment.1 The second .kshrc will be the name of the attachment when the recipient sees it, and can be anything you'd like. cat /etc/motd /tmp/attachment.1 | mail -s"My .kshrc is Attached" rick@delphion.com rm /tmp/attachment.1 There's also a utility called mutt available from the Internet that is a replacement for sendmail that does attachements. ---------------------------------------------------------------------------- AIXCOPS is configured on eagle and on the patent server machines to run out of cron at 1:00 am on the 28th of each month. It sends mail to healthchk, which is defined in /etc/aliases as healthck: \jwong@almaden.ibm.com, \harwood@almaden.ibm.com, \jasper@almaden.ibm.com Remember to say sendmail -bi whenever you update /etc/aliases. ---------------------------------------------------------------------------- Remember to refresh -s sendmail after updating the /etc/sendmail.cf file. (In older releases of AIX, you used to have to say sendmail -bz to get the) (sendmail daemon to re-read the /etc/sendmail.cf file, but since AIX 4.2.1) (and on, this command gives the cryptic message ) ( Frozen configuration files are unsupported ) ( or Frozen configurations unsupported ) ---------------------------------------------------------------------------- One day, I needed to see how the mail command called sendmail, so I wrote this quick & dirty Rexx script to see #!/usr/bin/rexx parse arg input_args say 'The input args are >'input_args'<' count=0 do while lines() = 1 input_line = linein() count = count + 1 say 'Line' count '>'input_line'<' end Replacing /usr/sbin/sendmail with this program and calling mail like this, mail -s'test subject 1' jasper < /etc/motd resulted in this output. The input args are >-i -x jasper< Line 1 >To: jasper< Line 2 >Subject: test subject 1< Line 3 >< Line 4 >*******************************************************************************< Line 5 >* *< Line 6 >* *< Line 7 >* Welcome to AIX Version 4.3.2! *< Line 8 >* *< Line 9 >* *< Line 10 >* To control the Apache web server, use *< Line 11 >* /usr/lpp/HTTPServer/sbin/apachectl start *< Line 12 >* or /usr/lpp/HTTPServer/sbin/apachectl stop *< Line 13 >* *< Line 14 >* Config file is at /usr/lpp/HTTPServer/etc/httpd.conf *< Line 15 >* *< Line 16 >* *< Line 17 >*******************************************************************************< That told me in order to send mail by calling sendmail directly, I needed to say /usr/sbin/sendmail -i -x user@domain.com < mail_file_with_headers I needed to do this when writing my spam.rexx program. See my ~/aixnotes/rexx_examples/spam.rexx program.