Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-13 23:57 UTC

Message

Add 2 headers to message

2016-08-31 by Alvaro_Mar=c3=adn

Hi,

I've some rules to greylist "bad" IPs, and one last rule to add a header
with the IP and country code of senders:

racl whitelist default addheader "X-Mail-Country: IP: %i | Country: %C"

Runs fine, but now, I want to add the SPF test result, so I've compiled
milter-greylist to support it and I've added these lines:

racl continue spf pass addheader "X-Mail-AuthResults: %QS"
racl continue spf fail addheader "X-Mail-AuthResults: %QS"
racl continue spf softfail addheader "X-Mail-AuthResults: %QS"

so the file looks like:

...
racl greylist dnsrbl "RBL" delay 5m
racl continue spf pass addheader "X-Mail-AuthResults: %QS"
racl continue spf fail addheader "X-Mail-AuthResults: %QS"
racl continue spf softfail addheader "X-Mail-AuthResults: %QS"
racl whitelist default addheader "X-Mail-Country: IP: %i | Country: %C"

The problem is that only the last header (X-Mail-Country) is added. Logs:

milter-greylist: SPF return fail (test code 3, result 1)
milter-greylist: SPF lookup performed in 0.002375s
milter-greylist: Mail from=x@..., rcpt=x@...,
addr=X.X.X.X is matched by entry racl 659 continue spf fail [addheader
"X-Mail-AuthResults: %QS"] [maxpeek -1]
milter-greylist: Mail from=x@..., rcpt=x@...,
addr=X.X.X.X is matched by entry racl 661 whitelist [addheader
"X-Mail-Country: IP: %i | Country: %C"] [maxpeek -1] default

How can I do it? If I use whitelist instead of continue for the SPF
rule, the other one isn't added. Of course, I can use only one header to
mix all the data, but I prefer separated headers, if it's possible...

Thank you!
Regards,


-- 
Alvaro Mar\ufffdn Illera
Hostalia Internet
www.hostalia.com

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.