OK, it looks like it is a limitation of Postfix:
"This generally works as expected, with only one exception: non-SMTP filters must not REJECT or TEMPFAIL simulated RCPT TO commands. When a non_smtpd_milters application REJECTs or TEMPFAILs a recipient, Postfix will report a configuration error, and mail will stay in the queue."
Here: http://www.postfix.org/MILTER_README.html
Basically we cannot just reject the emails send via the local sendmail program. We could only add something to the header of the message, like the maximum spam score (I don't know if this is possible with milter-greylist) and then somehow set Postfix to drop all outgoing messages with high spam score before accepting them to the queue (the cleanup process)... any ideas?
Basically we cannot just reject the emails send via the local sendmail program. We could only add something to the header of the message, like the maximum spam score (I don't know if this is possible with milter-greylist) and then somehow set Postfix to drop all outgoing messages with high spam score before accepting them to the queue (the cleanup process)... any ideas?
Georgi
On Wed, Nov 26, 2014 at 4:14 PM, Georgi Petrov <georgi.petrov@...> wrote:
Well, here is the same with racl blacklist:milter-greylist: ratelimit overflow for class outgoing_mail_limit: 13, limit is 3 recipients / 300 sec, key = "user@..."milter-greylist: 4534E1E2D7E: addr localhost[127.0.0.1] from user@server.domain.com to otheruser@... blacklisted (ACL 157)postfix/cleanup[3021]: 4534E1E2D7E: milter-reject: RCPT from localhost[127.0.0.1]: 5.7.1 Message quota exceeded; from=<user@server.domain.com> to=<otheruser@...>postfix/cleanup[3021]: warning: 4534E1E2D7E: milter configuration error: can't reject recipient in non-smtpd(8) submissionpostfix/cleanup[3021]: warning: 4534E1E2D7E: deferring delivery of this messageThe message is deferred and not rejected again, also the messages stay in the queue forever (if we use greylist the messages are sent when the user drops under the limit).GeorgiOn Wed, Nov 26, 2014 at 12:27 PM, Emmanuel Dreyfus manu@... [milter-greylist] <milter-greylist@yahoogroups.com> wrote:On Wed, Nov 26, 2014 at 12:15:47PM +0200, Georgi Petrov georgi.petrov@... [milter-greylist] wrote:
> Is there a way we can reject or drop instead of deferring any message over
> the queue even for non smtpd submission (when sent through PHP mail or
> local sendmail)?
Why don't you use racl blacklist for rate limit?
--
Emmanuel Dreyfus
manu@...