Split mails per recipient

If you are using a version of sendmail greater than 8.10, you can split a message to multiple recipients into individual messages, one for each recipient.

There are a number of stages involved and require changes to the Sendmail configuration.

1.Copy /etc/mail/sendmail.mc to /etc/mail/sendmail-in.mc

2.Edit the new file and add after the last FEATURE line:

   QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue.in, F=f, r=1, R=8, I=2m')

3. Add these lines at the very end of the file:

   LOCAL_RULESETS
   # LOCAL_RULESETS
   Squeuegroup R$* @ $* $# mqueue R$* $# mqueue

Please note this is

   Squeuegroup<space>R$*<tab>@<space>$*<space> $#<space>mqueue<space>R$*<space>$#<space>mqueue

4. Remake your sendmail.cf file:

   cd /etc/mail
   m4 sendmail-in.mc > sendmail-in.cf 

It is possible to modify the Makefile.

5. Changes to /etc/rc.d/init.d/MailScanner (from rpm install on redhat) make this change to the incoming sendmail command line:

change:

$SENDMAIL -bd -OPrivacyOptions=noetrn \
                     -ODeliveryMode=queueonly \
                     -OQueueDirectory=$INQDIR \
                     -OPidFile=$INPID 

to read:

$SENDMAIL -bd -OPrivacyOptions=noetrn \
                     -ODeliveryMode=queueonly \
                     -OQueueDirectory=$INQDIR \
                     -OPidFile=$INPID \
                     -C/etc/mail/sendmail-in.cf

6. Restart Sendmail. If you’re running Linux:

   service MailScanner restart

References

Costales, Bryan with Allman, Eric. (2003). sendmail, Third Edition, Sebastopol: O’Reilly Media. ISBN 1-56592-839-3

 
documentation/configuration/mta/sendmail/how_to/split_mails_per_recipient.txt · Last modified: 2007/07/23 15:55 by matt_hampton
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki