alterMIME is a small program which is used to alter your mime-encoded mailpacks as typically received by Inflex, Xamime and AMaViS.
What can alterMIME do?
Insert disclaimers
Insert arbitary X-headers
Modify existing headers
Remove attachments based on filename or content-type
Replace attachments based on filename
Installing alterMIME in debian
Use the following command to install altermime
#aptitude install altermime
This will complete the installation.
Configure altermime
Next we need to 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
#mkdir /var/spool/filter
#chown filter:filter /var/spool/filter
#chmod 750 /var/spool/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
#chgrp filter /etc/postfix/disclaimer
#chmod 750 /etc/postfix/disclaimer
Now we need to add disclaimer to only outgoing email
we create the file /etc/postfix/disclaimer_emails which holds all sender email addresses (one per line) for which alterMIME should add a disclaimer
#vi /etc/postfix/disclaimer_emails
admin@domain.com
user1@domain.org
Save and exit the file
Now we open /etc/postfix/disclaimer and modify some configuration you can check this file
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
#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
# # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master"). # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ==========================================================================
smtp inet n -- -- -- -- smtpd
-o content_filter=dfilt: [...]
at the end of the file add the following lines
[...]
dfilt unix -- n n -- -- pipe
flags=Rq user=filter argv=/etc/postfix/disclaimer -f ${sender} -- ${recipient}
Save and exit the file.
Now you need to restart the postfix mail server using the following command
#/etc/init.d/postfix restart
Incoming search terms:
- postfix disclaimer (79)
- how to add disclaimer in outlook 2007 (35)
- postfix add disclaimer (22)
- disclaimer postfix (19)
- postfix disclaimer add (17)
- postfix filter outgoing mail (15)
- postfix add disclaimer outgoing (11)
- how to configure disclaimer in postfix (11)
- postfix add text and signature to outgoing (3)
- postfix add disclaimer to outgoing email (3)
-
http://malec.id.au Andrew
-
Simjith
-
Joe
-
http://internexo.com diego
-
http://fathur.net fathur
-
Kizito Thomas
-
Nicolas JEANNE
