jcbf/smf-spf

Header "Received-SPF: " is missing.

Closed this issue · 9 comments

ksuuk commented

Hi,

I used the original code v2.0.2 for a long time and now found this, v2.3.0, compiled and started it, but somehow headers in emails are gone, but the conf file is old and contains:

AddHeader on

How to fix it?

jcbf commented

Hi!

I'v changed the Header to the more standard Authentication-Results.
I can add an adicional config key to add, also the Received-SPF.
Do you think its worth it ?

ksuuk commented

Found, that old code uses "Received-SPF:", but new code uses "Authentication-Results:" but this is not documented in config, and config example is still "Build a standard Received-SPF: header".

However, I think that the word "Authentication" is misleading, as no authentication is done.

Changing the header name, via config file would be nice to have.

jcbf commented

Hehehe . There was ( and still is ) a long discussing about that wording but that's what is in the RFC 7601.

Anyway, I will update de documentation and config.

Note : I'm not the original author of the milter. I just added some public patches and did some bug fix and some enhancements.

ksuuk commented

Ok, but what was the reason for changing/shortening the header content?

New:
Authentication-Results: xxx.domain.com; spf=pass smtp.mailfrom=noreply@github.com smtp.helo=github-smtp2b-ext-cp1-prd.iad.github.net

Old:
Received-SPF: Pass (xxx.domain.com: domain of bounce-mc.us11_46716125.696461-xxx=domain.com@mcmail.github.com
designates 198.2.131.14 as permitted sender)
receiver=xxx.domain.com; client-ip=198.2.131.14;
envelope-from=bounce-mc.us11_46716125.696461-xxx=domain.com@mcmail.github.com; helo=mcmail.github.com;

Old is maybe too long, but new is maybe too short, and the result "spf=pass" is in not the first word, so I have to search for it. So, maybe something like (no need for extra word smtp as this is the smtp traffic):

Authentication-Results: spf=pass; receiver=xxx.domain.com; mailfrom=noreply@github.com; helo=github-smtp2b-ext-cp1-prd.iad.github.net;

ksuuk commented

Anyway, the old code segfaults was for me the main reason to test this version. I can change the header in smf-spf.c directly according to my needs. So thanks for keeping this code alive.

jcbf commented

@ksuuk , check if PR #32 works for you.

ksuuk commented

Tested and works fine, thanks.

jcbf commented

Great.

I'll keep this open until I add some tests. That won't happen in the next week.

Additionally, I'll add an option to remove all Received-SPF headers.
One advantage of Authentication-Results over Received-SPF is that the hostname of the servers that make the evaluation. This will be more relevant when ARC become a standard.

jcbf commented

Closing this issue