Sendmail on your system probably has a pretty good feature set included in the default sendmail.cf. But as has been discussed, some features are often left out, such as genericstable. Usually, these features are not needed, but if they are, you must add them to your configuration file. Manually editing the sendmail.cf is generally regarded as not being an option for mere mortals like you and I (Eric Allman, the creator of Sendmail might be able to do it). However, recent versions of Sendmail provide a novel method of adding features to the sendmail.cf which uses a macro file and the m4 macro processor.
divert(-1) dnl This is the macro config file used to generate the /etc/sendmail.cf dnl file. If you modify the file you will have to regenerate the dnl /etc/sendmail.cf by running this macro config through the m4 dnl preprocessor: dnl dnl m4 /etc/sendmail.mc > /etc/sendmail.cf dnl dnl You will need to have the sendmail-cf package installed for this to dnl work. include(`/usr/lib/sendmail-cf/m4/cf.m4') define(`confDEF_USER_ID',``8:12'') OSTYPE(`linux') undefine(`UUCP_RELAY') undefine(`BITNET_RELAY') define(`confAUTO_REBUILD') define(`confTO_CONNECT', `1m') define(`confTRY_NULL_MX_LIST',true) define(`confDONT_PROBE_INTERFACES',true) define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail') FEATURE(`smrsh',`/usr/sbin/smrsh') FEATURE(`mailertable',`hash -o /etc/mail/mailertable') FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable') FEATURE(redirect) FEATURE(always_add_domain) FEATURE(use_cw_file) FEATURE(local_procmail) MAILER(procmail) MAILER(smtp) FEATURE(`access_db') FEATURE(`blacklist_recipients') dnl We strongly recommend to comment this one out if you want to protect dnl yourself from spam. However, the laptop and users on computers that do dnl not have 24x7 DNS do need this. FEATURE(`accept_unresolvable_domains') dnl FEATURE(`relay_based_on_MX')
Each line, with the exception of the dnl comment lines and the divert(-1) line, are of the form macro-type(value list). In our example, we’re going to add a new feature called genericstable. So we insert a line like this into the FEATURE list:
After saving the changed file, we will generate the new sendmail.cf (don’t forget to backup the old one to another file if you’ve already set up your Sendmail). To create a new sendmail.cf based on your .mc file, you issue the following command:
Your cf.m4 macro definition file may be in another location, if you do not use Red Hat Linux. It’s usually easy to locate this file however (it often resides somewhere in /usr/lib/sendmail-cf or /usr/share/sendmail.cf). Next we have to create a blank file for the genericstable mappings to be stored in (otherwise Webmin will complain that your configuration is wrong), and set the permissions to something Sendmail will be happy with.
Once you have added entries to the map table, Webmin will automatically generate the .db map file that Sendmail relies of for these entries, so no other effort on our part is required. Now you should be able to edit the Outgoing Addresses mappings with Webmin, and a restart of Sendmail will put them into effect.