Re: [qmailtoaster] Qmail Toaster Per User settings using MySQL

2006-12-22 Thread Quinn Comendant
On Fri, 22 Dec 2006 00:45:54 -0800, Erik Espinoza wrote:
> From the simscan readme:
> --enable-spamc-user=y|n
>   This option turns per-user spamassassin on or off.  When enabled, 
> the email
>   address of the first rcpt to user is sent to spamassassin.  This allows
>   spamassassin to use customized rules and settings for that email.

I've seen contrary info on this. From here:
http://www.qmailwiki.org/Simscan/Guide
it says:

 But if there is more than one recipient then which user
perference should simscan set? The solution simscan uses is if
there is more than one recipient and the --enable-spamc-user
option is set, then it skips adding the -u [EMAIL PROTECTED] option
to spamc.

Which seem to be how it behaves. If multiple recipients are detected, I think 
it just leaves it blank (as it says above) and spamd uses its process owner, 
clamav, which is what turns up in the logs -- about 10% of incoming emails have 
user=clamav. I wouldn't want simscan simply to take the first of multiple 
recipients and apply the prefs to all from that one -- that would be wrong!


> This will have side effects for users that have a global spamassassin
> config, as is the default in QmailToaster. Autolearn spam/ham tokens
> will be separated per user, instead of globally. In addition, it
> allows one users settings (the first rcpt) to affect an e-mail sent to
> many users.

My understanding is that user_scores_dsn, bayes_store_module, and 
auto_whitelist_factory configurations are independent of each other. In which 
case per-user bayes (Autolearn spam/ham tokens separated per user) will only be 
used:

When executing spamassassin by real users with real home directories each 
with their own bayes databases and you haven't specified a bayes_path in any 
*.cf files.
When using MySQL as the bayes storage engine.

In other words turning on mysql-based userprefs does not also turn on 
mysql-based bayes.

Is that right?

Quinn

-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re[2]: [qmailtoaster] spamassassin bayes location

2006-12-22 Thread Quinn Comendant
On Fri, 22 Dec 2006 08:50:10 -0800, Jared Markell wrote:
> When I try to su to vpopmail it says "This account is currently not
> available." That's weird coming from the multi-user mutli-tasking king
> linux..  Maybe this error is why I can't tell sa-learn to use vpopmail,
> maybe it gets a similar error and defaults back to root?

I would recommend leaving the shell as /bin/nologin (instead of bash) and 
instead of using su to run a program as user vpopmail, use sudo instead, like 
this:

sudo -H -u vpopmail /usr/bin/sa-learn --sync

Sudo will execute users who still have a disable shell. I think this is a more 
secure way -- to keep a user with a non-accessible shell.

Quinn

PS: Although it will need to be tailored for your use, here is a script I run 
from /etc/cron.daily/spamassassin.sh ...

---
#!/bin/sh
# Spamassassin updates and maintainence.

# Sync bayes journals.
#sudo -H -u vpopmail sa-learn --sync;
qmailspam stop && sudo -H -u vpopmail sa-learn --force-expire && qmailspam 
start;

# Update rule packages.
sa-update  --channel updates.spamassassin.org --gpgkey 
D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com && 
qmailspam restart;

# Check if all the rules are okay. Root gets email from cron output.
spamassassin --lint || echo "ERROR: Spamassassin lint failed.";

# Ensure correct ownerships/perms.
chown -R vpopmail:vchkpw /home/vpopmail/.spamassassin;
chmod 700 /home/vpopmail/.spamassassin;
chmod 600 /home/vpopmail/.spamassassin/*;

# END

-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re[2]: [qmailtoaster] SA issue - again

2006-12-22 Thread Peter Peltonen

Hi,

On 12/22/06, Alexey Loukianov <[EMAIL PROTECTED]> wrote:

I.e. mysql, spamassassin, apache and qMailToaster - all are set up at
the same server?


Yes.



If the answer to the question above is 'yes', then that's might be the
cause. If you've got system-accounting enabled - try to use RedHat
tools to check what was the system state at the moment the problems
were experienced. If not, wait for trouble to show up again and check
out ps, top, vmstat and iostat output. I suppose, that you've got
spamd eating up all CPU and thus blocking mysql.


When looking at information that sar has collected CPU has been idle
at least 80 % all the time. Top showed mysql and spamd eating from
0-20 % of CPU at times, never much more.

After restarting spamd I have not been able to reproduce this.

I'll continue watching the system.


Regards,
Peter

-
QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [qmailtoaster] SpamAssassin Not Scoring Spam

2006-12-22 Thread Quinn Comendant
I had a similar question once...then realized all the different tools available 
that plug into SA. Now I obsessively follow the SA list to learn new tools for 
blocking spam. Is there a term for that kind of person yet? Who spends several 
hours optimizing SA so as to not be bothered with incoming spam? ;P

I've got most plugins enabled, including DCC, FuzzyOCR, Razor2, and Pyzor. I've 
got global bayes (not mysql) trained and am using sa-update to keep both SA and 
SARE rules current. I'm very happy with how few spams we get.

Quinn



On Fri, 22 Dec 2006 12:13:32 -0700, Gilbert T. Gutierrez, Jr. wrote:
> I am sorry about the dumb question.  I have since installed some of the
> filters such as pyzor and razor2.
> 
> Thanks,
> Gilbert
> 
> -Original Message-
> From: Gilbert T. Gutierrez, Jr. [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 22, 2006 9:47 AM
> To: qmailtoaster-list@qmailtoaster.com
> Subject: [qmailtoaster] SpamAssassin Not Scoring Spam
> 
> The 'per user' setting is now working with the SQL.  Thanks.
> 
> Below is a section of a header from a message I received off of this list...
> 
> X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on 
>   mailsvr.phxinternet.net
> X-Spam-Level: 
> X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham 
>   version=3.1.7
> 
> I am getting a 0.0 score on messages.  What am I doing wrong that I am
> getting no score?  Is it that I have no filters installed with SpamAssassin?
> This is a default install of the Qmail-Toaster with the only change being
> adding per user support to Spamassasin using MySQL.
> 
> Thanks,
> Gilbert
> 
> 
> -
>  QmailToaster hosted by: VR Hosted 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
>  QmailToaster hosted by: VR Hosted 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
Strangecode :: Internet Consultancy
http://www.strangecode.com/
+1 530 624 4410

-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [qmailtoaster] SpamAssassin Not Scoring Spam

2006-12-22 Thread Gilbert T. Gutierrez, Jr.
I am sorry about the dumb question.  I have since installed some of the
filters such as pyzor and razor2.

Thanks,
Gilbert

-Original Message-
From: Gilbert T. Gutierrez, Jr. [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 22, 2006 9:47 AM
To: qmailtoaster-list@qmailtoaster.com
Subject: [qmailtoaster] SpamAssassin Not Scoring Spam

The 'per user' setting is now working with the SQL.  Thanks.

Below is a section of a header from a message I received off of this list...

X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on 
mailsvr.phxinternet.net
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham 
version=3.1.7

I am getting a 0.0 score on messages.  What am I doing wrong that I am
getting no score?  Is it that I have no filters installed with SpamAssassin?
This is a default install of the Qmail-Toaster with the only change being
adding per user support to Spamassasin using MySQL.

Thanks,
Gilbert


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re[4]: [qmailtoaster] spamassassin bayes location

2006-12-22 Thread Alexey Loukianov
Greetings, Jared.

On 22 декабря 2006 г., 19:50:10 you wrote:
>>> It does tell me it worked.. like "5 tokens learned (11 messages examined)"
>>> and what not, and I see root's stuff updating, but not vpopmail's.. 
>>> any ideas?
>> Hmm, that's very strange. As a other way you might try to do # su vpopmail
>> -c "/path/to/your/learn/script"
> When I try to su to vpopmail it says "This account is currently not
> available." That's weird coming from the multi-user mutli-tasking king
> linux..  Maybe this error is why I can't tell sa-learn to use vpopmail,
> maybe it gets a similar error and defaults back to root?

> I'm on Centos 4.4 with a month-ago-updated toaster, if that helps. Does su
> to vpopmail give any of you the same error?
Please don't do top-posting, it makes reading up your message a bit
difficult for others.

As for "account currently blocked" - head on to /etc/passwd and change
vpopmail:x:89:89:Vpopmail User:/home/vpopmail:/sbin/nologin
to
vpopmail:x:89:89:Vpopmail User:/home/vpopmail:/bin/bash

This will unlock account giving it default shell.

-- 
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re[2]: [qmailtoaster] spamassassin bayes location

2006-12-22 Thread Jared Markell
When I try to su to vpopmail it says "This account is currently not
available." That's weird coming from the multi-user mutli-tasking king
linux..  Maybe this error is why I can't tell sa-learn to use vpopmail,
maybe it gets a similar error and defaults back to root?

I'm on Centos 4.4 with a month-ago-updated toaster, if that helps. Does su
to vpopmail give any of you the same error?

Jared 

-Original Message-
From: Alexey Loukianov [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 22, 2006 8:19 AM
To: Jared Markell
Subject: Re[2]: [qmailtoaster] spamassassin bayes location

Greetings, Jared.

On 22 декабря 2006 г., 19:08:50 you wrote:

> Thanks for your tip Alexey, and I honestly thought this would fix it 
> because it made since! But alas, it did not. :( I still see root's 
> bayes db's updating but not vpopmail.

> here's a semi-trimmed down script I run to update bayes. Notice 
> anything wrong?

> /usr/bin/sa-learn -u vpopmail --spam --no-sync /path/to/spam/*

> /usr/bin/sa-learn -u vpopmail --ham --no-syn /path/to/ham/*

> # I do some cleanup, then..

> /usr/bin/sa-learn -u vpopmail --sync


> It does tell me it worked.. like "5 tokens learned (11 messages examined)"
> and what not, and I see root's stuff updating, but not vpopmail's.. 
> any ideas?
Hmm, that's very strange. As a other way you might try to do # su vpopmail
-c "/path/to/your/learn/script"

Maybe it will do the trick.

--
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[qmailtoaster] SpamAssassin Not Scoring Spam

2006-12-22 Thread Gilbert T. Gutierrez, Jr.
The 'per user' setting is now working with the SQL.  Thanks.

Below is a section of a header from a message I received off of this list...

X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on 
mailsvr.phxinternet.net
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham 
version=3.1.7

I am getting a 0.0 score on messages.  What am I doing wrong that I am
getting no score?  Is it that I have no filters installed with SpamAssassin?
This is a default install of the Qmail-Toaster with the only change being
adding per user support to Spamassasin using MySQL.

Thanks,
Gilbert


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re[2]: [qmailtoaster] spamassassin bayes location

2006-12-22 Thread Alexey Loukianov
Greetings, Jared.

On 22 декабря 2006 г., 19:08:50 you wrote:

> Thanks for your tip Alexey, and I honestly thought this would fix it because
> it made since! But alas, it did not. :( I still see root's bayes db's
> updating but not vpopmail.

> here's a semi-trimmed down script I run to update bayes. Notice anything
> wrong?

> /usr/bin/sa-learn -u vpopmail --spam --no-sync /path/to/spam/*

> /usr/bin/sa-learn -u vpopmail --ham --no-syn /path/to/ham/*

> # I do some cleanup, then..

> /usr/bin/sa-learn -u vpopmail --sync


> It does tell me it worked.. like "5 tokens learned (11 messages examined)"
> and what not, and I see root's stuff updating, but not vpopmail's.. any
> ideas?
Hmm, that's very strange. As a other way you might try to do
# su vpopmail -c "/path/to/your/learn/script"

Maybe it will do the trick.

-- 
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re[2]: [qmailtoaster] SA issue - again

2006-12-22 Thread Alexey Loukianov
Greetings, Peter.

On 22 ??? 2006 ?., 18:59:10 you wrote:
> If someone has an idea how to debug mysql to find out what is really
> causing the hangups, please let me know.
Forgot to say - try to disable bayest engine of SA and check if it
helps. In my case the issue is gone just as I disable bayest.

To disable SA bayest engine, add the following to local.cf:
use_bayes 0
use_bayes_rules 0
bayes_auto_learn 0
bayes_auto_expire 0

-- 
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re[2]: [qmailtoaster] SA issue - again

2006-12-22 Thread Alexey Loukianov
Greetings, Peter.

On 22 ??? 2006 ?., 18:59:10 you wrote:
> We have quite the default spamassassin setup (no extra or custom
> rules) and are using spam filtering only for a few domains. And no
> cluster setup, this is a single server.
I.e. mysql, spamassassin, apache and qMailToaster - all are set up at
the same server?

> After spamd restart everything is ok so it seems that spamd is freezing mysql?
If the answer to the question above is 'yes', then that's might be the
cause. If you've got system-accounting enabled - try to use RedHat
tools to check what was the system state at the moment the problems
were experienced. If not, wait for trouble to show up again and check
out ps, top, vmstat and iostat output. I suppose, that you've got
spamd eating up all CPU and thus blocking mysql.

-- 
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [qmailtoaster] spamassassin bayes location

2006-12-22 Thread Jared Markell
Thanks for your tip Alexey, and I honestly thought this would fix it because
it made since! But alas, it did not. :( I still see root's bayes db's
updating but not vpopmail.

here's a semi-trimmed down script I run to update bayes. Notice anything
wrong?

/usr/bin/sa-learn -u vpopmail --spam --no-sync /path/to/spam/*

/usr/bin/sa-learn -u vpopmail --ham --no-syn /path/to/ham/*

# I do some cleanup, then..

/usr/bin/sa-learn -u vpopmail --sync


It does tell me it worked.. like "5 tokens learned (11 messages examined)"
and what not, and I see root's stuff updating, but not vpopmail's.. any
ideas?

Really wish I could trust bayes auto_learn to work without corrupting and
disabling my email server =/


Jared 


-Original Message-
From: Alexey Loukianov [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 22, 2006 4:00 AM
To: Jared Markell
Subject: Re: [qmailtoaster] spamassassin bayes location

Greetings, Jared.

On 22 декабря 2006 г., 0:59:22 you wrote:
> I thought  it would be nice to use bayes, just just leave autolearn 
> disable, and just teach  it with sa-learn. However, after feeding some 
> spam to it to eat, I still don't  see any of the bayes files in the 
> /home/vpopmail/.spamassassin folder, only the  auto-whitelist file. Is 
> that right? Is that only for the autolearn database? Or were the files 
> moved in the latest toaster? (I upgraded a month  ago)

Don't forget to specify "vpopmail" user name to SA-learn, or instead you'll
update your current UID database, instead of vpopmail one.

In case you use SQL as a bayest DB store, you may use following option in
local.cf:

bayes_sql_override_username vpopmail

--
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] SA issue - again

2006-12-22 Thread Peter Peltonen

Hi,

On 12/19/06, Alexey Loukianov <[EMAIL PROTECTED]> wrote:

From time to time some of SA servers tend to 'stuck'. This shows up in
logs like this:

# qmlog -s @4000458765251acf0b74.s spamd | grep -E 'error|warn'
2006-12-19 00:53:00.508318500 [10802] warn: spamd: timeout: (300 second timeout while 
trying to PROCESS) at /usr/bin/spamd line 1686,  line 254.


We have been experiencing lately exactly the same kind of errors:

spamd.2006-12-21:2006-12-21 05:58:38.645805500 [10610] warn: spamd:
timeout: (300 second timeout while trying to PROCESS) at
/usr/bin/spamd line 1686,  line 4.

We have quite the default spamassassin setup (no extra or custom
rules) and are using spam filtering only for a few domains. And no
cluster setup, this is a single server.

We have been having mysql performance issues also but are uncertain
what is the cause of the issues: spamassassin hanging or the web
applicatoins. Squirrelmail for example is unable to send messages now
and then (user's get a message "Server Error" and nothing else).

After spamd restart everything is ok so it seems that spamd is freezing mysql?

If someone has an idea how to debug mysql to find out what is really
causing the hangups, please let me know.

This is a CentOS 3 box with mysql-3.23.58-16.RHEL3.1,
qmail-toaster-1.03-1.3.6 and spamassassin-toaster-3.1.7-1.3.5.

Regards,
Peter

-
QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] Restore script

2006-12-22 Thread Jake Vickers

Kyle Quillen wrote:

Hey all,

I ran a backup of our main mail and am trying to get an identical setup
for a test machine however when I run the restore script on the test
machine I get a few errors.  Any ideas?

[EMAIL PROTECTED] ~]# sh qtp-restore.sh
200612211433-assign.tar.bz2
tar: 200612211433-assign.tar.bz2: time stamp 2006-12-21 16:31:28 is
356419 s in the future
200612211433-qmailadminpasswd.tar.bz2
tar: 200612211433-qmailadminpasswd.tar.bz2: time stamp 2006-12-21
14:33:37 is 34 9348 s in the future
200612211433-qmailcontrol.tar.bz2
tar: 200612211433-qmailcontrol.tar.bz2: time stamp 2006-12-21 14:33:37
is 349348  s in the future
200612211433-spamassassin-files.tar.bz2
tar: 200612211433-spamassassin-files.tar.bz2: time stamp 2006-12-21
14:34:21 is 349386 s in the future
200612211433-squirrelmail-plugins.tar.bz2
tar: 200612211433-squirrelmail-plugins.tar.bz2: time stamp 2006-12-21
14:33:36 i s 349341 s in the future
200612211433-squirrelmail-prefs.tar.bz2
tar: 200612211433-squirrelmail-prefs.tar.bz2: time stamp 2006-12-21
14:33:36 is 349341 s in the future
200612211433-vpopmail.sql.gz
tar: 200612211433-vpopmail.sql.gz: time stamp 2006-12-21 16:31:27 is
356412 s in  the future
200612211433-vpopmail.tar.bz2
  

First guess is that the time is off on one of the machines.


smime.p7s
Description: S/MIME Cryptographic Signature


[qmailtoaster] Restore script

2006-12-22 Thread Kyle Quillen
Hey all,

I ran a backup of our main mail and am trying to get an identical setup
for a test machine however when I run the restore script on the test
machine I get a few errors.  Any ideas?

[EMAIL PROTECTED] ~]# sh qtp-restore.sh
200612211433-assign.tar.bz2
tar: 200612211433-assign.tar.bz2: time stamp 2006-12-21 16:31:28 is
356419 s in the future
200612211433-qmailadminpasswd.tar.bz2
tar: 200612211433-qmailadminpasswd.tar.bz2: time stamp 2006-12-21
14:33:37 is 34 9348 s in the future
200612211433-qmailcontrol.tar.bz2
tar: 200612211433-qmailcontrol.tar.bz2: time stamp 2006-12-21 14:33:37
is 349348  s in the future
200612211433-spamassassin-files.tar.bz2
tar: 200612211433-spamassassin-files.tar.bz2: time stamp 2006-12-21
14:34:21 is 349386 s in the future
200612211433-squirrelmail-plugins.tar.bz2
tar: 200612211433-squirrelmail-plugins.tar.bz2: time stamp 2006-12-21
14:33:36 i s 349341 s in the future
200612211433-squirrelmail-prefs.tar.bz2
tar: 200612211433-squirrelmail-prefs.tar.bz2: time stamp 2006-12-21
14:33:36 is 349341 s in the future
200612211433-vpopmail.sql.gz
tar: 200612211433-vpopmail.sql.gz: time stamp 2006-12-21 16:31:27 is
356412 s in  the future
200612211433-vpopmail.tar.bz2

Thanks,
Q


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] Qmail Toaster Per User settings using MySQL

2006-12-22 Thread Ronnie Tartar

That is correct, it does have user email instead of user=clamav

thanks


- Original Message - 
From: "Jon Darrington" <[EMAIL PROTECTED]>

To: 
Sent: Friday, December 22, 2006 2:50 AM
Subject: RE: [qmailtoaster] Qmail Toaster Per User settings using MySQL


Ronnie,

Can you confirn that the logfile /var/log/qmail/spamd/current now contains
the correct username rather than user=clamav for all emails.  Thanks.

Erik,

If this is the case,is it possible to have the --enable-spamc-user added to
the default simscan-toaster spec file, I can't think that it should affect
anything else and think that this would be an improvement to the logging.
Might need to add the paths to the bayes filter to
/etc/mail/spamassassin/local.cf so everyone picks up the same db.

I am still (slowly) working on converting sa-stats.pl to php and was wanting
to enable filtering by user but since the current spamd log files don't
capture it have been unable to do so with the stock simscan setup.

Jon

-Original Message-
From: Ronnie Tartar [mailto:[EMAIL PROTECTED]
Sent: 22 December 2006 02:47
To: qmailtoaster-list@qmailtoaster.com
Subject: RE: [qmailtoaster] Qmail Toaster Per User settings using MySQL


The following really helped me, you need to recompile simscan.  Quinn really
helped me out on this one, I'm just pasting what he sent me.

I finally got it up and going.  The issue is that simscan is not compiled to
pass the username to spamassassin.  You have to follow the following steps.


So you're still in? I'm in a rush out of the office, but here are
some quick steps:

=
REBUILDING SIMSCAN RPMs TO SUPPORT PER-USER SPAMC INVOCATION:
=

1. Install the RPMS files from simscan-toaster-3.1.7-1.3.6.src.rpm:

# rpm -Uvh simscan-toaster-3.1.7-1.3.6.src.rpm

2. Edit the simscan-toaster.spec file:

# vi /usr/src/redhat/SPECS/simscan-toaster.spec

You can change the configure options at around line 434. You will
only need to set --enable-spamc-user option. Here is this part of my
simscan-toaster.spec file:

   --enable-user=clamav \
   --enable-attach \
   --enable-ripmime=/usr/bin/ripmime \
   --enable-per-domain \
   --enable-spam \
   --enable-spam-hits=20 \
   --enable-spamc-user \
   --enable-received \
   --enable-clamavdb-path=/usr/share/clamav \
   --enable-custom-smtp-reject

3. Build an RPM from this spec file:

# rpmbuild -bb --with cnt40 --target $(uname -m)
/usr/src/redhat/SPECS/simscan-toaster.spec

(Replace cnt40 with the flag for your distro.)

4. Install the RPM (the usual disclaimers apply):

# rpm -Uvh --force
/usr/src/redhat/RPMS//simscan-toaster-..rpm

(Replace  with yours: i386, i686, etc)


-Original Message-
From: Gilbert T. Gutierrez, Jr. [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 21, 2006 4:59 PM
To: qmailtoaster-list@qmailtoaster.com
Subject: [qmailtoaster] Qmail Toaster Per User settings using MySQL

Can someone tell me what I am doing wrong?  I don't believe spamassassin is
using the database.  When I use the "spamc" utility I get a response saying
that my threshold is 4.0 which is what I have in the database.  When I send
a mail to myself from an outside source, I get a threshold of 5.0. Details
are below.

Gilbert

Server: Centos4.4
Mail: QMAIL-TOASTER

I want to use MySQL with the server to allow users the ability to customize
spamassassin. http://wiki.apache.org/spamassassin/UsingSQL

I added the spamassassin commands I think necessary to the file
/etc/mail/spamassassin/local.cf

 user_scores_dsn  DBI:mysql:spamassassin:127.0.0.1
 user_scores_sql_password 
 user_scores_sql_username spamassassin
 user_scores_sql_custom_query SELECT preference, value FROM _TABLE_
WHERE \
  username = _USERNAME_ OR username =
'$GLOBAL' \
  OR username = CONCAT('%',_DOMAIN_) ORDER
BY username ASC

the mysql user spamassassin has only SELECT privileges

I have added a -q to the spamd service in /var/qmail/supervise/spamd exec
/usr/bin/spamd -q -x -u vpopmail -s stderr 2>&1

I run the command "echo -e "From: user\nTo:user\Subject: Test\n\n" | spamc
-u '[EMAIL PROTECTED]'' to check if spamd is using my SQL rule
set for [EMAIL PROTECTED] and the response reports a required
score of 4.0 which is the same as what I have in the SQL database.

X-Spam-Status: No, score=2.8 required=4.0
tests=EMPTY_MESSAGE,MISSING_SUBJECT,
   NO_RECEIVED,NO_RELAYS autolearn=no version=3.1.7

When I send a test message from my yahoo account to that same user, the
header reports a 5.0.

X-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE



-
QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition

Re: [qmailtoaster] spamassassin bayes location

2006-12-22 Thread Alexey Loukianov
Greetings, Jared.

On 22 декабря 2006 г., 0:59:22 you wrote:
> I thought  it would be nice to use bayes, just just leave autolearn
> disable, and just teach  it with sa-learn. However, after feeding
> some spam to it to eat, I still don't  see any of the bayes files in
> the /home/vpopmail/.spamassassin folder, only the  auto-whitelist
> file. Is that right? Is that only for the autolearn database? Or 
> were the files moved in the latest toaster? (I upgraded a month  ago)

Don't forget to specify "vpopmail" user name to SA-learn, or instead
you'll update your current UID database, instead of vpopmail one.

In case you use SQL as a bayest DB store, you may use following option
in local.cf:

bayes_sql_override_username vpopmail

-- 
Best regards,
 Alexey Loukianov  mailto:[EMAIL PROTECTED]
 System Engineer,
 IT Department,
 Lavtech Corp


-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [qmailtoaster] Qmail Toaster Per User settings using MySQL

2006-12-22 Thread Jon Darrington
Thanks for putting me straight :-)  now remember why I have not done it on
my server!  I am still hoping that there is a way to get the username /
email address into the logs, without going per user.

Jon

-Original Message-
From: Erik Espinoza [mailto:[EMAIL PROTECTED] 
Sent: 22 December 2006 08:46
To: qmailtoaster-list@qmailtoaster.com
Subject: Re: [qmailtoaster] Qmail Toaster Per User settings using MySQL


> Erik,
>
> If this is the case,is it possible to have the --enable-spamc-user 
> added to the default simscan-toaster spec file, I can't think that it 
> should affect anything else and think that this would be an 
> improvement to the logging. Might need to add the paths to the bayes 
> filter to /etc/mail/spamassassin/local.cf so everyone picks up the 
> same db.

>From the simscan readme:
--enable-spamc-user=y|n
   This option turns per-user spamassassin on or off.  When enabled, the
email
   address of the first rcpt to user is sent to spamassassin.  This allows
   spamassassin to use customized rules and settings for that email.

This will have side effects for users that have a global spamassassin
config, as is the default in QmailToaster. Autolearn spam/ham tokens will be
separated per user, instead of globally. In addition, it allows one users
settings (the first rcpt) to affect an e-mail sent to many users.

Perhaps I am too conservative.

Thanks,
Erik

-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
 QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [qmailtoaster] Qmail Toaster Per User settings using MySQL

2006-12-22 Thread Erik Espinoza

Erik,

If this is the case,is it possible to have the --enable-spamc-user added to
the default simscan-toaster spec file, I can't think that it should affect
anything else and think that this would be an improvement to the logging.
Might need to add the paths to the bayes filter to
/etc/mail/spamassassin/local.cf so everyone picks up the same db.



From the simscan readme:

--enable-spamc-user=y|n
  This option turns per-user spamassassin on or off.  When enabled, the email
  address of the first rcpt to user is sent to spamassassin.  This allows
  spamassassin to use customized rules and settings for that email.

This will have side effects for users that have a global spamassassin
config, as is the default in QmailToaster. Autolearn spam/ham tokens
will be separated per user, instead of globally. In addition, it
allows one users settings (the first rcpt) to affect an e-mail sent to
many users.

Perhaps I am too conservative.

Thanks,
Erik

-
QmailToaster hosted by: VR Hosted 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]