How To Automatically Add A Disclaimer To Outgoing Emails With alterMIME (Postfix On Debian Etch)
How To Automatically Add A Disclaimer To Outgoing Emails With alterMIME (Postfix On Debian Etch)Version 1.0 This tutorial shows how to install and use alterMIME. alterMIME is a tool that can automatically add a disclaimer to emails. In this article I will explain how to install it as a Postfix filter on Debian Etch. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm assuming that Postfix is already installed and fully functional - I will not explain how to set up Postfix and configure email accounts in this tutorial.
2 Installing alterMIMEalterMIME can be installed as follows: apt-get install altermime Next we create the user filter with the home directory /var/spool/filter filter - alterMIME will be run as that user: useradd -r -c "Postfix Filters" -d /var/spool/filter filter Afterwards we create the script /etc/postfix/disclaimer which executes alterMIME. Debian's alterMIME package comes with a sample script that we can simply copy to /etc/postfix/disclaimer: cp /usr/share/doc/altermime/examples/postfix_filter.sh /etc/postfix/disclaimer Now the problem with this script is that it doesn't distinguish between incoming and outgoing emails - it simply adds a disclaimer to all mails. Typically you want disclaimers only for outgoing emails, and even then not for all sender addresses. Therefore I've modified the /etc/postfix/disclaimer script a little bit - we'll come to that in a minute. Right now, we create the file /etc/postfix/disclaimer_addresses which holds all sender email addresses (one per line) for which alterMIME should add a disclaimer: vi /etc/postfix/disclaimer_addresses
Now we open /etc/postfix/disclaimer and modify it as follows (I have marked the parts that I've changed): vi /etc/postfix/disclaimer
Next we need the text file /etc/postfix/disclaimer.txt which holds our disclaimer text. Debian's alterMIME package comes with a sample text that we can use for now (of course, you can modify it if you like): cp /usr/share/doc/altermime/examples/disclaimer.txt /etc/postfix/disclaimer.txt Finally we have to tell Postfix that it should use the /etc/postfix/disclaimer script to add disclaimers to outgoing emails. Open /etc/postfix/master.cf and add -o content_filter=dfilt: to the smtp line: vi /etc/postfix/master.cf
At the end of the same file, add the following two lines:
Restart Postfix afterwards: /etc/init.d/postfix restart That's it! Now a disclaimer should be added to outgoing emails sent from the addresses listed in /etc/postfix/disclaimer_addresses.
3 Links
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com







Recent comments
15 hours 20 min ago
16 hours 49 min ago
20 hours 23 min ago
23 hours 17 min ago
1 day 2 hours ago
1 day 2 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 5 hours ago
1 day 5 hours ago