Is there any way to move Rewrite Roules out of sendmail.cf file? On one side sendmail documentation recommends doing changes only in sendmail.mc file, but all Rewrite Rules are in .cf file. I suppose that all changes to Rewrite Rules in .cf file will be lost during next .cf file generation from .mc.

link|improve this question

40% accept rate
feedback

1 Answer

sendmail when run reads sendmail.cf. So sendmail.cf must exist and contain the full set of rules and variables that need to be set to match your requirements for a working setup. The most common way to build sendmail.cf is by maintaining the simpler sendmail.mc file and then using m4 to "compile" sendmail.mc into sendmail.cf. So yes, it is possible to break the sendmail.mc file into parts and then by carefully executing m4 to produce the (single) sendmail.cf

I highly recommend the bat book if you want to tinker with sendmail.mc and .cf. For an approach that bypasses m4 and sendmail.mc you can look at Sendmail Theory and Practice but it may be overkill for most people.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.