Editing the m4 Configuration File

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 named sendmail.mc and the m4 macro processor.

Adding a Feature

Unlike directly editing the .cf, adding a feature using the m4 macro file is actually pretty easy.

After opening the M4 Configuration page, you’ll see a file that looks something like the page shown in Figure 11-3.

click to expand
Figure 11-3: M4 configuration file

Each line, with the exception of the dnl comment lines and the divert(-1) line, are of the form macro-type(value list). In this example, you’re going to add a new feature called genericstable. So you’ll insert a line like this into the FEATURE list:

FEATURE(`genericstable’,`hash -o /etc/mail/genericstable’)  

To do this, select Feature from the drop-down list at the bottom of the page, and click the Add new entry of type button. Then, select genericstable (Outgoing Addresses). Next in the parameters field you specify the type and location of the table file, hash -o /etc/mail/genericstable. The single quote marks are not required, as Webmin will insert them for you. For later convenience it is probably wise to use the arrow buttons on the right of the page to raise the new entry to be just below the other FEATURE lines in your file. It isn’t strictly necessary, but it is nice to have neat configuration files, even if Webmin hides them from you most of the time.

After saving the changed file, you will generate the new sendmail.cf (don’t forget to back up 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, click the Rebuild Sendmail Configuration button. You’ll then be able to open the Outgoing Domains page, and create the new genericstable file and edit it normally. A restart of Sendmail will be required to apply the changes you’ve made.



The Book of Webmin... or How I Learned to Stop Worrying and Love UNIX
The Book of Webmin: Or How I Learned to Stop Worrying and Love UNIX
ISBN: 1886411921
EAN: 2147483647
Year: 2006
Pages: 142
Authors: Joe Cooper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net