In order to use the M4 macros, you must first create a master configuration file (.mc) containing the features
and options you want sendmail to have. The .mc file should be located in the
/etc/mail directory on your VPS v2.
Before replacing your current sendmail.cf file, you should create a copy of it in case you need to revert
back to the original. As root, run the following commands from your VPS v2 shell.
# cp sendmail.cf sendmail.cf.bak
Run the following command to convert the .mc file to a .cf file that sendmail can use.
# /usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4
your-file-name.mc > your-file-name.cf
You can now replace the sendmail.cf with your custom .cf file.
# cp /etc/mail/your-file-name.cf /etc/mail/sendmail.cf
As with any time you make changes to the sendmail configuration, you must restart the sendmail daemon
for the changes to take effect.
# cd /etc/mail
# make restart