[postfix] add footer or header to every outgoing and incoming message

| | Comments (0)

edit master.cf

smtp inet n n n - - smtpd
-o content_filter=filter:
filter unix - n n - - pipe
flags=Rq user=filter argv=/path/mailfilter.sh ${sender} ${recipient}

edit /path/mailfilter
# file mailfilter.sh
# this sample script add http://pank.org at the bottom of message
TEMP=/tmp/temp-$$.eml
cat > $TEMP
RCPT=`echo $@ | cut -d' ' -f2-`
{
cat $TEMP
echo -e "\n--\nhttp://pank.org\n"
} | $SENDMAIL -i $RCPT
rm $TEMP

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on August 27, 2004 11:02 AM.

DOS box under Windows 2K/XP was the previous entry in this blog.

Flying Car is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.