Outlined here are answer to some of the more common questions about sendmail's feature set. There are many more covered in the Sendmail FAQ.
1. My readme file says I need sendmail compiled with support for xxxx. How do I know what my sendmail supports?
Using the following command should show you what sendmail has been compiled with:-
$ sendmail -bt -d0.1 < /dev/null
Version 8.9.1
Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND
NETINET NETUNIX NEWDB NIS QUEUE SCANF SMTP USERDB XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = mordor
(canonical domain name) $j = mordor.altair.nexus
(subdomain name) $m = altair.nexus
(node name) $k = mordor.altair.nexus
========================================================
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
2. How do I give my users more meaningful mail names than their login ID's?
Use the aliases file to alias a mail name to a user id. The aliases files is a plain text file, which must be compiled into a database file for sendmail to read. After making any alterations, run the "newaliases" command. A sample aliases file is shown below:-
# # @(#)aliases 8.2 (Berkeley) 3/5/94 # # Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /bin/mail. # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. # # Basic system aliases -- these MUST be present. MAILER-DAEMON: postmaster postmaster: root # General redirections for pseudo accounts. bin: root daemon: root games: root ingres: root nobody: root system: root toor: root uucp: root # Well-known aliases. manager: root dumper: root operator: root # trap decode to catch security attacks decode: root # Person who should get root's mail #root: marc3. I'm using sendmail to forward all local mail to a proprietary system, like Lotus cc:Mail, MS Mail, Microsoft Exchange. How do I translate my users sensible email addresses into the horrible ones used by my proprietary system?
Sendmail provides a feature called "userdb". This allows username rewriting to occur before delivery takes place, and is a very flexible feature. Setting this up can be quite complex, and anyone considering it should read the documentation on this feature thouroughly.
4. I always log into my Linux host as God/Satan/Einstein/Carrot. I don't want the outside world to know about my little problem. What do I do?
Sendmail allows the senders username to be rewritten in headers and envelopes, by using the "genericstable" feature. As for userdb, you should read the documentation before trying to use this. In conjunction with userdb, this feature can be used to make sendmail into an SMTP gateway that translates all addresses passing through it. In this way, a proprietary system can be made to talk to the outside world.
5. Sendmail always rewrites my email address to be an invalid address. How do I find out what is happening?
You can run sendmail in ruletest mode. In this mode of operation, you can specify a series of rulesets, and an address to pass through them. Using this feature to it's full advantage requires a good understanding of sendmail rewriting rules. An example is show below:-
$ sendmail -bt -d0.1
Version 8.9.1
Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND
NETINET NETUNIX NEWDB NIS QUEUE SCANF SMTP USERDB XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = mordor
(canonical domain name) $j = mordor.altair.nexus
(subdomain name) $m = altair.nexus
(node name) $k = mordor.altair.nexus
========================================================
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 mike@coruscant.demon.co.uk
rewrite: ruleset 3 input: mike @ coruscant . demon . co . uk
rewrite: ruleset 96 input: mike < @ coruscant . demon . co . uk >
rewrite: ruleset 96 returns: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 3 returns: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 0 input: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 199 input: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 199 returns: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 98 input: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 98 returns: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 198 input: mike < @ coruscant . demon . co . uk . >
rewrite: ruleset 198 returns: $# local $: mike
rewrite: ruleset 0 returns: $# local $: mike
>
6. I've heard horror stories about sendmail and security problems. What do I do?
Sendmail is a large, monolithic program that runs as root. It offers a service that anyone, anywhere can connect to, and as such, it has often been a target for crackers. Sendmail has had many security problems in the past, and sendmail was one of the programs that Robert Morris' famous Internet Worm exploited in the early eighties. The legendary sendmail Wizard password would grant a remote user root access to a machine, and many machines left SMTP debug mode enabled.
In recent releases, sendmail has become much more secure, and many of these problems are things of the past. Nevertheless, a degree of caution is still warranted. You might wish to take the following steps:-