I am running Postfix with opendkim, rspamd, pypolicyd-spf, and DMARC. This is working fine for mail delivered directly to my domain. However, if my net connection goes down and mail gets queued by my backup MX at another domain (which I do not control), then when my connection comes back up and the MX relay attempts to redeliver all the queued mail, delivery fails due to SPF failures like this one, because the sender's domain has not authorized my mail relay to send mail on its behalf. Of course, I didn't *find out* about this problem until our uplink went down for two and a half days.
Remote host said: 550 5.7.23 <[email protected]>: Recipient address rejected: Message rejected due to: SPF fail - not authorized. Please see +http://www.openspf.net/Why?s=mfrom;[email protected];ip=96.53.88.246;r=<UNKNOWN> The failure is of course (in hindsight) because *our* backup MX relay is not SPF-authorized by the *sender's* domain to send mail on behalf of that domain, therefore it fails *my* SPF check and is rejected. I've added the MX relay to pypolicyd's HELO whitelist, but so far this does not seem to be solving the problem. Can anyone advise how I should best fix this? -- Phil Stracchino Babylon Communications [email protected] [email protected] Landline: +1.603.293.8485 Mobile: +1.603.998.6958
