Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Simple content filtering example

450 views
Skip to first unread message

ja...@bjitbd.com

unread,
Jun 30, 2004, 7:13:25 AM6/30/04
to
Hi !
I have implemented the Simple content filter example which u posted in
the postfix user's group.

I am facing one more program.

I need to content checks of thouse emails which has bounced.

Have you any idea ?

Please help me.

Jahid
ja...@bjitbd.com


--=20
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

Victor....@morganstanley.com

unread,
Jun 30, 2004, 10:38:24 AM6/30/04
to
On Wed, 30 Jun 2004 ja...@bjitbd.com wrote:

> Hi !
> I have implemented the Simple content filter example which u posted in
> the postfix user's group.
>
> I am facing one more program.
>
> I need to content checks of thouse emails which has bounced.
>
> Have you any idea ?
>

Use two Postfix instances.

network ----> input Postfix ----> filter ---> output Postfix
/
/
local submission via sendmail ---------->--------

in the input Postfix don't use "content_filter", send *ALL* mail into the
filter via appropriate routing settings and have the filter forward mail
to the output Postfix instance. Use the Postfix that lives in /etc/postfix
as the "output Postfix", and the Postfix that lives in /etc/postfix-input
(for example) as the input Postfix.
network

This is easier and performs better with SMTP, but can be done with the
"simple filter" also, by using the "MAIL_CONFIG" environment variable when
invoking "sendmail" to reinject the mail:

input Postfix:

main.cf:

# Don't set this in main.cf, it is set from the location of main.cf
config_directory = /etc/postfix-input

# default empty content filter
content_filter =

# default empty transport maps
transport_maps =

# Send all mail to filter:
local_transport = filter:dummy
relay_transport = filter:dummy
virtual_transport = filter:dummy
default_transport = filter:dummy

master.cf:
filter .... pipe
... /some/script.sh

script.sh:
... generate filtered output ...
MAIL_CONFIG=/etc/postfix; export MAIL_CONFIG
/usr/lib/sendmail -i "$@" < ... filtered output ..
ret=$?
rm -f ... filtered output ...
exit $ret

output Postfix:

main.cf:

# Don't set this in main.cf, it is set from the location of main.cf
config_directory = /etc/postfix

... All the settings used other than content_filter

master.cf:
# Disable inbound smtp on port 25
#smtp inet ... smtpd

#optional for re-injection from advanced filter
127.0.0.1:25 inet ... smtpd

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majo...@postfix.org?body=unsubscribe%20postfix-users>

0 new messages