Hi,
I want to know if it would be possible a spamassassing configuration
that allows me execute spamassassing just in case a header mail exists
with a defined value.
System configuration is the following:
Spamassassing: /etc/spamassassin/
rewrite_header Subject *****SPAM*****
report_safe 0
required_score 3.5
use_bayes 1
bayes_auto_learn 1
bayes_learn_during_report 1
bayes_auto_expire 1
bayes_expiry_max_db_size 150000
bayes_journal_max_size 102400
bayes_use_hapaxes 1
use_pyzor 0
use_razor2 1
allow_user_rules 1
Postfix: /etc/postfix/spamassassin
smtp inet n - n - 80 smtpd -o
content_filter=spamassassin
pickup fifo n - - 60 1 pickup -o
receive_override_options=no_header_body_checks
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender}
-- ${recipient}
policy unix - n n - - spawn
user=nobody argv=/usr/bin/perl /usr/sbin/postfix-policyd-spf-perl
With this configuration, each mail that receives postfix is scanned
before sending to each user. My idea is that spamassassin scans only in
case mail received has a header added by another SMTP. My SMTP receives
mails that have been received before for the Enterprise SMTP. That
Enterprise SMTP add a header called "X-imss-result:". Depending on the
value of this header, I would like to configure SpamAssassing for
execute scan just in case this header has a value equal to
"Default_Triggered"; in other cases, mail will be sent to user with no scan.
Any idea?