Re: sendmail problem?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ed Skinner
Date:  
To: plug-discuss
Subject: Re: sendmail problem?
Well, for those who might be reading this thread, here's a little more
dope.

1) KMail (nice GUI mail sending and receiving program) bypasses most of what 
you'll read about as far as handling the sending and receiving of Email on 
Linux, especially if, like me, your Email is hosted (stored) elsewhere and 
you use POP or IMAP to retrieve it with KMail from one or more mail servers. 
For example, I have KMail configured to retrieve Email from Email accounts at 
QWest for the flat5.net domain they host for me, and also at ghs.com (who 
gives me a regular paycheck :-), and at yet another web-hosting service for 
the rytetyme.com domain (that I own but which is otherwise dormant). For most 
of my Email, these services and KMail get alone just fine.
2) If you want to use the ancient "mail" program at a shell level to send 
Email with, for example, the results of a nightly backup script running off a 
cron timer (as is my case), then you'll need to get sendmail (or some other 
MTA [Mail Transport Agent] such as postfix or exim) working, and in a very 
specific way using "masquerading". It's not particularly difficult, but it 
*does* have to be done correctly. Here's what I ended up with that (now) 
seems to be 100% functional (all steps done as root -- be careful!):
   A) Save your current (maybe working?) sendmail.mc file "just in case":
       cd /etc/mail
       cp sendmail.mc sendmail.mc.save
   B) Edit sendmail.mc so it has the following:
       MASQUERADE_AS('yourhostname.com')dnl
       FEATURE(`masquerade_envelope')dnl
       FEATURE(`allmasquerade')dnl
       (Put your host name and so forth where I have yourhostname.com above.)
   C) Rebuild sendmail.cf as follows:
       make sendmail.cf
   D) Restart the sendmail daemon:
       /sbin/service sendmail restart
   E) Test by sending yourself a message:
       In a shell, try:
            echo "Testing" | mail -S "testing" 
   F) Check sendmail's log for errors:
       tail /var/log/maillog
       You should see a couple of entries, all of which should say something 
like "message accepted for delivery" and "stat = (ok ...". These are being 
logged by sendmail as it reformats the outgoing message and passes it along 
to an mail relay -- sendmail is *not* configured with the name of the mail 
relay and I never did figure out exactly how sendmail *knows* who the relay 
system is. (FYI: Depending on the destination address of outgoing messages, 
sendmail may actually use different relay systems. Cool, impressive, but 
confusing.)
     Phew! That's enough learning for one day!


--
Ed Skinner, , http://www.flat5.net/

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss