Quantcast
Channel: Zimbra, Postfix and Sendmail mail server tools
Viewing all 67 articles
Browse latest View live

Send an auto reply and forward message

$
0
0

This application works with Postfix and Sendmail. See MSH Autoresponder website for more info.

Auto replies defined on server side and managed from one place are best solution if you want to:

  • create marketing campaigns
  • send auto replies from support account
  • take control over out of office responders of your users 

To make an auto reply follow this simple steps.


1. Create New Rule.
2. Define subject: Out of Office: $SUBJECT
 
3. Define message body: I’m currently out of office, I’ll be back on Monday. Best Regards John Doe
4. Add recipient condition: john.doe@host.local, search only in TO field.
5. Define time range: From 01/21/2013 08:00To02/22/2013 17:00.
6. Enable forward, TO jane.smith@host.local, Subject FROM JOHN DOE FWD: $SUBJECT.
7. Define rule name: John Doe Out of Office with forward.
8. Click OK and SAVE ALL button on main window application.

Test the configuration by sending email to john.doe@host.local and wait for your defined autoresponse.

Visit application website.



Change subject for specified email recipient - Postfix/Sendmail

$
0
0


There is many ways to modify the message subject in Postfix and Sendmail based on message recipient, but the simplest way is to use milter MSH Traffic Policy. This software can do a lot of more than change and rewrite subject, you can: take care of attachments, block spam, manage MIME headers and many more.

So lets see how to create simple rule to modify message subject.

1. Add new rule by clicking Add Rule button.

2. When rule wizard will open, on Actions tab click Add button and choose from menu Modify Message Subject position.

3. Define new subject for the message. To insert old message use $SUBJECT variable.

4. If we want to rewrite subject only for one user then on Conditions tab click Add button and choose Message Recipient position.


5.Enter recipient email address (like john.doe@host.local) and choose in which field to search for this recipient. We want to change message subject when our defined recipient is in TO or CC field. So choose from combo box "in TO and CC field" position.
6. On Name tab define name for new rule, ie. Rewrite subject for user john.doe@sendmail.local and then click OK button.

7. When you create new rule click Save All button and you are ready to test your configuration.


To learn more visit MSH Traffic Policy website.


Block attachments with Postfix

$
0
0

With MSH Attach Filter (freeware) milter application you can block or remove any attachment you want.

You can also:
  • filter by attachment name, content type, size
  • add, remove and compress attachments
  • block message with suspicious files

Block message with certain attachments

First way is to block email containing specified attachments.

You need to define blocking action:

<block-message type="discard"/>

And one condition which will execute block message action. In this example it will block attachments with extensions: bat, com, exe, dll and vbs.

<attach-name value="*.bat;*.com;*.exe;*.dll;*.vbs">

Remove attachments from message

Another solution is to only remove attachments from message without block email.

It is even simpler because you need only define one action. This time it will remove attachments greater than 1 MB:

<attach-remove-size value="1" unit="mb" cmp="gt"/>

This was a simplest configuration when you need to dump attachment from messages.


Block emails sending out to a particular domain

$
0
0
How to block sending and receiving emails from/to specific domain? Like:

  • AOL
  • Gmail
  • Hotmail
  • etc.


I will not use smtpd_sender_restrictions from Postfix, but create simple rule in MSH Traffic Policy.

1. The easiest way to do this is to create rule with block message action.
Block Message action.

2. Choose REJECT option.
Choose REJECT option from TYPE drop down menu.

3. Now go to Conditions tab and define domains which you want to block. For this example I'll use *@gmail.com. Select Message Sender condition from the list.
Message Sender condition.

4. Add domain gmail.com with asterisk character which will match any email address.
Sender email address.

5. Select Message Recipient conditions from the list.

Message Recipient condition.

6. Add domain gmail.com with asterisk and choose TO,CC and BCC option from drop down menu - with this none email will go through this filter.

In which fields search: TO, CC and BCC

7. Remember to select Any condition must met - with this option when only one condition is met message will be dropped.
Any condition must met to block message.


With that created rule no mail will go to or from gmail.com domain. There is no limit of defined domains, so adding new one is as easy as previous one.

Autoresponder loop protection

$
0
0
It happen when on other side of wire there is an auto reply software which has not have proper prevention functionality. This will create servers message war, because they will send infinite of emails.

Second case is when account receive a lots o spam, and many of this spam has bogus FROM address, so this account also receive many mailer-daemon responses while replying to that message.

MSH Autoresponder has built-in loop protection functionality.
Prevent of creating autoresponders loops between servers
MSH Autoresponder - Rule Wizard - Protection page
It simple. If you do not want to have protection then switch off Enable protection option (selected by default). Customization of auto reply density sending is also available - how many auto replies will be sent to the same recipient and in which time interval (ie. 15 minutes).

With this functionality you will not worry any more about loops.

Run script when receive message

$
0
0
Ever wanted to execute command/script/application when receive certain email? Not for all messages but only from specific sender or message with some subject or maybe in specific time range? With MSH Traffic Policy it is easier than you think.
Run Executable action is one of many actions which can be invoked based on multiple conditions.
Run command only for certain messages
Executable path is an absolute path to the command which will be invoked. Arguments are optional. Wait for finish options means that when selected application will work synchronously and processing of the message will be stopped till command ends.
Wait for finish can be used in scenario where some application generate file and this file should be attached to the message.

How to add custom header to outgoing messages

$
0
0
I'll demonstrate how to add headers to an email in Postfix. If you want to ONLY add custom header to all messages you might use ACCESS and PREPEND, see Postfix documentation for details.

But what if we assume that our custom header must be added only to outgoing messages and only if there is no one already? Unfortunately you cannot do this with bare metal MTA.

The best and easiest solution is to use MSH Traffic Policy milter.

Our first condition is to check if there is already a header in the message. Message Header condition will scan message for our X-Header. It have four options for matching headers - we need not have Header condition type.

Second conditions is to match only outgoing messages. If your domain is local.net then insert *@local.net value into Message Sender condition. This will filter only messages with internal sender.
The last element is to check if All conditions must met option is selected.

We have defined conditions, now it is time for actions. Add message header is what we looking for.
After these steps we have configured rule which will: Add custom header to all outgoing messages, but only when header does not exists.


Learn more about MSH Traffic Policy.

MSH Out of Office Assistant for Postfix and Sendmail

$
0
0
MSH Out of Office Assistant is solution which extends Postfix and Sendmail functionality with client side auto replies.

Mail Client Extension

Mail client extension seamlessly integrate with Mozilla Thunderbird.
MSH Out of Office Assistant in Mozilla Thunderbird photo

Central OOF Administration

Administration application provide central management of server settings and users out-of-office assistant settings. Loop protection and prevention of sending auto respond to mailing lists or spam settings can be easily configured with it.
Server administration over out of office user settings.


Application can be used for FREE up to 15 end users.


Automatic add attachment to message

$
0
0
If you need to simply add some attachment to every or only to specified message (like from specified sender, recipient or by message subject) try this. MSH Traffic Policy with Add Attachment action will be best solution for this scenario.

When you have defined your condition (see all available options), choose Add Attachment action from menu.

New window will be open. Provide an absolute path to file which is located on server. In our example I'll use /usr/attachments/brochure.pdf file.
Add Attachment with Postfix and Sendmail

After saving changes, to all messages which are matching conditions brochure.pdf attachment will be added.

How to send auto replies only on weekends?

$
0
0
New advanced time scheduling options in MSH Autoresponder 1.3 will give you a better experience with time settings.

Take a look.
Advanced Time Schedule - auto replies for Postfix and Sendmail
Advanced Time Schedule - auto replies for Postfix and Sendmail
Old time range settings now are split and we have global time range and hours range. With this change you can set auto reply to be sent all day long or with a simple From-To hours range.

The new feature is Daily pattern option which give you a possibility to set active rules only at particular days in week.

If you want to sent auto replies all week then option No pattern must be selected but when you're out of office at weekends then Daily pattern comes for the help with Sunday and Saturday option.

Check this new feature and your autoresponses will be like never before.

With those features which MSH Autoresponder have you can throw away vacation and forward scripts to bin and never look back.

Send an auto reply and forward original message to another mailbox

$
0
0

It is a common situation when you are using an autoresponder you want to forward received messages to another account.

I.e. some company could have support mailbox with an auto reply and need to redirect original message to attendant who is responsible for manage supports cases.

MSH Autoresponder can accomplish this task with forwarding build it functionality.
Autoresponder Rule Wizard - Forward page
Configuration is simply, when you want to forward all incoming emails you need to select Enable forward option. Provide in field To email address of user which will receive all mails. In Subject field you can change original message subject to something which will distinguish our forward from original message. In this field variable $SUBJECT can be used which will be replaced with original message subject.

If redirection to multiple mailboxes is needed then email addresses can be separated by comma.

Conditional always_bcc only for outgoing messages

$
0
0

Sometimes there is a need to clone all outgoing or incoming message traffic and forward it to specific mailbox. When using Postfixalways_bcc configuration parameter can be used, with Sendmail external milter is needed.

Solution for Postfix have pros and cons, as it name says it will add BCC sender to ALL emails without exception, you cannot specify certain mailboxes or monitor only outgoing messages. It will even match bounce messages.

If you need add blind carbon copy per domain or skip specific e-mail address you need to use third party milter. With MSH Traffic Policy automatic bcc based on rules is easier than you think.

For our example I will assume than our internal domain is domain.net. This will let us to create rule which will behave like conditional always_bcc functionality.

Create new rule and begin with Add Envelope Recipient action. This will work as "add bcc recipient" because we will not add BCC header to message, so it will only have envelope recipient, which is not visible to the end recipient.

Provide email address for mailbox to which you want to forward all messages.

Next you need conditions which will match messages. On Conditions tab select from Add button Message Sender condition. 

For our scenario we assume that we want to add BCC recipient to all outgoing messages. 

Use name of your domain, so to each message which will have sender from domain.net BCC will be added (with boss@domain.net email address with our example).

Good idea is to exclude email address which receive all messages, so on Exceptions tab add Message Sender exception and provide boss@domain.net address.

On Name page provide name for you rule, i.e always_bcc, click OK button.

Save All settings on main application window.

See all conditions which have MSH Traffic Policy, because with them you can create sophisticated rules which match any messages you want: with certain attachments, specific subject or message size.

Stripping/detaching attachments from messages

$
0
0
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.



Check more than one message header at time

$
0
0
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.

MSH Traffic Policy 1.2 released!

$
0
0
MSH Traffic Policy Administrator imageWhat'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.

MSH Out of Office Assistant 1.1 released!

$
0
0



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.

Limiting the maximum number of recipients per message

$
0
0
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.

Add disclaimer to outgoing messages in Postfix and Sendmail

$
0
0
With MSH Traffic Policy release 1.3 there is a new action called Add Disclaimer.

As name says it will append HTML and Plain Text template disclaimer to all or only specific messages. The server side disclaimers are now here. With this release also simple html compose editor is included to make better experience with application.

At first I will show result from automatically added signature to the email. Below is a screenshot from Thunderbird mail client. I did sent message in html format, so milter could add html template. The grey "warning" part is my earlier created disclaimer.

Mail disclaimer added to HTML message

So, the most important thing is to create template which will be used as disclaimer. Editor can create HTML and Plain Text templates, they are used in messages in all formats. Compose editor support basic function to create html template, like: font family, font size, bold, italic, underline, text color and hyperlinks.

Signature Disclaimer template html and plain text compose editor

When signature template is ready with rule wizard we need to create an Add Disclaimer action. This action is simple and easy, no complex configuration is needed.

Setting disclaimer to outbound messages

After that, we need to define conditions. I'll use simple Message Sender requirement for this, but application provide a lot of different conditions and exceptions which can be used to determine is disclaimer should be appended or not. See full list of requirements.

If needed footer will be added to all emails 

The best way is to define requirement which will prevent from adding another disclaimer to the message - Message Keyword Searching exception.

Those simple three steps will take into action centralized disclaimers for your mail server. With different requirement many - even complex conditions can be achieved: add disclaimer only to specified users, only to outgoing messages, with attachments, from department, with special header - almost anything.

Try disclaimers for Sendmail and Postfix.


MSH Disclaimer & Signatures 1.0 released!

$
0
0

MSH Disclaimer & Signatures is a Postfix and Sendmail milter which add disclaimers to all types of messages: html, plain text, incoming, outgoing, per domain.

With administrative application you will create rich text disclaimers and signatures. Templates can be added based on sender, recipient, header, keyword or time range.

Compose templates editor

Add Disclaimers

Create server side, centralized disclaimers for all or only specified messages. Add signatures to outgoing emails and prevent from adding another one. Use built-in HTML and Plain Text compose editor to create rich text disclaimers.

Prevent duplicates

Skip adding another disclaimer if already present in message.

Disclaimer Compose Editor

Use simple WYSIWYG html and plain text editor to create rich text disclaimers.



Visit official website and improve your company emails.

How to forward certain emails to another mailbox

$
0
0
If you have scenario where you need to forward some messages based on something else than bare Postfix and Sendmail configuration, you need to use MSH Traffic Policy. It provide many conditions which can be used to match certain emails and skip those which not matters. Just a few what can be used:

  • Message sender, recipients and headers
  • Message recipients counts
  • Attachments name, type, size or count
  • Envelope sender and recipients
  • Based on message count


Simple step by step configuration

Create new rule clicking Add Rule button.

On Action tab click button Add and select Forward Message from many listed actions, see full list of actions.

When new window will open provide subject and recipient of forwarded message. In Subject field you can use advanced variables to distinguish message.

Now when action is defined go to Conditions tab and add Message Recipient condition. 

You can choose Wildcard or Regular expression pattern when matching message recipient. Search in option will let to match specified message headers: TO, CC, BCC.

Switch to Name tab and provide descriptive name for rule. Click OK button.

Now make sure you have enabled your new rule and click Save All button to persist settings. Now all emails which was originally sent to jake@server.local will be forwarded to dave@server.local.


Summary

This was simple configuration where messages could be forwarded based on specified domains, mailboxes, message header or event time range. 

Learn more about MSH Traffic Policy server side rules.
Viewing all 67 articles
Browse latest View live