Re: Different disclaimaer for each domain???
Hi Adri, You can add disclaimer in outgoing mails using altermime. Please follow the below instruction for configuring postfix with altermime. http://www.studioc.hu/doc/altermime/html/postfix-altermime-howto-2.html Regarding different disclaimer for each domain you can tweak the disclaimer script as below. --- #!/bin/sh # Localize these. INSPECT_DIR=/var/spool/filter SENDMAIL=/usr/sbin/sendmail ### Changed From Original Script ### ## Specify the domain names to which you want to append disclaimer domain1=example1.com domain2=example2.com domain3=example3.com ### Changed From Original Script END ### # Exit codes from sysexits.h EX_TEMPFAIL=75 EX_UNAVAILABLE=69 # Clean up when done or when aborting. trap rm -f in.$$ 0 1 2 3 15 # Start processing. cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; } cat in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; } ### Changed From Original Script to obtain From address # from_address=`grep -m 1 From: in.$$ | cut -d -f2 | cut -d -f1 | cut -d : -f2 | cut -d @ -f2` if [ $from_address == $domain1 ]; then /usr/bin/altermime --input=in.$$ \ --disclaimer=/etc/postfix/disclaimer1.txt \ --disclaimer-html=/etc/postfix/disclaimer1.txt \ --xheader=X-Copyrighted-Material: Please visit http://www.company1.com/privacy.htm; || \ { echo Message content rejected; exit $EX_UNAVAILABLE; } else if [ $from_address == $domain2 ]; then /usr/bin/altermime --input=in.$$ \ --disclaimer=/etc/postfix/disclaimer2.txt \ --disclaimer-html=/etc/postfix/disclaimer2.txt \ --xheader=X-Copyrighted-Material: Please visit http://www.company2.com/privacy.htm; || \ { echo Message content rejected; exit $EX_UNAVAILABLE; } else if [ $from_address == $domain3 ]; then /usr/bin/altermime --input=in.$$ \ --disclaimer=/etc/postfix/disclaimer3.txt \ --disclaimer-html=/etc/postfix/disclaimer3.txt \ --xheader=X-Copyrighted-Material: Please visit http://www.company3.com/privacy.htm; || \ { echo Message content rejected; exit $EX_UNAVAILABLE; } fi ### Changed from orginal script END $SENDMAIL $@ in.$$ exit $? --- Hi, Can I automagically attach a different disclaimer for each domain? if so, how? Are there different options? Adri -- Adrian P. van Bloois Postbus 2575 email: adr...@accu.uu.nl 3500 GN Utrecht voice: +31-(0)-30-68-94649 The Netherlands fax: +31-30-68-94649 The whole point of cooking is to get as much flavour out of the ingredients as possible. -- Delia Smith Rgds, Aravind M D
Re: Different disclaimaer for each domain???
* Aravind Divakaran aravind.divaka...@yukthi.com: $SENDMAIL $@ in.$$ That must be $SENDMAIL -i $@ in.$$ -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebra...@charite.de | http://www.charite.de
Re: Different disclaimaer for each domain???
* Aravind Divakaran aravind.divaka...@yukthi.com: $SENDMAIL $@ in.$$ That must be $SENDMAIL -i $@ in.$$ Yes we have to provide -i option since we are reading the data from the file. Rgds, Aravind M D
Re: Different disclaimaer for each domain???
On 17-Jul-2010, at 00:55, Aravind Divakaran wrote: ### Changed From Original Script to obtain From address # from_address=`grep -m 1 From: in.$$ | cut -d -f2 | cut -d -f1 | cut -d : -f2 | cut -d @ -f2` if [ $from_address == $domain1 ]; then Wouldn't it make more sense, logically, to have simply set disclaimer.txt based on the domain (maybe even with a case/esac block) and then have a single call altermime? It would certainly make adding more domains more strightforward. Minor point -- 'I thought we could do it without anyone getting hurt. By using our brains.' 'Can't. History don't work like that. Blood first, then brains.' 'Mountains of skulls,' said Truckle. 'There's got to be a better way than fighting,' said Mr Saveloy. 'Yep. Lots of 'em. Only none of 'em work.' --Interesting Times
Re: Different disclaimaer for each domain???
* El Thu, Jul 15, 2010 at 02:35:07PM +0200, escribiste: * Adrian P. van Bloois adr...@accu.uu.nl: Hi, Can I automagically attach a different disclaimer for each domain? if so, how? Are there different options? Which program is appending the single disclaimer now? None at al. :-) -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebra...@charite.de | http://www.charite.de -- Adrian P. van Bloois Postbus 2575 email: adr...@accu.uu.nl 3500 GN Utrecht voice: +31-(0)-30-68-94649 The Netherlands fax: +31-30-68-94649 The whole point of cooking is to get as much flavour out of the ingredients as possible. -- Delia Smith
Re: Different disclaimaer for each domain???
* Adrian P. van Bloois adr...@accu.uu.nl: Hi, Can I automagically attach a different disclaimer for each domain? if so, how? Are there different options? Which program is appending the single disclaimer now? -- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebra...@charite.de | http://www.charite.de