Discussion:
Misinterpretation of policy "action"
(too old to reply)
t***@kovarovi.org
2019-04-06 11:16:33 UTC
Permalink
In my postfix configuration, I am calling a policy service -
smtpd_recipient_restrictions = ... check_policy_service ... ...

If the policy service returns "action 550 bla bla bla", postfix smtpd sends "550 5.7.1 <***@yyy.com>: Recipient address rejected: bla bla bla", which is all right.

Now I have introduced some milters, thus just added these lines to postfix main.cf -

milter_protocol = 6
smtpd_milters = inet:localhost:11032,inet:localhost:13116
non_smtpd_milters = inet:localhost:11032,inet:localhost:13116

The milters are working properly, but now, after receiving the "action 550 bla bla" from the policy service, instead of returning the code 550 to the client, it sends now "450 4.7.1 <***@yyy.com>: Recipient address rejected: bla bla", thus suddenly converts the requested action code 550 to 450.

Removing the milter parameters from the config, the original proper behaviour (sending 550 5.7.1 ...) is restored.

This looks like a bug to me. Is there any possibility to have the proper behaviour even with the milters activated?

Thanks,
--- Tom
t***@kovarovi.org
2019-04-06 11:34:20 UTC
Permalink
Post by t***@kovarovi.org
In my postfix configuration, I am calling a policy service -
smtpd_recipient_restrictions = ... check_policy_service ... ...
Now I have introduced some milters, thus just added these lines to postfix main.cf -
milter_protocol = 6
smtpd_milters = inet:localhost:11032,inet:localhost:13116
non_smtpd_milters = inet:localhost:11032,inet:localhost:13116
Removing the milter parameters from the config, the original proper behaviour (sending 550 5.7.1 ...) is restored.
This looks like a bug to me. Is there any possibility to have the proper behaviour even with the milters activated?
Thanks,
--- Tom
... btw I am using postfix 3.3.1 on fedora 29, linux 4.18.12 x86_64
w***@gmail.com
2019-08-03 00:04:55 UTC
Permalink
The problem does not reproduce:

Postfix configuration:
% postconf smtpd_milters smtpd_recipient_restrictions
smtpd_milters = inet:127.0.0.1:9998, inet:127.0.0.1:9998
smtpd_recipient_restrictions = check_policy_service inet:localhost:9999

Postfix test milter:
% ./test-milter -d 1 -p inet:***@127.0.0.1
...

policy service:
% nc -l 9999
...
[empty line]
action=550 blah blah
[empty line]

SMTP session:
% telnet tail smtp
Trying 168.100.189.3...
Connected to tail.porcupine.org.
Escape character is '^]'.
220 tail.porcupine.org ESMTP Postfix
mail from:<>
250 2.1.0 Ok
rcpt to:<***@localhost>
550 5.7.1 <tail.porcupine.org[168.100.189.3]>: Recipient address rejected: blah
blah
quit
221 2.0.0 Bye
Connection closed by foreign host.

The Postfix SMTP server replies with 550, as expected.

Continue reading on narkive:
Loading...