On 26 Jan 1998, Douglas Bates wrote: > Would qmail be a better alternative as a MTA? If it can resolve > aliases faster it would certainly help. I would prefer not to install > sendmail unless absolutely necessary. My memories of trying to > configure sendmail are not pleasant memories.
lots of people think sendmail is difficult to configure, and yes that used to be true with the old "edit sendmail.cf and get hopelessly confused" style configuration, but it isn't with the new m4 configuration and it is far from true with the sendmailconfig script written for the debian sendmail package by Robert Leslie (and improved by Johnie Ingram and others) it is nowhere near as difficult as many people think it is. here's a transcript of exactly how difficult it is to configure sendmail on a debian box. It takes about a minute (longer if you haven't run it before and have to read the help text). 99% of the configuration is as easy as hitting enter to accept the defaults (because, like most things in debian, the defaults are remarkably sane). anyway, here's the transcript: (the only editing i have done on this is remove the ^M characters at the end of each line which are logged by the script command) --- cut here --- Script started on Tue Jan 27 21:59:25 1998 [EMAIL PROTECTED] [21:59:25] mail# sendmailconfig Sendmail Configuration ---------------------- By answering the following questions, you can configure sendmail for your system. Default values are determined either by your existing configuration or from common usage. Press [ENTER] Mail Name --------- Your `mail name' is the hostname portion of the address to be shown on outgoing news and mail messages (following the username and @ sign). This name will be used by other programs besides sendmail; it should be the single, full domain name (FQDN) from which mail will appear to originate. Mail name? [taz.net.au] Null Client ----------- A special configuration known as the "null client" can be created for this host if all mail should be forwarded to a central hub via a local SMTP-based network. This may be a suitable configuration if you want to forward all of your mail to your local Internet service provider (ISP) for delivery. To enable this option, give the name of the host to which all mail should be forwarded. Otherwise leave the option empty or answer `NONE' to disable it. Null client forward host? [] Address Canonification ---------------------- Usually sendmail will canonify all addresses by consulting a name server and resolving hosts to their fully qualified domain name (FQDN). Under special circumstances you may want to disable this feature, for example if this machine acts only as a mail gateway. Disable address canonification? [N] SMTP Mailer ----------- If you plan to exchange mail with other computers, you should enable the SMTP mailer. Even if you don't plan to exchange mail with other computers, it is still a good idea to enable this so local programs can use it. Enable the SMTP mailer? [Y] Masquerade Envelope ------------------- If you want mail envelopes (as well as mail headers) to appear to come from `taz.net.au', you can enable this option. Masquerade envelopes? [Y] All Masquerade -------------- If enabled, this feature will cause recipient addresses to also appear to come from `taz.net.au'. Normally they get the local hostname. Although this may be right for ordinary users, it can break local aliases. For example, if you send to "localalias", the originating sendmail will find that alias and send to all members, but send the message with "To: [EMAIL PROTECTED]". Since that alias likely does not exist, replies will fail. Use this feature ONLY if you can guarantee that the ENTIRE namespace of `taz.net.au' supersets all the local entries. If in doubt, it is safe to leave this option disabled. All masquerade? [N] Always Add Domain ----------------- If enabled, the local host domain is included even on locally delivered mail. Normally it is not added unless it is already present. Always add domain? [N] Mail Acceptance --------------- Sendmail is usually configured to accept mail for your mail name (taz.net.au). However, under special circumstances you may not wish sendmail to do this, particularly if (and disabling this option generally requires that) mail for `taz.net.au' is MXed to another host. If in doubt, it is safe to leave this option enabled. Accept mail for `taz.net.au'? [Y] Alternate Names --------------- In addition to the canonical mail name `taz.net.au', you can add any number of additional alternate names to recognize for receiving mail. If other hosts are MXed to you for local mail, this is where you should list them. This list is saved into the file /etc/mail/sendmail.cw so it can be changed later as needed. To answer this question, separate each alternate name with a space, or answer `NONE' to eliminate all alternate names. Alternate names? [siva.taz.net.au] Trusted Users ------------- Sendmail allows a special group of users to set their envelope "From" address using the -f option without generating a warning message. If you have software such as Majordomo installed, you will want to include the usernames from such software here. Note that "root", "daemon", and "uucp" are included automatically and do not need to be specified. This list is saved into the file /etc/mail/sendmail.ct so it can be changed later as needed. To answer this question, separate each username with a space, or answer `NONE' to eliminate all usernames. Trusted users? [list] majordom Redirect Feature ---------------- If enabled, this feature will allow you to alias old names to <new-address>.REDIRECT, causing sendmail to return mail to the sender with an error but indicating the recipient's new address. Enable redirect option? [N] UUCP Addresses -------------- Sendmail can be configured to be smart about UUCP addresses, or it can do nothing special with UUCP addresses at all. If you care about UUCP, you will need to do some additional configuration, perhaps outside of this script. Enable UUCP addressing? [N] Sticky Host ----------- If enabled, mail sent to [EMAIL PROTECTED]' is marked as "sticky" -- that is, the local addresses aren't matched against UDB and don't go through ruleset 5. This is used if you want a setup where `user' is not necessarily the same as [EMAIL PROTECTED]', e.g., to make a distinct domain-wide namespace. If in doubt, it is safe to leave this option disabled. Enable sticky host option? [N] DNS --- If you are directly connected to the Internet and have access to a domain name server, you should enable this option. Enable DNS? [Y] Best MX is Local ---------------- If enabled, this option will cause sendmail to accept mail as though locally addressed for any host that lists this machine as the best possible MX record. This generates additional DNS traffic, but should be OK for low-to-medium traffic hosts. N.B.: This feature is fundamentally incompatible with wildcard MX records. If you have a wildcard MX record that matches your domain, you cannot use this feature. Assume best MX is local? [N] Mailertable ----------- If enabled, this option causes sendmail to read mail routing rules from the text file /etc/mail/mailertable. This is needed for unusual mailers like ifmail and fax programs. More information is in /usr/doc/sendmail/op.txt.gz. Enable the mailertable feature? [N] Sendmail Restricted Shell ------------------------- If enabled, this option causes sendmail to use the sendmail restricted shell program (smrsh) instead of /bin/sh for mailing to programs. This improves your ability to control what gets run via email; only those programs which appear in a special directory can be run. If you enable this option, please carefully read the smrsh(8) man page for further information. Use the Sendmail Restricted Shell (smrsh)? [N] Mailer Name ----------- You can change the name used for internally generated outgoing messages. Usually this is `MAILER-DAEMON' but it would not be unreasonable to change it to something such as `postmaster'. Mailer name? [MAILER-DAEMON] Me Too ------ Sendmail normally excludes the sender address from group expansion. Enabling this option will cause the sender to be included. Enable me too option? [N] Message Timeouts ---------------- Sendmail will issue a warning message to the sender if it can't deliver a message within a reasonable amount of time. It will also send a failure notification and give up trying to deliver the message if it can't deliver it after an unreasonable amount of time. You can configure the message timeouts after which warning and failure notifications are sent. Sendmail's defaults are 4 hours and 5 days (4h/5d), respectively, but many people feel warnings after only 4 hours are premature. Message timeouts? [4h/5d] 8h/3d Configuration Complete ---------------------- Advanced configuration, such as alternate mailers, the use of mailertables, Bitnet domains, and UUCP domains can be accomplished by manually editing the /etc/mail/sendmail.mc configuration file and rerunning `/usr/sbin/sendmailconfig' to generate the appropriate /etc/mail/sendmail.cf file. (Local changes made at the end of /etc/mail/sendmail.mc will be preserved by `/usr/sbin/sendmailconfig'.) The m4 library files for sendmail configuration are kept in the /usr/lib/sendmail.cf directory. You may wish to review the documentation in /usr/doc/sendmail to assist in further customization. You may wish to customize your alias database; see the aliases(5) man page for information on the format and use of the /etc/aliases file. Generating /etc/mail/sendmail.cf from /etc/mail/sendmail.mc ... Updating alias database ... /etc/aliases: 37 aliases, longest 41 bytes, 609 bytes total Reload the running sendmail now with the new configuration? [Y] Reloading sendmail ... [EMAIL PROTECTED] [22:01:28] mail# exit exit Script done on Tue Jan 27 22:01:29 1998 --- cut here --- you can edit /etc/mail/sendmail.mc directly too if you ever want to. here's my real sendmail.mc (which is customised from the one generated by sendmailconfig a long time ago). sendmailconfig converts this file into /etc/sendmail.cf using m4 and the set of sendmail m4 macros in /usr/lib/sendmail.cf the anti-spam hacks are by Claus Assman, and are included with the latest debian sendmail package. --- cut here --- divert(-1) # This file is used to configure sendmail for use with Debian systems. divert(0) VERSIONID(`@(#)sendmail.mc 8.7 (Linux) 3/5/96') OSTYPE(debian)dnl FEATURE(use_cw_file)dnl FEATURE(use_ct_file)dnl FEATURE(redirect)dnl FEATURE(nouucp)dnl FEATURE(local_procmail,`/usr/bin/procmail')dnl define(`confMAILER_NAME', `postmaster')dnl define(`confME_TOO', True)dnl define(`confTO_QUEUEWARN', `8h')dnl MAILER(local)dnl MAILER(smtp)dnl MASQUERADE_AS(taz.net.au)dnl EXPOSED_USER(root)dnl ## Custom configurations below (will be preserved) define(`confPRIVACY_FLAGS', `authwarnings,noexpn')dnl # dont accept junkmail define(`_IP_LOOKUP_',1)dnl define(`_DNSVALID_',1)dnl define(`_MAPS_RBL_',`1')dnl HACK(check_mail2,`hash /etc/mail/junk')dnl # don't relay HACK(use_ip)dnl HACK(use_relayto)dnl HACK(check_rcpt5,`hash [EMAIL PROTECTED] /etc/mail/allow')dnl --- cut here --- craig -- craig sanders -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .