• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Postfix - Amavis - Spamassassin ändern "Subject" n

Status
Für weitere Antworten geschlossen.

LoCuTuS

Newbie
Hi Leute!

Ich bin noch am verzweifeln. Ich hab folgendes System:

Suse 9.1
Postfix 2.0.19
Amavisd-new 20030616p9-0
Spamassassin 2.64

Eigentlich läuft alles ganz gut. Postfix funzt, Amavis ebenso. Viren und unerwünschte Anhänge werden zuverlässig geblockt und der Header von Mails entsprechend kommentiert.
Allerdings ändert Spamassassin das Subject von Spam-Mails nicht, wie er soll. Hier die /etc/mail/spamassassin/local.cf
Code:
# How many hits before a message is considered spam.
required_hits           5.0

# Whether to change the subject of suspected spam
rewrite_subject         1

# Text to prepend to subject if rewrite_subject is used
subject_tag             ***SPAM***

# Encapsulate spam in an attachment
report_safe             1

# Use terse version of the spam report
use_terse_report        0

# Enable the Bayes system
use_bayes               1

# Enable Bayes auto-learning
auto_learn              1

# Enable or disable network checks
skip_rbl_checks         0
use_razor2              1
use_dcc                 1
use_pyzor               1

# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_languages            all

# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales              all
Im Header von Spam-Mails sind allerdings schon entsprechende Einträge drin, das die Mails als Spam klassifiziert sind. Der Admin bekommt auch brav Mails von der "Spam-Police".
Nur das Subject ist unverändert - warum? Lasse ich Spamassassin von der Kommandozeile aufn ne Spam-Mail los, dann ist das Subject geändert?!?!?!

Hat mir jemand ne Idee, woran das liegen könnte?

Gruß Ralf ;-)
 

oc2pus

Ultimate Guru
der spamassasin wird von amavisd-new gesteuert. Also musst du das in der dortigen Konfiguration einstellen.

/etc/amavisd.conf
# string to prepend to Subject header field when message exceeds tag2 level
#$sa_spam_subject_tag = '***SPAM*** '; # (defaults to undef, disabled)
# (only seen when spam is not to be rejected
# and recipient is in local_domains*)

#$sa_spam_modifies_subj = 1; # may be a ref to a lookup table, default is true

# Example: modify Subject for all local recipients except user@example.com
#$sa_spam_modifies_subj = [qw( !user@example.com . )];

siehe HP von amavisd-new:
SpamAssassin has configuration options to modify mail body and header, but they seem to be ignored.

* amavisd-new does not modify mail body or lets SA do it (with the exception of defanging, introduced with amavisd-new-2.0). All mail (header) editing is done by amavisd-new and not by SA. Even though SA does observe options in its configuration file to rewrite mail body and modify mail header, the result is purposely not used by amavisd-new. There are two reasons for that: SA is only called once per message regardless of the number of recipients, and secondly, to be able to offer a guarantee the mail body will not be altered, This means the per-recipient handling of mail relaying and header editing needs to be done entirely in amavisd-new, as there are no provisions in SA to analyze mail once and then prepare different modifications for different recipients, based on the same spam analysis. It is a tradeoff: speed for multi-recipient mail versus the full per-recipient flexibility. It would make no sense to fully duplicate the spamc/spamd functionality in amavisd-new. If you need such features, just disable calling SA from amavisd-new, and use the spamc/spamd or other backend interface to SA.
 
OP
L

LoCuTuS

Newbie
...kaum macht mans richtig, schon funktionierts....

Danke schön - hat wunderbar geklappt!

Gruß Ralf ;-)
 
Status
Für weitere Antworten geschlossen.
Oben