There are many places (see the Linux MAIL HOWTO in comp.answers or on rtfm.mit.edu for a list), but the definitive place is in the sendmail+IDA sources. Look in the directory <IDA_SRC_PATH>/ida/cf for the files DBM-GUIDE, OPTIONS, and Sendmail.mc.
Thanks go to Neil Rickert and Paul Pomes for lots of help over the years regarding the care and feeding of sendmail+IDA and to Rich Braun for doing the initial port of sendmail+IDA to Linux.
There is no “true standard configuration” of electronic mail transport and delivery agents and there is no “one true directory structure”.
Accordingly, it is necessary to ensure that all the various pieces of the system (Usenet news, mail, tcp/ip) agree on the location of the local mail delivery program (lmail, deliver, etc.), remote mail delivery program (rmail), and the mail transport program (sendmail or smail). Such assumptions are not generally documented, although use of the 'strings' command can help determine what files and directories are expected. The following are some problems we've seen in the past with some of the commonly available Linux binary distributions and sources.
Some versions of the NET-2 distribution of tcp/ip have services defined for a program called 'umail' rather than sendmail.
There are various ports of Elm and mailx that look for a delivery agent of /usr/bin/smail rather than sendmail.
Sendmail+IDA has a built-in local mailer for 'deliver', but expects it to be located in /bin rather than the more typical Linux location of /usr/bin.
Rather than go to the trouble of building all the mail clients from sources, we generally fake it with the appropriate soft links...
You set the default smart host via the RELAY_HOST and RELAY_MAILER parameters in the sendmail.m4 file that is processed into sendmail.cf.
To forward mail to a particular host or domain to a designated relay system, generally use the mailertable.
For example, to forward mail for relayhost.com to their uucp gateway system 'uucpgate'.
(in mailertable)UUCP-A,uucpgate relayhost.com
Frequently, Internet hosts will have trouble getting mail into misconfigured remote sites. There are several variants of this problem, but the general symptom is that mail is bounced by the remote system or never gets there at all.
These problems can put the local system administrator in a bad position because your users generally don't care that you don't personally administer every system worldwide (or know how to get the remote administrator to fix the problem). They just know that their mail didn't get through to the desired recipient on the other end and that you're a likely person to compain to.
A remote site's configuration is their problem, not yours. In all cases, be certain to NOT break your site in order to communicate with a misconfigured remote site. If you can't get in touch with the Postmaster at the remote site to get them to fix their configuration in a timely manner, you have two options.
It is generally possible to force mail into the remote system successfully, although since the remote system is misconfigured, replies on the remote end might not work...but then that's the remote administrator's problem.
You can fix the bad headers in the envelope on your outgoing messages only by putting a domaintable entry for their host/domain that results in the invalid information being corrected in mail originating from your site:
# (in domaintable) braindead_site.correct.domain.com braindead_site.wrong.domain.com
Treat them as totally brain-dead and strip off all hostname.domain information in the envelope of messages to them from your site.
The '!' in the following results in mail being delivered to their remote site and appearing to be locally originated (for sendmail purposes). The return address for your site will not be changed, so the proper return address will still show up in the message.
# (in mailertable) TCP!braindead_site.correct.domain.com braindead_site.wrong.domain.com
Regardless, even if you get mail into their system, there is no guarantee that they can reply to your message (they're broken, remember...) but then their users are yelling at their administrators rather than your users yelling at you.
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- Easy Watermarking with ImageMagick
- The Only Mac I Use
- Ubuntu & SUSE & CentOS, Oh My!
- New Products
- Promise Theory—What Is It?
- Integrating Trac, Jenkins and Cobbler—Customizing Linux Operating Systems for Organizational Needs
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds
- Returning Values from Bash Functions