Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Contribution: regex rules for "bad" hostname patterns

2013-08-11 by Jim Klimov

On 2013-08-11 05:06, Jim Klimov wrote:
> By the way, is there any option and format string to set and report
> in "msg" clauses the "contact" address for this server's postmaster,
> so that collateral casualties might ask for them to be whitelisted?
> Probably it should be (automatically?) whitelisted as an RCPT rule.
> So far this example hardcodes "abuse@...
> <mailto:abuse%40domain.com>", but a macro would
> be a lot neater here ;)


I did not find anything like it, so rolled my own: '%c' format string
to substitute by the email address defined with the new 'contact_email'
keyword. This email is also added to the whitelist.

During my testing I found that Messaging Server post-processed messages
for abuse@, accepting them during SMTP dialog with the sender, and then
milter-greylist refused it during internal dialog between the MTA's
queue handlers which tried to deliver it further to admin@ mailbox.
I haven't seen such behavior with any other target addresses; so YMMV.
Things worked okay when I added this admin@... to rcpt whitelist
as well, so be sure to test your contact address with mails from all
sorts of sources that your deployment should not trust in production.

This worked for me with both a defined email address (any quoted string
actually - something that is not an email address is also happily added
to the rcpt whitelist), and with a missing keyword - at which point %c
substitution in msg texts is empty.

Again, I monkeyed around cloning existing lex code without any deeper
understanding of it, so there may be mistakes... still, this compiled
and worked for me as I expected :)

HTH,
//Jim Klimov

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.