Mailing List Archive

Character encoding in Report Templates
Hi!


I am very new to SpamAssassin and I can not get the following to work:


I am trying to use the swedish characters ??? in the report template I have set up in my SpamAssasin instances.

I have tried using the ASCII-tables described here<https://cwiki.apache.org/confluence/display/SPAMASSASSIN/WritingRulesAdvanced> but the only thing that shows is the following below.


We have a combined enviroment with two SMTP relays running SUSE Linux Enterprise for outgoing mail from Exchange and two other SUSE servers acting spamguards for Exchange.

The version of SA is 3.4.2


All the other ordinary messages works fine with these encodings.


Excerpts of different config outputs I've tried:


Spam programvaran /p(?:\xfc|\xc3\xa5)/ "xxxx"


Spam programvaran p(?:\xfc|\xc3\xa5) "xxxx"



Excerpts of how the mail looks without tried configs:

Content type: Unchecked
Internal reference code for the message is xxxx

First upstream SMTP client IP address: xxxxx
Received from: xxxxxx

Return-Path: <xxxx>
From: xxxx <xxxx>
Message-ID:
xxxx

The message WILL BE relayed to:
<xxxxx>

Spam scanner report:
Spam programvaran på "xxxx"
har identifierat detta meddelande som potentiellt SPAM(Skräppost). Orginalmeddelandet
finns bifogat som en bilaga så att du i din e-post klient kan markera detta som skräppost om du vill.
Om du har frågor ring till Servicedesk xxxx eller e-posta

xxxx .

Förhandsgranskning av innehåll: xxxx

Information om innehållsanalys: (7.9 points, 5.0 required)

Regel Beskrivning
---- ---------------------- --------------------------------------------------
xxxx



V?nliga h?lsningar


Tim Wetterek Andersson

Teknikansvarig
Serverdrift, Digitaliseringsavdelningen
Norrk?pings kommun

Telefon: +4611156418
tim.andersson@norrkoping.se
www.norrkoping.se<http://www.norrkoping.se/>

[X]


All e-post som skickas till Norrk?pings kommun ?r allm?n handling.
Norrk?pings kommun hanterar dina personuppgifter enligt dataskyddsf?rordningen (GDPR).
F?r mer information se http://www.norrkoping.se/dataskyddsforordningen---gdpr.html
Re: Character encoding in Report Templates [ In reply to ]
On Tue, 22 Sep 2020, Tim Wetterek Andersson wrote:

> I am very new to SpamAssassin and I can not get the following to work:
>
> I am trying to use the swedish characters ??? in the report template I have set up in my SpamAssasin instances.

FYI, QP encodes that as: the swedish characters =E5=E4=F6

> I have tried using the ASCII-tables described here
> <https://cwiki.apache.org/confluence/display/SPAMASSASSIN/WritingRulesAdvanced>
> but the only thing that shows is the following below.

That's specific to writing the regular expressions used in rules. Report
template text is just... text.

> Excerpts of different config outputs I've tried:
>
> Spam programvaran /p(?:\xfc|\xc3\xa5)/ "xxxx"
>
> Spam programvaran p(?:\xfc|\xc3\xa5) "xxxx"

I note that none of the characters there are \xe5, \xe4 or \xf6.

> Excerpts of how the mail looks without tried configs:
>
> Spam programvaran på "xxxx"

FYI, QP encodes that as: Spam programvaran p=C3=A5 "xxxx"

...so the second half of what you used (\xc3\xa5) *is* being emitted in
the report.

Try:

Spam programvaran p\xe5 "xxxx"


Did you try just pasting in the proper accented text verbatim? Explicit
hex values shouldn't be needed. See the report lines of this for example:

https://cwiki.apache.org/confluence/display/SPAMASSASSIN/TranslateFrench



--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
The tree of freedom must be freshened from time to time
with the blood of tyrants and tyrannosaurs.
-- DW, commenting on the GM6 Lynx .50BMG bullpup
-----------------------------------------------------------------------
42 days until the Presidential Election
Re: Character encoding in Report Templates [ In reply to ]
On Tue, 22 Sep 2020 10:50:58 -0700 (PDT)
John Hardin wrote:


>
> Did you try just pasting in the proper accented text verbatim?
> Explicit hex values shouldn't be needed. See the report lines of this
> for example:
>
> https://cwiki.apache.org/confluence/display/SPAMASSASSIN/TranslateFrench

I think this is probably the most important thing:

report_charset CHARSET (default: unset)
Set the MIME Content-Type charset used for the text/plain
report which is attached to spam mail messages.

The wiki has this example:

lang fr report_charset iso-8859-1

But this form doesn't seem useful unless there are traditional unix
users with individual locales.
Character encoding in Report Templates [ In reply to ]
Hi again!

Thanks for all the answers!

I have tried using both Report_charset iso-8859-1 and Report_charset utf-8 but the same results as before...
What am I missing?

V?nliga h?lsningar

Tim Wetterek Andersson

-----Ursprungligt meddelande-----
Fr?n: RW <rwmaillists@googlemail.com>
Skickat: den 23 september 2020 02:16
Till: users@spamassassin.apache.org
?mne: Re: Character encoding in Report Templates

On Tue, 22 Sep 2020 10:50:58 -0700 (PDT) John Hardin wrote:


>
> Did you try just pasting in the proper accented text verbatim?
> Explicit hex values shouldn't be needed. See the report lines of this
> for example:
>
> https://cwiki.apache.org/confluence/display/SPAMASSASSIN/TranslateFren
> ch

I think this is probably the most important thing:

report_charset CHARSET (default: unset)
Set the MIME Content-Type charset used for the text/plain
report which is attached to spam mail messages.

The wiki has this example:

lang fr report_charset iso-8859-1

But this form doesn't seem useful unless there are traditional unix users with individual locales.
All e-post som skickas till Norrk?pings kommun ?r allm?n handling.
Norrk?pings kommun hanterar dina personuppgifter enligt dataskyddsf?rordningen (GDPR).
F?r mer information se http://www.norrkoping.se/dataskyddsforordningen---gdpr.html