Question for multiples recipients and rules
Stephen Swaney
Steve at swaney.com
Tue Aug 19 13:43:34 IST 2003
Check the faq-o-matic:
http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/169.html
Unfortunately the formatting is off in the FAQ so I'll correct below and
try to fix the FAQ. I've also worked the solution back into the
sendmail.mc file so there is no need to "snip" the fix into the m4
configurations files.
I don't know of a similar work-around for Exim or Postfix.
>From the FAQ:
The Problem:
MailScanner will apply individual SpamAssassin user preferences ONLY to
the first recipient of messages which have multiple recipients. This
results in the first recipient's spam preferences being applied
(possibly incorrectly) to all of the other recipients of the message
A Solution for those using sendmail thanks to Ken A, Pacific.Net.
I qoute Ken:
I have incoming sendmail splitting multiple recipient messages into
multiple messages, so MailScanner and SA only sees one recipient per
message.
Here's what I did. If any sendmail gurus out there thing this is a bad
idea, please let me know what a mess I've made of things :-)
1) Start the incoming sendmail with a different config file. Changes to
/etc/rc.d/init.d/MailScanner (from rpm install on redhat) make this
change to the incoming sendmail command line:
------ snip -------
$SENDMAIL -bd -OPrivacyOptions=noetrn \
-ODeliveryMode=queueonly \
-OQueueDirectory=$INQDIR \
-OPidFile=$INPID \
-C/etc/mail/sendmail_in.cf
-------- snip --------
2) Make changes to the new sendmail config: cp /etc/mail/sendmail
/etc/mail/sendmail_in.cf
In sendmail_in.cf, add the following: The comment header "QUEUE GROUP
DEFINITIONS" should be there already. Just add the single line under it.
------- snip --------
############################ # QUEUE GROUP DEFINITIONS # ############################
Qmqueue, P=/var/spool/mqueue.in, F=f, r=1, R=8, I=2m
------- snip --------
AND, just above the "Ruleset 3" comment header, add the following: (not
sure if both lines are required or not...)
--------- snip --------
# LOCAL_RULESETS Squeuegroup R$* @ $* $# mqueue R$* $# mqueue
############################### ### Ruleset 3 -- Name Canonicalization ### ############################################
--------- snip ----------
Restart sendmail, and things like this start showing up in the log when
messages with multiple recipients come in:
Jul 17 08:14:31 host sendmail[7183]: h6HFDop8007183: split: maxrcpts=1,
rcpts=3, count=2, ids=h6HFDop9007183; h6HFDopA007183
So now mailscanner only sees one recipipient per message and rulesets
only apply to the user they are supposed to apply to. Cool, huh? Thanks
for all the suggestions!
Ken A Pacific.Net
To add the configuration changes into the m4 configuration, modify your
sendmail.mc file:
Add the line below anywhere in the define section of the file:
QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue.in, F=f, r=1, R=8, I=2m')
Add at the very end of the file:
# LOCAL_RULESETS
Squeuegroup R$* @ $* $# mqueue R$* $# mqueue
NOTE: this line must be formatted with a "tab" between the left-hand
side and the right-hand side of the rule.
Squeuegroup<space>R$*<tab>@<space>$*<space> $#<space>mqueue<space>R$*<space>$#<space>mqueue
Then generate the new sendmail.cf file:
m4 sendmail.mc > sendmail.cf
On Tue, 2003-08-19 at 08:23, Eduardo Andre wrote:
> My question:
> I install MailScanner+spamassassin 4.22-5 on a Red Hat 9.0.
>
> I set in MailScanner.conf:
>
> Virus Scanning = /etc/MailScanner/rules/virus.scanning.rules
> and
> Is Definitely Not Spam = /etc/MailScanner/rules/spam.whitelist.rules
>
>
> In the virus.scanning.rules:
>
> To: user1 at domain no
> FromOrTo: default yes
>
> In the spam.whitelist.rules:
>
> FromOrTo: user1 at domain yes
> FromOrTo: default no
>
>
>
> The question:
> When my box recive on email and in the field TO: is user3 at domain,
> user2 at domain.com user1 at domain, the rule for user1 at domain is aplicated for
> all recipients.
>
> In the spam.whitelist.rules I found the same thing.
>
> Anybody help me?
>
> Sorry my bad english. :)
>
> Thx.
>
>
> Eduardo
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
Postmaster at FSL.com
Fortress Systems, Ltd.
Email Gateways
info at FSL.com
www.FSL.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20030819/abd494f8/attachment.html
More information about the MailScanner
mailing list