Return Home

Overview

<attach>
<body>
<body>
<clientip>
<comment>
<configuration>
<copy>
<delay>
<dnslookup>
<domainquery>
<email>
<expression>
<expressions>
<file>
<filter>
<filters>
<header>
<header>
<helo>
<http>
<imap>
<index>
<inputpath>
<ipquery>
<log>
<mailfrom>
<maxbuffer>
<maxlines>
<message>
<modifysource>
<multiplerecipients>
<option>
<parser>
<path>
<quickresult>
<rcptto>
<result>
<results>
<return>
<rule>
<rules>
<scope>
<select>
<smtpextendedstatuscode>
<smtpstatuscode>
<target_filter>
<target_index>
<test>
<title>

Boolean type

Macros
Regular Expressions

Node: multiplerecipients

<multiplerecipients action="remail" server="127.0.0.1" onreject="reject" onacceptall="accept_all" onacceptpartial="accept_partial" onremailfailure="remailfailure">
[results]
</multiplerecipients>

<multiplerecipients action="acceptpartial" />

Attributes:

action

action to take when a multiple recipient email is processed by the filter

remail
acceptpartial

server

IP address or domain name of mail server to send individual emails to

onreject

Specify the <result> node by key attribute that will be executed when all recipients of the email reject the email

onacceptall

Specify the <result> node by key attribute that will be executed when all recipients of the email accept the email

onacceptpartial

Specify the <result> node by key attribute that will be executed when some but not all recipients of the email accept the email

onremailfailure

Specify the <result> node by key attribute that will be executed when a connection error is detected while attempting to remail the email

Notes

Merak Mail: For this feature to function properly, the filter must be installed as a static filter in Merak Mail, and you must be using a version of Merak Mail that supports the new filter interface (Merak Mail v5.3.2 or later preferred though some earlier versions back to v5.1.2 partially supported it, there were various problems in some versions preventing full capabilities). If you must use this filter as a content filter and not a static filter, the <multiplerecipients> node must be removed or the action attribute set to "acceptpartial".

Normally when a mail server delivers an email to multiple recipients at one time the filter can only control the disposition of the email as a whole, allowing delivery to all recipients or preventing delivery to all recipients. The result returned to the mail server after processing tells the mail server to accept or reject delivery of the email as a whole not by the individual recipients.

When differing filter rules are defined for individual users or domains, it would be preferable to be able to control delivery of the email to individual users, as some may desire the email while others may not. This is especially true of certain types of mailing list bulk mailers that will try to optimize delivery by sending a single email to multiple recipients of the same domain.

The solution to this problem is for the filter to remail the incoming email to each recipient individually so that the decision returned to the mail server only affects a single recipient at a time. The remailing operation occurs synchronously and the results returned by the mail server for each recipient are used to determine the final disposition of the email that is addressed to all recipients.

Using a combination of the return code that the mail server uses to control the further processing of an incoming email and the fields available to specify the message returned to the mail client that transmitted the email, it is possible to reject the email, but tell the mail client it was accepted and delivered. In this manner, the mail client thinks all went as it should during the mail transaction. And the mail server discards the email so that it isn't delivered to all the recipients listed. Instead, the remailed copies of the email are delivered, and since there's only one recipient for each, the filter rules applicable to that recipient are used to determine if it is accepted or rejected.

One disadvantage is that there is no non-delivery error returned to the mail client when some recipients accept the email and some reject it, only when all recipients reject it.

The previous behavior, to accept the email if any one recipient accepted the email and reject it only if all recipients reject it, is the default behavior if this node is not present. It can also be specified using the "acceptpartial" action. When "acceptpartial" is specified, no other attributes or nodes within this one are utilized; they need not be present but if they are will cause no problems.

It is important that a <result> node exist that has the matching key attribute named in each of the onreject, onacceptall, onacceptpartial and onremailfailure attributes. That is how the filter will determine which <result> node to use to dispose of an email. Those four <result> nodes must follow certain guidelines for the remailing procedure to function as intended. onreject, onacceptall and onacceptpartial must always return a code to the mail server that prevents further delivery of the email. onacceptall and onacceptpartial must also return error codes to the mail client indicating the mail was delivered successfully. All other operations normally valid in a <result> node can also be processed, although there are some limitations on the availability of certain recipient-specific macros.

This feature is not yet implemented in the Microsoft Exchange 2000 or Communigate Pro versions of the filter.

Version History

- Requires v2.1.9 or higher

- Version v2.3.1 automatically disables this node if present and the older Merak interface is being used since it's not compatible. Merak Mail automatically uses the new interface if present but older versions of Merak Mail don't support it.