spamassassin together with virtual domain prefs

bvvelzen

Verified User
Joined
Oct 30, 2003
Messages
73
Location
Netherlands
helo,

We have a DA server running with SpamAssassin 2.64.
The first question is do we need to upgrade or are virtual domain prefs also possible with this version?

Else, we tried to upgrade but it give's this error
PHP:
[root@oslo Mail-SpamAssassin-3.0.2]# perl Makefile.PL
What email address or URL should be used in the suspected-spam report
text for users who want more information on your filter installation?
(In particular, ISPs should change this to a local Postmaster contact)
default text: [the administrator of that system]

Check network rules during 'make test' (test scripts may fail due to
network problems)? (y/n) [n]

Warning: prerequisite Digest::SHA1 0 not found.

Warning: I could not locate your pod2man program. Please make sure,
         your pod2man program is in your PATH before you execute 'make'

Writing Makefile for Mail::SpamAssassin
Makefile written by ExtUtils::MakeMaker 6.05
[root@oslo Mail-SpamAssassin-3.0.2]#

So that doesn't work. Now we have the following settings in exim.conf. And our question is if this is correct, because it doesnt
work.

PHP:
# Spam Assassin
spamcheck_director:
  driver = accept
  condition = "${if and { \
      {!def:h_X-Spam-Flag:} \
      {!eq {$received_protocol}{spam-scanned}} \
      {!eq {$received_protocol}{local}} \
      {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
    } {1}{0}}"
  retry_use_local_part
  transport = spamcheck
  no_verify


PHP:
# Spam Assassin
begin transports

spamcheck:
  driver = pipe
  batch_max = 100
  command = /usr/sbin/exim -oMr spam-scanned -bS
  current_directory = "/tmp"
  group = mail
  home_directory = "/tmp"
  log_output
  message_prefix =
  message_suffix =
  return_fail_output
  no_return_path_add
  transport_filter = /usr/bin/spamc -u ${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}
  use_bsmtp
  user = mail
  # must use a privileged user to set $received_protocol on the way back in!

Thanx..
 
Bump :)

I'm helping bvvelzen with this problem, we've followed these instructions and created a test user to test the user_prefs. The ~/.spamassassin/user_prefs file contains the following:

Code:
required_hits   7.5
rewrite_subject 1
subject_tag     *****SPAM*****
report_safe     1
required_score 7.5
rewrite_header subject *****SPAM*****

I've used a mail account to get as many spam as I can. But the problem is that most of the spam is still coming through and the subject isn't modified:

Code:
X-Spam-Status: No, hits=8.3 required=15.0 tests=MIME_BOUND_DD_DIGITS,
	X_MESSAGE_INFO autolearn=no version=2.64

So, the settings in local.cf are overruling the settings in ~/.spamassassin/user_pref.

local.cf settings:
Code:
...
# How many hits before a message is considered spam.
required_hits           15.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
...
Does anyone have a solution?
 
Last edited:
Is this even possible? It is my understanding that there is only one user_prefs file maintained for each client(user) and applies to all their virtual domains.

For instance, I am admin and have 3 virtual domains. My friend, username srecace has two domains

The global settings file in etc/mail/spamassassin/ contains things I want on my server for all my clients.

Then in /home/admin/.spamassassin I have a user_prefs file which works for all emails processed for my three domains within /home/admin/domains

And my friend maintains a user_prefs file in
/home/srecace/.spamassassin
for his two domains
within /home/srecace/domains

I think what happens is when spamassassin runs, it runs under the user who owns the email domain name and that is how it knows to look in /home/domain_owner_name/.spamassassin

It would be nice to have spamassassin run under the username for the email address instread.

So I don't think your local.cf are overruling the settings, I think spamassassin just doesn;t know about them.

run spamd with the debug flag and pipe the results to a file for observations.
 
Back
Top