On 8/26/2010 9:05 AM, Stan Hoeppner wrote:
Noel Jones put forth on 8/25/2010 10:11 PM:
In that case, don't use an access table with FILTER; use content_filter
or smtpd_proxy_filter to filter all mail.
(For wildcard access tables, use a regexp table. But for this
application, use content_filter.)
Let me try to make this really simple as I think we got way off track
due to the length and detail of my first post.
This is what I want to accomplish, using SA. From:
http://www.postfix.org/FILTER_README.html
"FILTER actions in access or header/body tables
The above filtering configurations are static. Mail that follows a given
path is either always filtered or it is never filtered. As of Postfix
2.0 you can also turn on content filtering on the fly.
To turn on content filtering with an access(5) table rule:
/etc/postfix/access:
whatever FILTER foo:bar"
What I need are the values for "whatever, "foo", and "bar". I can
figure out "whatever", and "foo" is "smtp". What I don't know is the
value for "bar". That is really what I need here. I also need to know
what the master.cf entry for a second smtpd process for reinjection
needs to look like, specifically with no restrictions. I should be able
to get the rest of what I need from the SA site.
Has no one on postfix-users ever actually implemented Wietse's example
of selective content filtering using access lists?
As long as you describe what you want in general terms, you
get a general answer. Of course people use FILTER, but no one
knows what the dickens you're talking about.
You would save yourself a lot of time if you just at least
READ the amavisd-new install docs, which gives good examples
of how to set stuff up.
In foo:bar, foo is the master.cf transport name; bar is the
transport-specific next hop.
For an SMTP based filter, normally one makes a copy of the
stock "smtp" transport with connection-specific options. A
basic example might be
myfilter unix - - n - 4 smtp
-o smtp_data_done_timeout=600s
-o smtp_send_xforward_command=yes
-o syslog_name=postfix-myfilter
If your filter is listening on 127.0.0.1:10024, your FILTER
statement would be FILTER myfilter:[127.0.0.1]:10024
In the case of pipe based transports, bar is "dummy", so using
a master.cf sample entry:
bsmtp unix - n n - - pipe
flags=Fq. user=foo
argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
you would use FILTER bsmtp:dummy and the command given as
argv gets the message as standard input, with the specified
command line arguments.
-- Noel Jones