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 [...]

Mark

Reply via email to