Tuesday, April 30, 2013

Limiting the maximum number of recipients per message

In real life there are situations when we need to block message or move all recipients to BCC field if it have too many recipients in TO and CC field. When unaware or simply by mistake user sends a newsletter e-mail to all customers and puts them in TO field, it will be a scratch on company reputation. Or, if you send a job announcement to multiple people, you may want to use BCC to keep the identities of the potential job seekers private.

With Message Recipients Count requirement and Block Message action or Move All Recipients to BCC field action those situations will never happen. This requirement will count recipients per message, user, domain or any other condition based on message properties. See all conditions and exceptions.

Limit the number of TO, CC and BCC recipients
To set restrictions for all, incoming or outgoing messages in Postfix and Sendmail the best way is to choose search in TO and CC field. It will count recipients skipping the BCC field. When number of email addresses are reached the actions will be taken.

Good policy is to block the message and inform sender about the reason why it was blocked. Block Message action have option to customize the message which is delivered to sender.
Define custom reject message while connection.
Better and more elegant way than blocking message is to Move All Recipients to BCC field. It will prevent sharing the e-mail addresses with persons which should not see them.

This action is simple. No options or configurations need to be done.
Prevent recipient names from showing by using Bcc
Keep the recipient list private. Bcc can help you to be respectful of others' privacy by keeping them in the loop without disclosing their identities.

Learn more about policies which can be applied with MSH Traffic Policy to your mail server.

Tuesday, April 23, 2013

MSH Out of Office Assistant 1.1 released!




What's new:

  • support for aliases
  • wildcard and regular expression matching exceptions pattern
  • extended loop protection interval values
  • added milter_default_action=accept entry in Postfix configuration file
  • more configuration parameters in install script
  • fix: in loop protection some messages was wrongly counted




With MSH Out of Office Assistant you will extend Postfix and Sendmail with client side out of office replies.

Tuesday, April 16, 2013

MSH Traffic Policy 1.2 released!

MSH Traffic Policy Administrator image What's new:
  • move all recipients to BCC field action
  • count of recipients requirement
  • advanced variables in conditions, exceptions and actions
  • message body keywords searching requirement
  • message size requirement
  • wildcard and regular expression searching/matching pattern
  • message counting based on sender or recipient requirement
  • more configuration parameters in install script
  • added milter_default_action=accept entry in Postfix configuration file
Small fixes:
  • when email was sent with only html mime part, plain template was added instead of html in attach strip action 
  • xml parser was reading wrong attach strip action node

MSH Traffic Policy is a heavy duty machinery for message processing, its works as a milter with Postfix and Sendmail.

Tuesday, April 9, 2013

Check more than one message header at time

With built-in option to check all or any conditions you can check more than one header at time. Multiple headers can be checked with logical AND or OR parameter.

I'll add two headers with value checking. In the first one I will use Wildcards when matching Content-Type value. In the second one I will use Regular expression to match User-Agent header value.


Now when both conditions are added, one from two option must be selected:

  • All conditions must met
  • Any condition must met

When defining mail server rules use various message conditions.

When All conditions must met option is selected then both header conditions must be met. So when message will not have those headers rule will be not executed.

When Any conditions must met option is selected then any header may be present in message.

Learn more about content control and flow shaping with Postfix and Sendmail.

Wednesday, April 3, 2013

Stripping/detaching attachments from messages

In MSH Traffic Policy, you can use attachment filtering to apply filters at the server level to control the attachments that users receive. Attachment filtering is increasingly important in today's environment, where many attachments contain harmful viruses or inappropriate material that may cause significant damage to the user's computer or to the organization.

This milter will remove attachments from the email messages and replace them with links to the attachments on ftp or network drive, allowing easy access to files while keeping mailboxes smaller. Bare Postfix and Sendmail not provide this functionality out of the box, third party tool is needed.

Application provide Strip Attachments action which allows extracting any attachments from the incoming messages and save them to shared location. Filtering can be based on file name, file extension, mime type, file size or attachments count. You can delete attachments from all messages or only from emails specified by  scope of senders or recipients.

Built in attachments processor will skip digitally signed, encrypted and rights protected e-mail messages. If exporting attached files is not necessary then other actions can be used: 
  • block whole message and attachments
  • delete attachments but allow message through
  • silently delete message and attachments
  • reject email message

Using Strip Attachments action

Before we create our rule, template notification is needed. We can create the template in HTML or Plain Text format.

Select Templates tree node and click Add button. In template definition window provide name and body template, in HTML format provide html source code. In template body $MSGID variable can be used, it will be replaced with message identifier, it is used when creating separate directories for attachments.


After adding two template formats you will have result like this (Attachments Stripped html and plain text entries).


Now we can create our rule for archiving messages on network disk. Create rule group and add new rule. On Actions tab click button Add and select Strip Attachments action.


In Directory path field provide absolute path on server where to automatically save attachments. I.e /var/attachments. From Plain Text and HTML template choose our previously created templates. Click button OK.

On Conditions tab click button Add and choose Attachments count requirement. Provide your values. I have used grater or equal to 1 condition.


With this condition from all messages outgoing or incoming attachments will be stripped. So for real life scenario it is good idea to define other conditions, like detach attach only from incoming messages. See full list of available conditions and exceptions.

Define rule name and click button OK. Save all settings and you are ready to test rule.

Testing rule

Send from one user to another test message with couple of attachments. Below you will find result from our example. When recipient will click on provided link he will be redirected to our provided location (of course it should be configured as ftp or network share).


So if you need to remove, strip, detach, delete, dump attachments and insert advisory notice into message for recipient then MSH Traffic Policy will do it for you.

MSH Traffic Policy is a sophisticated heavy duty machinery for email processing, try it.