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