<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE>Re: Rulesets with multiple recipients</TITLE>
<STYLE type="text/css">
</STYLE>
</HEAD>
<BODY>
<table border=0 cellspacing=0 cellpadding=0>

<tr>
<td  bgcolor="#FFFFFF" height="20px"  align="left" valign="top" nowrap>
 
</td></tr>
</table>

<table border=0 cellspacing=0 cellpadding=0><tr>

<td valign="top" align="left" width="750px">
<table border=0 align="left" cellspacing=0 cellpadding=0>
<tr><td valign="top" align="left">&nbsp;</td></tr>
<tr><td valign="top" align="left">

----- "Steve Freegard" &lt;steve.freegard@fsl.com&gt; wrote:<br /><br />&gt; David Jacobson wrote:<br />&gt; &gt; Hi List / Julian,<br />&gt; &gt; <br />&gt; &gt; I understand that this has been discussed a few times, however would<br />&gt; <br />&gt; &gt; like to raise this topic again.<br />&gt; &gt; <br />&gt; &gt; Scenario:<br />&gt; &gt; <br />&gt; &gt; We offer a service to certain users only for some domains where we <br />&gt; &gt; forward a copy of their mail to a seperate server and deliver (kinda<br />&gt; <br />&gt; &gt; like an insurance policy) - incase they have trouble with their<br />&gt; server <br />&gt; &gt; and need to access a mail urgently and/or respond.<br />&gt; &gt; <br />&gt; &gt; This works fine - unless the mail has multiple recipients in the<br />&gt; same <br />&gt; &gt; domain.<br />&gt; &gt; <br />&gt; &gt; Example : user1@company.com sends to user1@company2.com and <br />&gt; &gt; user2@company2.com MailScanner will parse the non spam action rules<br />&gt; and <br />&gt; &gt; see that the action for user1@company2.com is to forward to another<br />&gt; <br />&gt; &gt; server and deliver, then it will do that and skip the rest of the <br />&gt; &gt; forwards and deliver mail normally.  This is a problem, as all users<br />&gt; in <br />&gt; &gt; the RCPT TO should be forwarded &amp; delivered.<br />&gt; &gt; <br />&gt; &gt; I understand this is not a MailScanner issue as MailScanner does not<br />&gt; <br />&gt; &gt; split the mail and can only really do one action with the message <br />&gt; &gt; (understandable).<br />&gt; &gt; <br />&gt; &gt; I also understand I can change the default behaviour from first<br />&gt; match to <br />&gt; &gt; use default ruleset with "Use Default Rules With Multiple Recipients<br />&gt; = <br />&gt; &gt; yes" however since we only do this for certain users and only for <br />&gt; &gt; certain domains that change will not help.<br />&gt; &gt; <br />&gt; &gt; So I assume the fix people will suggest is to actually split the<br />&gt; mail so <br />&gt; &gt; MailScanner can do the right thing per message.  I have done this<br />&gt; with <br />&gt; &gt; Exim and it works fine in terms of splitting the mail and then doing<br />&gt; the <br />&gt; &gt; correct rules per mail.<br />&gt; &gt; <br />&gt; &gt; My major concern with this is as follows:<br />&gt; &gt; <br />&gt; &gt; 1) Increasing the load on the server, 1 message to 10 recipients is<br />&gt; now <br />&gt; &gt; 10 seperate messages<br />&gt; &gt; 2) Bandwidth increase to customer<br />&gt; &gt; 3) MailWatch logs seperate messages to maillog<br />&gt; &gt; <br />&gt; &gt; Point 3 is my biggest problem - we don't want to have 10 of the same<br />&gt; <br />&gt; &gt; messages logged in maillog - this will increase our DB size (which<br />&gt; is <br />&gt; &gt; already huge) and it will be "non efficient" to have multiple of the<br />&gt; <br />&gt; &gt; same messages in the DB for us to search and release etc.<br />&gt; &gt; <br />&gt; &gt; Additionally I could be wrong but I'm not even sure if splitting<br />&gt; mail <br />&gt; &gt; like this is RFC compliant.<br />&gt; &gt; <br />&gt; &gt; OK, so now that my rant is over about the issues we have - is it at<br />&gt; all <br />&gt; &gt; possible to change MailScanner in any way to parse through the<br />&gt; ruleset <br />&gt; &gt; via a subroutine or something similar so it doesn't do first match<br />&gt; and <br />&gt; &gt; works out it's to multiple recipients and somehow parses the ruleset<br />&gt; <br />&gt; &gt; correctly?<br />&gt; &gt; <br />&gt; &gt; Or perhaps any other way EXCEPT splitting the mail as I can see it <br />&gt; &gt; causing more problems than it's worth.<br />&gt; &gt; <br />&gt; <br />&gt; Recipient splitting is advisable anywhere users are able to set-up<br />&gt; their<br />&gt; own preferences as you have to consider that case of a<br />&gt; multi-recipient<br />&gt; e-mail where one user has blacklisted the sender (this will cause the<br />&gt; mail to be blacklisted for all recipients).<br />&gt; <br />&gt; The SpamAssassin cache reduces a lot of the overhead of recipient<br />&gt; splitting however there are a few disadvantages as you point out;<br />&gt; IIRC<br />&gt; Exim and Postfix recipient splitting is also pretty ugly whereas<br />&gt; Sendmail definitely wins out in this regard (it generates multiple<br />&gt; qf/df<br />&gt; files on message reception instead of requiring re-injection).<br />&gt; <br />&gt; However - forgive me for saying - but the whole method of (mis)using<br />&gt; Non-Spam Actions for what you are attempting is a nasty hack which is<br />&gt; why it's causing you issues.<br />&gt; <br />&gt; The most straightforward way to achieve what you are trying to do<br />&gt; would<br />&gt; be to maintain a 'map' of the users/domains that have this 'feature'<br />&gt; enabled e.g.:<br />&gt; <br />&gt; blah@blah.com -&gt;  forward@blah.com<br />&gt; ...<br />&gt; <br />&gt; Then either in a MailScanner CustomFunction *or* in your MTA; build up<br />&gt; a<br />&gt; Bcc: header based on the envelope recipients using the map.  If<br />&gt; MailScanner delivers the message (e.g. it's non-spam) then the 'copy'<br />&gt; mailbox automatically gets sent a copy via the Bcc: header.<br />&gt; <br />&gt; IMO - that's a far less horrible way to achieve this without trying<br />&gt; to<br />&gt; misuse the message actions.<br />&gt; <br />&gt; Regards,<br />&gt; Steve.<br /><br />Steve,<br /><br />Thank you very much for the guidance - sometimes a push in the right direction is what's required :)<br /><br />We've tested with Exim and it definitely seems like a more elegant solution as you suggested.<br /><br />Thanks again.<br /><br />David<br /><br />&gt; <br />&gt; -- <br />&gt; MailScanner mailing list<br />&gt; mailscanner@lists.mailscanner.info<br />&gt; http://lists.mailscanner.info/mailman/listinfo/mailscanner<br />&gt; <br />&gt; Before posting, read http://wiki.mailscanner.info/posting<br />&gt; <br />&gt; Support MailScanner development - buy the book off the website!<br>


</td></tr>
<tr><td valign="top" align="left">&nbsp;</td></tr>
<tr><td valign="top" align="left">

<table border=0 cellspacing=0 cellpadding=0>

<tr>
<td  bgcolor="#000000" width="2px"  align="left" valign="top" nowrap>
  
</td>
<td  bgcolor="#FFFFFF" width="2px"  align="left" valign="top" nowrap>
 
</td>
<td  bgcolor="#f08a35" width="2px"  align="left" valign="top" nowrap>
 
</td>
<td  bgcolor="#FFFFFF" width="5px"  align="left" valign="top" nowrap>
 
</td>
<td  bgcolor="#FFFFFF"  align="left" valign="top" nowrap>
  <table cellspacing="1" cellpadding="1" border="0" width="413">   <tr>   <td colspan="2"><strong><font face="tahoma,arial,helvetica,sans-serif" size="2">David Jacobson</font></strong></td>  </tr>    <tr>   <td colspan="2"><font face="tahoma,arial,helvetica,sans-serif" size="2">Technical Director</font></td>  </tr>    <tr>   <td width="36"><font face="verdana,geneva" size="1">Tel:</font></td>    <td width="370"><font face="verdana,geneva" size="1">011 262 3632</font></td>  </tr>    <tr>   <td><font face="verdana,geneva" size="1">Fax:</font></td>    <td><font face="verdana,geneva" size="1">086 637 8868</font></td>  </tr>    <tr>   <td><font face="verdana,geneva" size="1">Cell:</font></td>    <td><font face="verdana,geneva" size="1">083 235 0760</font></td>  </tr>    <tr>   <td><font face="verdana,geneva" size="1">Email:</font></td>    <td><font face="verdana,geneva" size="1">davidj@synaq.com</font></td>  </tr>    <tr>   <td><font face="verdana,geneva" size="1">Web:</font></td>    <td><font face="verdana,geneva" size="1"><a style="text-decoration: none;" href="http://www.synaq.com"><font color="#000000">www.synaq.com</font></a></font></td>  </tr>    <tr>   <td colspan="2"><font face="verdana,geneva" size="1"><br />   Sandhaven Office Park, Pongola Crescent<br />   Eastgate Ext 17 Sandton</font></td>  </tr>  </table>   
</td></tr>
</table>

<table border=0 cellspacing=0 cellpadding=0><tr>

<td valign="top" align="left">
<table border=0 align="left" cellspacing=0 cellpadding=0>
<tr><td valign="top" align="left">&nbsp;</td></tr>
<tr><td valign="top" align="left">

</td></tr>
<tr><td valign="top" align="left">&nbsp;</td></tr>
<tr><td valign="top" align="left">

</td></tr>
</table>
</td>

</tr></table>

<table border=0 cellspacing=0 cellpadding=0>
<tr>

</tr>
</table>
</td></tr>
</table>
</td>

</tr></table>

<table border=0 cellspacing=0 cellpadding=0>
<tr>

</tr>
</table>
</BODY>
</HTML>