1

Topic: Newbie questions about Amavis/Spamassassin

==== Provide required information to help troubleshoot and get quick answer ====
- iRedMail version: 0.7.4
- Linux/BSD distribution name and version: Debian Squeeze
- Any related log? Log is helpful for troubleshooting.
====

Hi there,

I am new to iRedmail, before I used Exim4 on Debian without DB, only system users.
I have some questions regarding how Spamassassin runs on an iRedmail system:

1.
spamd is not running, so spamc is not called but instead spamassassin is run directly, right?

2.
I guess Amavis runs spamassassin, in which config file do I find that? I did not find the string "spamassassin" under /etc/amavis/conf.d

3.
As which user is spamassassin run? I want to use sa-learn and it must be run as the same user.

4.
I see in local.cf that bayes is activated and also autolearn. Where are the bayes info stored? When using system users it is in ~/.spamassassin

Thanks for sheding any light on me ;-)

Oliver

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Newbie questions about Amavis/Spamassassin

okoetter wrote:

1. spamd is not running, so spamc is not called but instead spamassassin is run directly, right?
2. I guess Amavis runs spamassassin, in which config file do I find that? I did not find the string "spamassassin" under /etc/amavis/conf.d

SpamAssassin will be invoked by Amavisd-new directly. Daemon 'spamd' is not running, this is working as designed.

okoetter wrote:

3. As which user is spamassassin run? I want to use sa-learn and it must be run as the same user.

It's running as Amavisd user, configured in amavisd.conf: $daemon_user.

okoetter wrote:

4. I see in local.cf that bayes is activated and also autolearn. Where are the bayes info stored? When using system users it is in ~/.spamassassin

It should be under /var/libs/amavis by default.

3

Re: Newbie questions about Amavis/Spamassassin

ZhangHuangbin wrote:
okoetter wrote:

3. As which user is spamassassin run? I want to use sa-learn and it must be run as the same user.

It's running as Amavisd user, configured in amavisd.conf: $daemon_user.

I don't have a amavisd.conf but several config files in /etc/amavis/conf.d/. None of these files contain $daemon_user.

I assumed spamassassin runs as user amavis, so I implemented a shell script that is called by cron regularly:

sa-learn --spam -u amavis --dbpath /var/lib/amavis/.spamassassin --progress /var/vmail/vmail1/..../spamdir/

Now I read your new tutorial "Store.SpamAssassin.Bayes.In.SQL" (thanks for that!), but here I see that sa-learn is called for user vmail?

$rcmail_config['markasjunk2_spam_cmd'] = 'sa-learn --spam --username=vmail %f';
$rcmail_config['markasjunk2_ham_cmd'] = 'sa-learn --ham --username=vmail %f';

What's correct now for Debian Squeeze, amavis or vmail?

4

Re: Newbie questions about Amavis/Spamassassin

The user specified in 'sa-learn' is not the daemon user used to run Amavisd and SpamAssassin, don't mix them.
We use 'vmail' for a side-wide bayes database.

5

Re: Newbie questions about Amavis/Spamassassin

ZhangHuangbin wrote:

The user specified in 'sa-learn' is not the daemon user used to run Amavisd and SpamAssassin, don't mix them.
We use 'vmail' for a side-wide bayes database.

As far as I understand Spamassassin's daemon spamd is not running, so not spamc is called but spamassassin is run directly by amavisd.
So the question for me is as which user spamassassin runs and which is the home folder where its bayes info is located when I do not store bayes info in SQL.

If spamassassin runs as amavis, the home dir is /var/lib/amavis/.spamassassin
If spamassassin runs as vmail, the home dir is /var/vmail/.spamassassin

If the bayes info is not stored in an SQL db I need to pass the path of the bayes files with the --dbpath argument to sa-learn.

6

Re: Newbie questions about Amavis/Spamassassin

okoetter wrote:

If spamassassin runs as amavis, the home dir is /var/lib/amavis/.spamassassin

SpamAssassin is running as amavisd daemon user.