This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPF with greylisting problem

I have two ASL systems. One at home and one at work.

My home system at YYYYYY.com below has an SPF record in the DNS.

My work system at XXXXXXX.com below has an MX priority 10 record. Our ISP provides a backup mailserver at ZZZZZZZ.net below at priority 20 in case the local circuit goes down. This then relays to the MX 10 when the circuit is re-established.

What I have found is that some relays (ASL being one of them) will immediately send mail to the next level, 20 in this case, when they get a temporary reject due to greylisting. I don't know if this is RFC legal or not, but in any event it causes problems with SPF.

The two exim log records below show the first delivery attempt from my home to work system along with the greylist temporary reject. Two seconds later my backup MX try's to send the same mail and gets a permanent reject as its not allowed to send mail for YYYYYY.com as per my SPF record.

2004:12:04-13:04:20 (none) exim[18693]: 2004-12-04 13:04:20 H=adsl-99-999-99-999.dsl.xxxxxx.xxxxxxx.net (mail.YYYYYY.com) [99.999.99.999] F= temporarily rejected RCPT : Please try again

2004:12:04-13:04:22 (none) exim[18694]: 2004-12-04 13:04:22 H=front2.mail.ZZZZZZZ.net (fe.mail.ZZZZZZZ.net) [88.88.88.88] F= rejected RCPT : 88.88.88.88 is not allowed to send mail from this address or use this HELO string

Is a problem with my setup or is it a limitation of having SPF and greylisting activated together?

Trench


This thread was automatically locked due to age.
  • After a quick bit of Googleing about, I now understand that my ISP forwarder needs to implement SRS (Sender Rewriting Scheme) for SPF to work correctly.

    Trench
  • Trench,

    Greylisting only makes sense when both systems MX and backup MX support greylisting. Afaik it is standard conform that the remote mailer tries to deliver mail over the backup MX when the main MX fails (even if it fails with a temporary error).

    Greetings
    cyclops
  • Cyclops,

    I'm only running greylisting on my MX but this still gets rid of tons of spam. It looks like most of the non-compliant bulk mailers do not go to the backup MX on the temporary reject although some do. For those that do, the backup MX eventually delivers the spam which are still subject to the filters. I agree it makes sense for both to run greylisting but it appears there is still benefit if you don’t.

    Trench
  • OK, So my ISP has implemented SPF but I still have problems.

    Below are header lines from a bounced message forwarded to my ASL box from my ISP.

    Received: from [99.999.99.999] (HELO mail.YYYYYY.com)
      by fe.mail.ZZZZZZZ.net (CommuniGate Pro SMTP 4.2.5)
      with ESMTP-TLS id 16640103 for trench.hollow@XXXXXXX.com; Sun, 05 Dec 2004 22:25:23 -0800
    Received-SPF: pass
     receiver=fe.mail.ZZZZZZZ.net; client-ip=99.999.99.999; envelope-from=prvs=trench/0765ea15df@YYYYYY.com
    Received: from....

    ASL still rejected it with:

    2004:12:05-22:25:25 (none) exim[4535]: 2004-12-05 22:25:25 H=front1.mail.ZZZZZZZ.net (fe.mail.ZZZZZZZ.net) [88.88.88.88] F= rejected RCPT : 88.88.88.88 is not allowed to send mail from this address or use this HELO string

    As I understand it, the Received-SPF: pass and receiver= should have allowed this message to pass. Do you see a problem with this?

    Trench
  • What you need to do is to add your secondary MX server to your SPF records.  Why don't you post your actual domains so that we can actually tell what's going on?
  • That would only help if my secondary MX was sending mail on behalf of my domain which it is not. It is forwarding mail originating from another domain. I think there is enough information in the posting to see what is going on.

    YYYYYY.com is the sending domain
    XXXXXX.com is my receiving domain
    ZZZZZZ.net is my ISP's backup forwarder.

    Z received from Y
    Checked Y's SPF record and passed it
    Added the receiver line
    Forwarded to X
    X rejected it as "Z not allowed to send as Y"

    My question is why as the receiver= line should have allowed X to evaluate an SPF pass?

    Trench
  • i used this line in my zonefile and it works:

    ;-----------------------------------------------------------------------
    ; Spamprotection with SPF (spf.pobox.com)
    ;-----------------------------------------------------------------------
    mydomain.de. IN TXT "v=spf1 mx -all redirect=spf.pobox.com"
    ;-----------------------------------------------------------------------

    iicc both mx are included with this config.
  • synopex,

    you really use '-all', at this early stage of SPF I personally wouldn't be that hard and use '~all' (softfail).

    @ Trench: I agree many bulk mailers doesn't seem to use the backup MX - but believe me Spammers learn fast  

    Greetings
    cyclops
  • yes, its hard, but it must be! [;)]
    its not a company domain, only myselfs for testing and playing with this feature.