Next: , Up: maidag


3.11.1 Using maidag with Sendmail.

When used as a MDA with Sendmail, maidag must be invoked from the local mailer definition in the sendmail.cf file. It must have the following flags set: ‘lswS’. These mean: the mailer is local, quote characters should be stripped off the address before invoking the mailer, the user must have a valid account on this machine and the userid should not be reset before calling the mailer. Additionally, the flags ‘fn’ may be specified to allow maidag to generate the usual ‘From ’ envelope instead of the one supplied by sendmail.

If you wish to use maidag with non-local authentication, such as SQL or LDAP, you also need to remove the ‘w’ flag, since in that case the user is not required to have a valid account on the machine that runs sendmail.

Here is an example of mailer definition in sendmail.cf

     Mlocal, P=/usr/local/sbin/maidag,
             F=lsDFMAw5:/|@qSPfhn9,
             S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
             T=DNS/RFC822/X-Unix,
             A=mail $u

To define local mailer in ‘mc’ source file, it will suffice to set:

     define(`LOCAL_MAILER_PATH', `/usr/local/sbin/maidag')
     define(`LOCAL_MAILER_ARGS', `mail $u')