Menu

Unmatched policyd-spf messages

2018-08-14
2019-01-21
  • Steve Valliere

    Steve Valliere - 2018-08-14

    I run a VERY small mail server (only about 10 users) and I have 194 unmatched messages from policyd-spf listed in the Unmatched Entries section of the postfix part of this morning's logwatch report. These messages started to appear after I upgraded my server from Ubuntu 16.04.5 to 18.04.1. Interestingly, this is an old bug (at least in RedHat) from about 1.5 years ago: https://bugzilla.redhat.com/show_bug.cgi?id=1419274

    For reference, here are examples of each of the different "types" of messages I found in the list (with the IP, users and domains sanitized):

    **Unmatched Entries**
      1   Aug 13 10:32:46 mail policyd-spf[44597]: prepend Received-SPF: None (mailfrom) identity=mailfrom; client-ip=xxx.xx.xxx.xxx; helo=mail.example.com; envelope-from=user@example.com; receiver=<UNKNOWN>
      1   Aug 13 07:29:02 mail policyd-spf[15608]: prepend Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=xx.xxx.xxx.xxx; helo=mail.example.com; envelope-from=user@example.com; receiver=<UNKNOWN>
      1   Aug 13 15:02:03 mail policyd-spf[21933]: prepend Received-SPF: Permerror (mailfrom) identity=mailfrom; client-ip=xxx.xx.xx.xxx; helo=mail.example.com; envelope-from=user@example.com; receiver=<UNKNOWN>
      1   Aug 13 04:40:36 mail policyd-spf[54627]: 550 5.7.23 Message rejected due to: domain owner discourages use of this host. Please see http://www.openspf.net/Why?s=helo;id=correctemails.com;ip=xxx.xxx.xxx.xx;r=<U NKNOWN>
      1   Aug 13 15:58:43 mail policyd-spf[31131]: prepend Received-SPF: Pass (helo) identity=helo; client-ip=xxx.xx.xx.xx; helo=mail.example.com; envelope-from=user@example.com; receiver=<UNKNOWN>
    

    I'm wondering why this "broke" in the Ubuntu upgrade when the message format changed more than 18 months earlier.

     
  • Bjorn

    Bjorn - 2018-12-23

    Would it be simpler to use the perl non-capture operator (?:) ? The patch with respect to the repository's copy would be the attached file. I don't have the means to test it, though.

     
  • Derek Chen-Becker

    Thanks, I forgot about non-capturing groups. I tested and that works.

     
  • Bjorn

    Bjorn - 2019-01-21

    Thanks; it has been rolled into the repository.

     

Log in to post a comment.