[PATCH] relax SPF configuration on Postfix mode
2010-05-23 by Kouhei Sutou
Hi,
milter-greylist can't handle 'spf self' clause on Postfix
mode because Postfix doesn't support {if_addr} macro. If we
specify 'spf self' clause on Postfix mode, milter-greylist
exits with the following message:
spf self clause is broken on Postfix
It's OK.
milter-greylist can handle other SPF clauses such as 'spf
pass' on Postfix mode. But milter-greylist also exits with
those configurations with the above message.
It seems that milter-greylist should accept those SPF
clauses on Postfix mode.
Index: ./spf.c
--- ./spf.c
+++ ./spf.c
@@ -493,11 +493,13 @@
acl_data_t *ad;
void *data;
{
+ ad->spf_status = *(enum spf_status *)data;
#ifdef USE_POSTFIX
- mg_log(LOG_ERR, "spf self clause is broken on Postfix");
- exit(EX_DATAERR);
+ if (ad->spf_status == MGSPF_SELF) {
+ mg_log(LOG_ERR, "spf self clause is broken on Postfix");
+ exit(EX_DATAERR);
+ }
#endif
- ad->spf_status = *(enum spf_status *)data;
return;
}
Thanks,
--
kou