We have Exchange 2010. Say I am trying to prohibit users from including large attachments on internal distribution groups. I have set up a transport rule that is something like the following:
Apply rule to messages
from users that are 'Inside the organization'
and when any of the recipients in the To or CC fields is
'[email protected]'
and when the size of any attachment is greater than or equal to
'10 KB (10,240 bytes)'
send 'No attachment for you!' to sender with '5.7.999'
except when the Subject field or message body contains 'allow-attachment'
The result a user gets when this rule is triggered lists every member of the distribution list. First it lists the enhanced DSN text, and then it lists the custom message below that. For example, if abby, bashir and caroline are the members of the mailing list in question, Exchange generates a bounceback like this:
[email protected]
Your message wasn't delivered because the recipient's e-mail provider rejected it.
[email protected]
Your message wasn't delivered because the recipient's e-mail provider rejected it.
[email protected]
Your message wasn't delivered because the recipient's e-mail provider rejected it.
Diagnostic information for administrators:
Generating server: mail.contoso.com
[email protected]
#550 5.7.999 No attachment for you! ##
[email protected]
#550 5.7.999 No attachment for you! ##
[email protected]
#550 5.7.999 No attachment for you! ##
The problem is that the distribution group '[email protected]' is expanded in the message the end-user receives. I want the bounceback to eliminate the redundant information, and be more like:
[email protected]
Your message wasn't delivered because the recipient's e-mail provider rejected it.
Diagnostic information for administrators:
Generating server: mail.contoso.com
[email protected]
#550 5.7.999 No attachment for you! ##
but I cannot figure out how to do this (or produce something simpler that would just give the user advice about attachments). I have tried changing the condition
and when any of the recipients in the To or CC fields is
'[email protected]'
to various other criteria that should match the internal list (for example, matching the "To" header in the email), but I have not found anything that works. I guess I do not understand why I can create the rule that applies to the unexpanded distribution list, but the rule appears to be applied after the distribution group is expanded.
Do you know how I can massage this rule to give a simple bounceback? Or is there a different solution that does not involve transport rules?