nik600 a écrit : > On Mon, Jan 4, 2010 at 11:26 PM, mouss <mo...@ml.netoyen.net> wrote: >> nik600 a écrit : >>> On Mon, Jan 4, 2010 at 12:52 PM, nik600 <nik...@gmail.com> wrote: >>>> Dear all >>>> >>>> i've installed a postfix server with mysql support. >>>> >>>> i've also set-up a custom filter script shell that calls spamc and >>>> some other custom utils, this script cannot handle multiple >>>> recipients, so i've set >>>> >>>> filter_destination_recipient_limit = 1 >>>> >>>> The problem that i've experienced is that when i've got an entry like >>>> this in the alias table: >>>> >>> I've also tried to change master.cf like: >>> >>> smtp inet n - n - - smtpd >>> -o content_filter=filter:dummy >>> -o receive_override_options=no_address_mappings >>> 9009 inet n - n - - smtpd >>> -o content_filter=filter:dummy >>> -o receive_override_options=no_address_mappings >>> >>> This fix the problem for the forward, but stops to apply custom spam >>> settings, infact in that case the filter is called only for >>> forwar...@foo.com and obviosly it doesn't load any custom spam option >>> of >>> >>> i...@foo.com >>> f...@yahoo.it >>> f...@libero.it >>> >>> Is it possible to avoid that? >>> >> if you want your filter to see rewritten addresses, remove the >> no_address_mappins option from before-the-filter smtpd listeners and put >> it in the after-the-filter smtpd listener(s). >> >> >> > Sorry I've read the documentation at > http://www.postfix.org/FILTER_README.html but i can't figure it out. > In my configuration i'm using the "Simple content filter" > configuration, wich call an external script that - at the end of the > filter - send the mail using the sendmail command. >
Then forget about what I said. you could do pickup .... -o receive_override_options=no_address_mappings but this applies to all mail submitted via the sendmail command, so it will break mail sent from the system (cron, ...) or from the console. consider using an smtp content filter instead. if all you want is to use spamassassin, then consider using amavisd-new or a milter. > I don't have any smptd listener after the filter, or have i to create one? > > You mean that my master.cf must be changed like this? > > > smtp inet n - n - - smtpd > -o content_filter=filter:dummy > filter unix - n n - 20 pipe > flags=Rq user=filter > argv=/var/programmi/script/filtra_spamc_1.6 -f ${sender} -- > ${recipient} ${sasl_username} > smtp inet n - n - - smtpd > -o content_filter=filter:dummy > -o receive_override_options=no_address_mappings > > No, you can't have two listeners listening on the same IP:port. > Thanks >