1 (edited by copart 2012-01-18 02:05:23)

Topic: SPF and Backup / Secondary MX

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: RedHat 5.0 (serverA) and 6.0 (serverB)
- iRedMail version and backend (LDAP/MySQL): LDAP 0.7.3
- Any related log? Log is helpful for troubleshooting.
====

I have two servers (serverA and serverB), both with iRedMail installed and configured.  I am using serverA as the main MX delivery point for all email (referenced in each domains DNS).  I then am using the "Relay/Transport Setting" feature in IRedAdmin-Pro to send email of certain domains to serverB. 

serverB is failing on all SPF lookups unless the email originated on a local domain.  For example, if a legit email from ISP is sent to one of my domains, serverA accepts the email.  ServerA sends the email to serverB.  serverB accepts the email, but the SPF lookup fails (spam score of 5).  I believe the SPF lookup is looking at the headers that serverA added to the email.  I do not want to disable SPF, is there a way to force SPF to look at the headers prior to serverA accepting the email, however, a lot of spam false positives are the result of this SPF fail.

Another question would be, how can I get the "Received-SPF" header added to an email, it will make the troubleshooting a little easier to know what server the SPF lookup was really done on.

Thank you,
Copart

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: SPF and Backup / Secondary MX

You need SRS, but it's not that easy to integrate with Postfix.
Reference:
- http://www.libsrs2.org/
- http://www.iredmail.org/forum/post12969.html#p12969

3

Re: SPF and Backup / Secondary MX

Since both servers are iRedMail I suspect that I am also doing double SPAM checks.  Since the secondary postfix is not sending it to the primary MX until it normally would do the dovecot delivery.  How can I pass the spam score from the secondary MX to the primary MX and not run another SPAM check.  Of course, if mail comes into the primary MX directly instead of coming in from the secondary, I would want to SPAM check that.  If I am able to do this, I think this will also solve the SPF issue.

4

Re: SPF and Backup / Secondary MX

I didn't configure iRedMail like this, but i guess you need these two Amavisd settings:

remove_existing_x_scanned_headers
remove_existing_spam_headers

Please do some research with Google first to make sure they're exactly what you want.