> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:owner-postfix- > [EMAIL PROTECTED] On Behalf Of Mark Martinec > Sent: Thursday, October 23, 2008 6:24 PM > To: postfix-users@postfix.org > Subject: Re: Postfix - altermime - amavis - Too many hops > > Peter, > > > > >>> disclaimer unix - n n - - > pipe > > > >>> flags=Rq user=altermime argv=/etc/postfix/filter/disclaimer > -f > > > >>> ${sender} -- ${recipient} > > > >>> It leads to error: Too many hops , in the log there is loop. > > > >> so your filter is passing mail back to an smtpd that passes it > to > > > >> the same filter, and so on. > > > > >>> So the question is where can I put the > content_filter=disclaimer: > > > >>> work only for outgoing emails , into which smtpd process? > > Amavisd can call altermime directly for adding disclaimers, > it already knows how to distinguish inbound vs. outbound mail > (by matching recipients to @local_domains_maps, and mail source > to @mynetworks or 'originating' attribute). As you are already > using it, it would probably simplify setup to call altermime > from there. > > Search RELEASE_NOTES for: > - provided interface code to allow mangling/defanging/sanitation > to be performed by an external utility, either by [...] > **************************** > If I understood it correctly I have created: > > cat /etc/postfix/filter_outbound > /./ FILTER altermime:[127.0.0.1]:10587 > > cat /etc/postfix/filter_inbound > /./ FILTER smtp-amavis:[127.0.0.1]:10024 > > I have adjusted smtpd_sender_restrictions as you adviced and removed > content_filter = smtp-amavis:[127.0.0.1]:10024 from main.cf > > > Now I have in my master.cf: > .... > smtp-amavis unix - - n - 5 smtp > -o smtp_data_done_timeout=1200 > -o smtp_send_xforward_command=yes > -o disable_dns_lookups=yes > 127.0.0.1:10025 inet n - n - - smtpd > -o content_filter= > -o local_recipient_maps= > -o relay_recipient_maps= > ....... > > And where I can put the syntax for filter_outbound smtpd daemon in the > master.cf? > > I know that postfix cannot distinguished inbound or outbound traffic , > but I'm still using only one eth card. I've found some examples with 2 > smtpd instances but i'm not sure if it's right solution for me. > I just want to use altermime only for outgoing traffic > Thanks for your answe Mark, you're kind
I know about this opttion but the problem is that I'm using maia mailguread and it uses amavisd-new 2.3 and your features come from 2.5.x version Therefore I decided to do it on the postfix side through the filters. But I cannot understand how cannot distinguished the incoming and outcoming email oin the postfix if I kno that incoming emails must comes from the public address range while outgoing comes from 10.0.0.0/8 address range Thanks Br peter