The mail.local must be invoked from the local mailer definition in the sendmail.cf file. It must have the following flags set `lswS', meaning the mailer is local, the 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, `fn' flags may be specified to allow mail.local to generate usual `From ' envelope instead of the one supplied by sendmail.
If you wish to use mail.local with SQL authentication, you may wish 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/libexec/mail.local, 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/libexec/mail.local') define(`LOCAL_MAILER_ARGS', `mail $u')