header removal smtp.auth from ARC auth messages and X-Rspamd-Server header removal

484 views
Skip to first unread message

Sophie Loe

unread,
Jan 11, 2018, 8:05:49 AM1/11/18
to rspamd
Hi, 

I have smpt-auth headers that I would like to remove.  For example below shows smtp.auth=te...@example.co.uk. Can this be removed?
The same for : X-Rspamd-Server header.

ARC-Authentication-Results: i=1; auth=pass smtp.auth=te...@example.co.uk

smtp.mailfrom=te...@example.co.uk 

X-Rspamd-Server: mx10




My local.d/milter_headers.conf is,

use = ["x-spamd-bar", "x-spam-level", "DCC_BULK"];
extended_spam_headers = true;
skip_local = false;
skip_authenticated = false;
header = "X-Virus";
symbols = ["CLAM_VIRUS", "FPROT_VIRUS"];
routines {
header = "X-Spam-Level";
char = "*";
remove = 1;
header = "X-Spam-Status";
remove = 1;
header = "X-Virus";
remove = 1;
symbols = ["CLAM_VIRUS", "FPROT_VIRUS"];
}


Many thanks for any ideas.
S.

Andrew Lewis

unread,
Jan 11, 2018, 10:15:47 AM1/11/18
to rsp...@googlegroups.com

Hi,

> I have smpt-auth headers that I would like to remove. For example below
> shows smtp.auth=te...@example.co.uk. Can this be removed?
> The same for : X-Rspamd-Server header.

Yes, you could set something like:

routines {
authentication-results {
add_smtp_user = false;
}
}

... in local.d/milter_headers.conf.

https://rspamd.com/doc/modules/milter_headers.html#authentication-results

Best,
-AL.

Sophie Loe

unread,
Jan 11, 2018, 11:00:15 AM1/11/18
to Andrew Lewis, rsp...@googlegroups.com
Hi,

Sadly not. All of the headers remained.

ARC-Authentication-Results: i=1; auth=pass smtp.auth=te...@example.co.uk
smtp.mailfrom=te...@example.co.uk

Instead I tried with this, but also this had no effect.

headers {
"smtp.auth" = 1;
"X-Rspamd-Server" = 1;
}



Sophie
> --
> You received this message because you are subscribed to a topic in the Google Groups "rspamd" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/rspamd/29fKj2s0sYg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to rspamd+un...@googlegroups.com.
> Visit this group at https://groups.google.com/group/rspamd.

Andrew Lewis

unread,
Jan 11, 2018, 11:15:12 AM1/11/18
to rsp...@googlegroups.com
Hi,

> Sadly not. All of the headers remained.

It works for me. You already have routines {} in your config so you
need to put authentication-results {} inside there.

Best,
-AL.

Sophie Loe

unread,
Jan 11, 2018, 11:24:35 AM1/11/18
to Andrew Lewis, rsp...@googlegroups.com
Like this?

use = ["x-spamd-bar", "x-spam-level", "DCC_BULK"];
extended_spam_headers = true;
skip_local = false;
skip_authenticated = false;

routines {
header = "X-Spam-Level";
char = "*";
remove = 1;
header = "X-Spam-Status";
remove = 1;
header = "X-Virus";
remove = 1;
symbols = ["CLAM_VIRUS", "FPROT_VIRUS"];

authentication-results {
add_smtp_user = false; }

headers {
"smtp.auth" = 1;
"X-Rspamd-Server" = 1; }

}


Andrew Lewis

unread,
Jan 11, 2018, 11:32:55 AM1/11/18
to rsp...@googlegroups.com

Hi,

> Like this?

No.

routines {
x-spam-level {
header = "X-Spam-Level";
char = "*";
remove = 1;
}
x-spam-status {
header = "X-Spam-Status";
remove = 1;
}
x-virus {
header = "X-Virus";
remove = 1;
symbols = ["CLAM_VIRUS", "FPROT_VIRUS"];
}
authentication-results {
add_smtp_user = false;
}
}

Best,
-AL.

Andrew Lewis

unread,
Jan 11, 2018, 11:56:19 AM1/11/18
to rsp...@googlegroups.com

Hi,

>> Like this?
> No.

That's close enough actually, the key part of the configuration is not
broken there.

> use = ["x-spamd-bar", "x-spam-level", "DCC_BULK"];

"DCC_BULK" here is suspicious.

> headers {
> "smtp.auth" = 1;
> "X-Rspamd-Server" = 1; }

I don't know what its intention is.

Best,
-AL.

Sophie Loe

unread,
Jan 11, 2018, 4:26:20 PM1/11/18
to Andrew Lewis, rsp...@googlegroups.com
Oddly did not change any headers. The DCC_BULK was a failed attempt to have rspamd write the DCC headers into the mail. Unsure if any headers exist.


# grep -v ^$ /etc/rspamd/local.d/milter_headers.conf |grep -v ^#
use = ["x-spamd-bar", "x-spam-level", "DCC_BULK"];
extended_spam_headers = true;
skip_local = false;
skip_authenticated = false;
routines {
x-spam-level {
header = "X-Spam-Level";
char = "*";
remove = 1;
}
x-spam-status {
header = "X-Spam-Status";
remove = 1;
}
x-virus {
header = "X-Virus";
remove = 1;
symbols = ["CLAM_VIRUS", "FPROT_VIRUS"];
}
authentication-results {
add_smtp_user = false;
}
}





Andrew Lewis

unread,
Jan 11, 2018, 4:34:18 PM1/11/18
to rsp...@googlegroups.com

Hi,

> Oddly did not change any headers.

That's probably because this feature does not exist in rspamd 1.6- I
overlooked this- sorry about it.

Best,
-AL.

Sophie Loe

unread,
Jan 11, 2018, 4:36:59 PM1/11/18
to Andrew Lewis, rsp...@googlegroups.com

Ahhh :-)  


--
You received this message because you are subscribed to a topic in the Google Groups "rspamd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rspamd/29fKj2s0sYg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rspamd+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/rspamd.
--

Regards, Sophie

Sophie Loe

unread,
Jan 12, 2018, 4:31:52 AM1/12/18
to Andrew Lewis, rsp...@googlegroups.com
Which version does this feature appear in, and when will this be available? I found reference to version 1.6 on the rspamd site, but nothing later.

Kind regards, Sophie

Martin Bock

unread,
Mar 9, 2018, 11:20:11 AM3/9/18
to rspamd

Which version does this feature appear in, and when will this be available?  I found reference to version 1.6 on the rspamd site, but nothing later.
 
The feature got introduced in release 1.6.6, see https://github.com/vstakhov/rspamd/releases/tag/1.6.6
To patch an older version, I successfully used this commit: https://github.com/vstakhov/rspamd/commit/c5db86d4a0462047cd124501a44de98c84dfd5c7

Regards, Martin

Sophie Loe

unread,
Mar 9, 2018, 12:08:59 PM3/9/18
to rspamd
Hi,

I upgraded to v1.6.6 20 days ago, but the smtp user removal did not work for me:

Currently the emails have:
Authentication-Results: auth=pass smtp.mailfrom=te...@example.com



Inside local.d/milter_headers.conf

use = ["x-spamd-bar", "x-spam-level", "x-virus","authentication-results" ];
extended_spam_headers = true;
skip_local = false;
skip_authenticated = false;
routines {
 authentication-results {
   add_smtp_user = false;
 }
}

I’ve not tried to remove the ARC auth details, yet.


Sophie





Martin Bock

unread,
Mar 9, 2018, 4:21:29 PM3/9/18
to rspamd
Currently the emails have:
Authentication-Results: auth=pass smtp.mailfrom=te...@example.com

The add_smtp_user option actually removes smtp.auth=... from the authentication results header.
This means, a header with add_smtp_user = true will look like:
ARC-Authentication-Results: i=1; auth=pass smtp.auth=us...@example.com
	smtp.mailfrom=sende...@example.com
...while a header with add_smtp_user = false will look like:
ARC-Authentication-Results: i=1; auth=pass
	smtp.mailfrom=sende...@example.com

As you can see, smtp.auth gets stripped, but smtp.mailfrom does not.
Reply all
Reply to author
Forward
0 new messages