No Scanning if one is in To

Steve Swaney Steve.Swaney at FSL.COM
Thu Oct 14 18:45:29 IST 2004


> -----Original Message-----
> From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On
> Behalf Of Marcel Blenkers
> Sent: Thursday, October 14, 2004 10:48 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: No Scanning if one is in To
> 
> Hi there,
> 
> ok..the subject is a bit strange, but i´ve got a problem.
> 
> One of my users does not want his mails scanned for Viruses nor for spam.
> So i had made a rule, which is as followed:
> 
> To:     user at domain         no
> 
> and put these into virus.scanner.rules and to spam.scanner.rules..
> 
> the default for action is then yes
> 
> Ok..everythings works fine..as long as this user is the only one in the
> TO-Field.
> 
> For example..
> 
> A mail containing a virus is getting in.. The To-Field contains 2 Users:
> The Person, who does not want his mails to be scanned, and me.
> 
> The Mail slippes trhough unscanned for both persons..
> 
> In both mails i do find the following:
> 
> X-irc-addicts.de-MailScanner:   Not scanned: please contact your Internet
> E-Mail Service Provider for details
> 
> To find this in the mail to the person, who does not want his mails to be
> scanned is ok..but to see this within the mail to myself..is a bit
> strange, as my mails should be scanned..
> 
> The same problem does happen with the use of spamassassin via procmail.
> This user is in the config with getting all spam..and voila..all persons
> in the to-field get unscanned..
> 
> Is there a workaround for this behaviour?
> 
> 
You'll need to have the MTA split emails to multiple users into individual
messages, one for each recipient. There has been a lot of traffic on how to
do this recently. 

The quick and dirty for sendmail:
-----------------------------------------------------------
Create a backup copy of your sendmail.mc file:

       cp /etc/mail/sendmail.mc /etc/mail/sendmail_in.mc

   Edit /etc/mail/sendmail_in.mc. Add after the last "FEATURE"

       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
      # LOCAL_RULESETS
      Squeuegroup R$* @ $* $# mqueue R$* $# mqueue

   Create the sendmail_in.cf file

      cd /etc/mail
      m4 sendmail_in.mc > sendmail_in.cf

   Edit /etc/init.d/MailScanner to use the new sendmail_in.cf file.
   Change the lines:

                       -OPidFile=$INPID
        touch /var/run/sm-client.pid

   To read:

                       -OPidFile=$INPID \
                      -C/etc/mail/sendmail_in.cf
        touch /var/run/sm-client.pid

  Restart MailScanner.


For Exim I'm including a email I saved a while back
------------------------------------------------------------------
Mike Bacher [mikeb at tulsaconnect.com] sent me the directions below:
-----------------------------------

FYI, a potential solution to the white/blacklist problem with MailScanner
when using exim as the MTA:

[I wont have time to test this myself for a week or two]

-------- Original Message --------
Return-Path: <ph10 at cus.cam.ac.uk>
Date: Fri, 16 Jul 2004 11:09:59 +0100 (BST)
From: Philip Hazel <ph10 at cus.cam.ac.uk>
Reply-To: exim-users at exim.org
To: Mike Bacher <isp-list at tulsaconnect.com>

On Fri, 16 Jul 2004, Mike Bacher wrote:

> Well, I only care that a message with multiple recipients gets broken
> up into 1 message per recipient and placed into the queue for outbound
> delivery,

You can do this with an "incestuous" call to exim. Make this your first
router:

split:
   driver = accept
   domains = the.domains.you.want.to.do.this.for
   condition = ${if eq {$received_protocol}{split}{no}{yes}}
   transport = send_to_self
   no_verify

Add this transport:

send_to_self:
   driver = pipe
   batch_max = 1
   use_bsmtp
   command = /usr/sbin/exim -oMr split -bS
   user = exim

Untested. YMMV. You logs will get bigger, of course...

--
Philip Hazel            University of Cambridge Computing Service,
ph10 at cus.cam.ac.uk      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book
--------------------------------------------------------------------------

I don't believe that postfix can be configured to split an email to multiple
recipients into individual messages so if you're using postfix you may have
to change MTAs

Steve

Steve Swaney
President
Fortress Systems Ltd.
www.fsl.com
steve.swaney at fsl.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Fortress Systems Ltd.
www.fsl.com

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).



More information about the MailScanner mailing list