You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David Bürgin <db...@gluet.ch> on 2021/07/30 19:13:43 UTC

Customise hostname shown in X-Spam-Checker-Version?

Is there a way to customise the hostname shown in the line:

X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on somehost.someprovider.com

So that it reads:

X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.mydomain.ch

I understand that I could change the hostname of the host itself, but I
would prefer not to do that. (The host might be used for other things
than mail, I may not want to have a mail domain as the hostname.)

Other mail software that I use does have such settings. For example,
Postfix will use its ‘myhostname’ setting when generating the Received
header. The milters that I use also have similar settings or will fall
back to the hostname setting from Postfix.

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by "Kevin A. McGrail" <km...@apache.org>.
Patches always appreciated

On 7/30/2021 4:21 PM, David Bürgin wrote:
> David Bürgin:
>> Resolved. Perhaps the documentation should be updated.
>
> There are notes for options ‘remove_header’ and ‘clear_headers’ that
> ‘X-Spam-Checker-Version is not removable’, so a straightforward fix to
> the documentation would be replacing sentence
>
> note that Checker-Version can not be changed or removed
>
> with
>
> note that Checker-Version can not be removed
>
> Cheers,
> David

-- 
Kevin A. McGrail
KMcGrail@Apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by David B Funk <db...@engineering.uiowa.edu>.
On Fri, 30 Jul 2021, David Bürgin wrote:

> David Bürgin:
>> Resolved. Perhaps the documentation should be updated.
>
> There are notes for options ‘remove_header’ and ‘clear_headers’ that
> ‘X-Spam-Checker-Version is not removable’, so a straightforward fix to
> the documentation would be replacing sentence
>
> note that Checker-Version can not be changed or removed
>
> with
>
> note that Checker-Version can not be removed

More to the point:
  the X-Spam-Checker-Version header is not removable and the Version-number 
WITHIN the header is not changeable, the rest of the header is customizable.



-- 
Dave Funk                               University of Iowa
<dbfunk (at) engineering.uiowa.edu>     College of Engineering
319/335-5751   FAX: 319/384-0549        1256 Seamans Center, 103 S Capitol St.
Sys_admin/Postmaster/cell_admin         Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by David Bürgin <db...@gluet.ch>.
David Bürgin:
> Resolved. Perhaps the documentation should be updated.

There are notes for options ‘remove_header’ and ‘clear_headers’ that
‘X-Spam-Checker-Version is not removable’, so a straightforward fix to
the documentation would be replacing sentence

note that Checker-Version can not be changed or removed

with

note that Checker-Version can not be removed

Cheers,
David

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by Benny Pedersen <me...@junc.eu>.
On 2021-07-30 21:50, David Bürgin wrote:

> Resolved. Perhaps the documentation should be updated.

perldoc Mail::SpamAssassin::Conf ?

sometimes i wish there was a way to compile default settings output for 
debug and helpfull info to know what could be changed, but many things 
is hidded in source code already

your solutuion is incorrect since it add one more custom header, not 
changing the template std

see my previous mail

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by Antony Stone <An...@spamassassin.open.source.it>.
On Saturday 31 July 2021 at 21:02:12, David Bürgin wrote:

> > add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on
> > mail.mydomain.ch

> > X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
> > mail.mydomain.ch
> 
> A final remark: This solution has a side effect. It changes the order of
> inserted headers so that X-Spam-Checker-Version is now the last instead
> of the first X-Spam- header … … all right then.

Maybe any "added" headers always go at the end, and anything they replace 
simply gets deleted from where it otherwise would have been?


Antony.

-- 
Don't procrastinate - put it off until tomorrow.

                                                   Please reply to the list;
                                                         please *don't* CC me.

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by David Bürgin <db...@gluet.ch>.
David Bürgin:
> I should have just tried before asking! Thank you. This works:
> 
> add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on mail.mydomain.ch
> 
> And voilà:
> 
> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.mydomain.ch

A final remark: This solution has a side effect. It changes the order of
inserted headers so that X-Spam-Checker-Version is now the last instead
of the first X-Spam- header … … all right then.

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by David Bürgin <db...@gluet.ch>.
Antony Stone:
> On Friday 30 July 2021 at 21:13:43, David Bürgin wrote:
> 
> > Is there a way to customise the hostname shown in the line:
> > 
> > X-Spam-Checker-Version:
> 
> No.
> 
> https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Conf.html
> #BASIC-MESSAGE-TAGGING-OPTIONS
> 
> "Here are some examples (these are the defaults, note that Checker-Version can 
> not be changed or removed)"

I should have just tried before asking! Thank you. This works:

add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on mail.mydomain.ch

And voilà:

X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.mydomain.ch

Resolved. Perhaps the documentation should be updated.

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by Antony Stone <An...@spamassassin.open.source.it>.
On Friday 30 July 2021 at 21:13:43, David Bürgin wrote:

> Is there a way to customise the hostname shown in the line:
> 
> X-Spam-Checker-Version:

No.

https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Conf.html
#BASIC-MESSAGE-TAGGING-OPTIONS

"Here are some examples (these are the defaults, note that Checker-Version can 
not be changed or removed)"

Antony.

-- 
"If I've told you once, I've told you a million times - stop exaggerating!"

                                                   Please reply to the list;
                                                         please *don't* CC me.

Re: Customise hostname shown in X-Spam-Checker-Version?

Posted by Benny Pedersen <me...@junc.eu>.
On 2021-07-30 21:13, David Bürgin wrote:
> Is there a way to customise the hostname shown in the line:

# in local.cf add


report_contact abuse@example.org
report_hostname example.org
report_safe 0
report_safe_copy_headers Return-Path

clear_report_template
report ""
if can(Mail::SpamAssassin::Conf::feature_yesno_takes_args)
report Spam detection software, running on the system "_HOSTNAME_",
report has_YESNO(, NOT)_ identified this incoming email as_YESNO( 
possible,)_ spam. The original
report message has been attached to this so you can view it or label
else
report Spam detection software, running on the system "_HOSTNAME_", has
report identified this incoming email as possible spam. The original 
message
report has been attached to this so you can view it (if it isn't spam) 
or label
endif
report similar future email. If you have any questions, send this to
report _CONTACTADDRESS_ for details.
report
report Content preview:  _PREVIEW_
report
report Content analysis details:   (_SCORE_ points, _REQD_ required)
report
report " pts rule name              description"
report  ---- ---------------------- 
--------------------------------------------------
report _SUMMARY_
report ""

clear_unsafe_report_template
unsafe_report ""
unsafe_report The original message was not completely plain text, and 
may be unsafe to
unsafe_report open with some email clients; in particular, it may 
contain a virus,
unsafe_report or confirm that your address can receive spam.  If you 
wish to view
unsafe_report it, it may be safer to save it to a file and open it with 
an editor.
unsafe_report ""

# end of file

change it as needed