Why does the sendmail.mc file support entries that are not formatted for m4 syntax?

Mike B asked:

I recently discovered that /etc/mail/sendmail.mc supports entries that are not in m4 syntax. For example:

LOCAL_CONFIG
O CipherList=HIGH

This doesn’t make sense to me because pretty much everything else that is default in the mc file has the expected syntax (e.g. dnl define( )

What types of things require m4 syntax in the MC file and what doesn’t?

My answer:


m4 is a macro processor.

The sendmail.cf file which Sendmail actually uses has its own unique format, which has nothing to do with m4, and is extremely difficult for people to understand and work with.

Rather, m4 is used as a preprocessor to generate the sendmail.cf file from the sendmail.mc file. The macros you would use in the sendmail.mc are much easier to understand, and hide most of the complexity of the true configuration.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.