pypolicyd-spf checks work if Header_Type=SPF. If =AR, postfix warning "premature end-of-input" and can't receive mail

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

pypolicyd-spf checks work if Header_Type=SPF. If =AR, postfix warning "premature end-of-input" and can't receive mail

jasonsu
I'm pretty sure this is a pypolicyd issue, not Postfix, but asking here just in case someone's seen it already.

I've moved my Postfix SPF checks out of Amavisd/Spamassassin to pypolicyd-spf.

It works as expected, when I use "Header_Type=SPF" in the config.  When I switch ONLY the "Header_Type=AR", I can't received email anymore, with logs reporting

Apr  3 11:22:59 mail01 postfix/psint/smtpd[7394]: warning: premature end-of-input on private/policyd-spf while reading input attribute name

I've posted more detail in a bug report upstream

python-policyd-spf 1.3.2 + postix 3.1.0, Header_Type=SPF works, but Header_Type=AR FAILs
https://bugs.launchpad.net/pypolicyd-spf/+bug/1566561

but if anybody here has seen it, or has any ideas, I'd appreciate hearing about it.

Thanks

Jason
Reply | Threaded
Open this post in threaded view
|

Re: pypolicyd-spf checks work if Header_Type=SPF. If =AR, postfix warning "premature end-of-input" and can't receive mail

Noel Jones-2
On 4/5/2016 6:05 PM, [hidden email] wrote:

> I'm pretty sure this is a pypolicyd issue, not Postfix, but asking here just in case someone's seen it already.
>
> I've moved my Postfix SPF checks out of Amavisd/Spamassassin to pypolicyd-spf.
>
> It works as expected, when I use "Header_Type=SPF" in the config.  When I switch ONLY the "Header_Type=AR", I can't received email anymore, with logs reporting
>
> Apr  3 11:22:59 mail01 postfix/psint/smtpd[7394]: warning: premature end-of-input on private/policyd-spf while reading input attribute name
>
> I've posted more detail in a bug report upstream
>
> python-policyd-spf 1.3.2 + postix 3.1.0, Header_Type=SPF works, but Header_Type=AR FAILs
> https://bugs.launchpad.net/pypolicyd-spf/+bug/1566561
>
> but if anybody here has seen it, or has any ideas, I'd appreciate hearing about it.
>
> Thanks
>
> Jason
>

This is almost certainly an issue with your policy service.  The
"premature end-of-input" means the policy service crashed.

You can try running the policy service by hand (feed it input with
telnet or nc or similar, rather than postfix) and/or enable any
debug logging in the policy service.

But that's about all the help we can offer here.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: pypolicyd-spf checks work if Header_Type=SPF. If =AR, postfix warning "premature end-of-input" and can't receive mail

Scott Kitterman-4
On Tuesday, April 05, 2016 08:10:26 PM Noel Jones wrote:

> On 4/5/2016 6:05 PM, [hidden email] wrote:
> > I'm pretty sure this is a pypolicyd issue, not Postfix, but asking here
> > just in case someone's seen it already.
> >
> > I've moved my Postfix SPF checks out of Amavisd/Spamassassin to
> > pypolicyd-spf.
> >
> > It works as expected, when I use "Header_Type=SPF" in the config.  When I
> > switch ONLY the "Header_Type=AR", I can't received email anymore, with
> > logs reporting
> >
> > Apr  3 11:22:59 mail01 postfix/psint/smtpd[7394]: warning: premature
> > end-of-input on private/policyd-spf while reading input attribute name
> >
> > I've posted more detail in a bug report upstream
> >
> > python-policyd-spf 1.3.2 + postix 3.1.0, Header_Type=SPF works, but
> > Header_Type=AR FAILs
> > https://bugs.launchpad.net/pypolicyd-spf/+bug/1566561
> >
> > but if anybody here has seen it, or has any ideas, I'd appreciate hearing
> > about it.
> >
> > Thanks
> >
> > Jason
>
> This is almost certainly an issue with your policy service.  The
> "premature end-of-input" means the policy service crashed.
>
> You can try running the policy service by hand (feed it input with
> telnet or nc or similar, rather than postfix) and/or enable any
> debug logging in the policy service.
>
> But that's about all the help we can offer here.

I'm pretty sure it's a local configuration error. I'll address it in the
upstream bug.

Scott K
Reply | Threaded
Open this post in threaded view
|

[solved] Re: pypolicyd-spf checks work if Header_Type=SPF. If =AR, postfix warning "premature end-of-input" and can't receive mail

jasonsu


On Tue, Apr 5, 2016, at 07:09 PM, Scott Kitterman wrote:
> I'm pretty sure it's a local configuration error. I'll address it in the
> upstream bug.

just fyi, it took a few steps, but it's solved & working.

See https://bugs.launchpad.net/pypolicyd-spf/+bug/1566561/comments/13

In summary I

  rm'd any trace of distro-pkgs
  made sure that the policyd-spf install & postfix spawn are fully consistent using python3
  realized that amavisd clobbers all existing/upstream AR headers if the authserv-Id is NOT different.  so I set each step (SPF, DKIM, DMARC) with unique authser_id's.

now there's

no more crash
the SPF scan is done as expected
AR header's correctly populated in rec'd mail