Thanks Wietse. Adding the rule on the 1st line makes it work.
Just to make sure, I'm assuming that returning only a header addition neither
accepts or rejects, so I'm not creating an open relay.
Thanks,
Omar
On 3/27/2016 10:27 AM, Wietse Venema wrote:
Omar Eljumaily:
Hi, I'm trying to set up a simple policy server described here:
http://www.postfix.org/SMTPD_POLICY_README.html#client_config
I've written a simple server in c++, and have also tried numerous
examples written in Perl, and still can't get it to work. My logs
suggest that the server is never being called.
Here's my setup in main.cf. The server I'm testing is the one with
inet:127.0.0.1:3001. The greylist server works already, but I want to
add another one.
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_rbl_client zen.spamhaus.org,
# reject_rbl_client xbl.spamhaus.org,
check_policy_service inet:127.0.0.1:3001,
...stuff omitted...
With the above, the policy service is NEVER called if the client
IP address matches mynetworks, or if the client has authenticated
with SASL.
To test if the service is called, run netcat instead of your server:
$ nc -l 3001
This should show a bunch of Postfix attributes, assuming that the
the client IP address does not match mynetworks, and that the client
has not authenticated with SASL. The Postfix SMTP server will be waiting
for a policy response.
Wietse