I am using PostFix with Amavisd which includes SpamAssassin & ClamAV. I created a milter to help rate limit and minimize abuse, I added this milter in via the "smtpd_milters" option. I'm able to reject email with a 4xx or 5xx error with no issue, however when I attempt to issue a discard it shows up in the log but the email is still passed off to Amavis and scanned\logged. Here is a snippet of what shows up in the log: Aug 7 21:33:04 edgedev postfix/smtpd[13682]: connect from unknown[<redacted>] Aug 7 21:33:04 edgedev postfix/smtpd[13682]: NOQUEUE: milter-discard: MAIL from unknown[<redacted> ]: milter triggers DISCARD action; from=<root@<redacted> > proto=ESMTP helo=<<redacted> > Aug 7 21:33:04 edgedev amavis[3120]: process_request: fileno sock=12, STDIN=0, STDOUT=1

Ideally I'd like it to act just as if it was rejected and not pass the email along any further to save the overhead of scanning and logging. Any help or guidance into what I'm doing wrong would be greatly appreciated.

Thanks!

Reply via email to