Re: [vchkpw] Vpopmail + sa-learn (SpamAssassin)

2003-10-06 Thread Doug Ledbetter


At 03:43 PM 10/3/2003 -0700, you wrote:
At 02:50 PM 10/3/2003, Doug
Ledbetter wrote:
Hello all,
 I've setup SpamAssassin to
work with individual Vpopmail mailboxes. I want to know if sa-learn
can be used in this configuration? If so, how do you tell sa-learn
which Bayes database you want to use? I'm currently using one Bayes
database per email domain, but I may offer individual Bayes databases per
mailbox in the future.
Doug...
I would be interested in how you set SA up with individual vPop boxes. Do
you have any notes to share??

Sure, let me ramble for a minute. ;)
First, I should mention that I wanted maximum control over how
SpamAssassin works for individual mailboxes. I wanted to be able to
turn it on/off individually and configure SpamAssassin settings (ie-
Razor, hits, Bayes DB location, etc.) individually for each mailbox and I
wanted to store all this in an SQL database for ease of use.
- Obviously you need SpamAssassin installed. :)
I had to make a small change to one of the SpamAssassin scripts because
normally it won't read certain settings from a database for security
reasons. Notice I have modified the source of
SpamAssassin! Please use at your own risk! As long as
access to your database is secure, you shouldn't have any
problems.

/usr/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/Conf.pm
Around line 280:

sub parse_scores_only {
 my ($self) = @_;
# $self-_parse ($_[1], 1); # don't copy $rules!
 $self-_parse ($_[1], $disallow_rules_in_sql); # allow
copying of rules -dougl
}
Where:

my $disallow_rules_in_sql = 0;

- Here's how I run the spamd daemon:
spamd -d
-a -v -x -q -u vpopmail -H /home/vpopmail/
- OPTIONAL: Install Razor. Run 'razor-admin -create'  '
razor-admin -register' as the vpopmail user. This creates a .razor
directory in /home/vpopmail. Don't forget to patch Razor if you're
using SpamAssassin 2.60 (patch is included with SpamAssasin
v2.60).
- Make sure you have a recent version of Procmail installed.
- Create a .procmailrc file and put it in the mailbox directory (ie-
/home/vpopmail/domains/domain/user/.procmailrc
Contents
of .procmailrc:


# Note: paths in this file are relative to the email domain
directory.
# ie- /home/vpopmail/domains/domain/
#
# The following 4 lines do verbose procmail logging useful for
debugging.
# Comment them out before receiving a lot of email. ;)
#
LOGFILE=./pm.log
LOG=

VERBOSE=yes

MAILBOX=./user/Maildir/
SPAMBOX=./spam/Maildir/#
optional
USER=full email address of mailbox

# SpamAssassin filter
:0fw
| /usr/bin/spamc -d 127.0.0.1 -u ${USER} -t 3

:0e
{
 EXITCODE=$?
}

# If you want procmail to put spam messages into another mailbox,
# uncomment these next lines and be sure that SPAMBOX is
a valid
# mailbox
#
# Toss Spam into another maildir
#:0
#* ^X-Spam-Flag:.YES
#${SPAMBOX}

# Deliver the mail to the Maildir
${MAILBOX}

NOTE:
The above .procmailrc has Procmail doing the mail delivery and NOT
vdelivermail which means you won't get email quota support. If you
want to use vdelivermail, it's a little bit more tricky.
- Edit the .qmail-user file for the mailbox you want to
set up SpamAssassin:

| preline /usr/bin/procmail -t
./user/.procmailrc

- Known problem: SpamAssassin will not process email sent to a
catch-all account. Ie- you have a .qmail-default in the vpopmail
domain directory that says something like this:

| /home/vpopmail/bin/vdelivermail '' some email
address
The next version of Vpopmail should fix this problem.
- Create a MySQL database according to the SpamAssassin docs. Then
you can insert records like this:
mysql select * from userpref;
+-+--+-+++
| oid |
username
| preference |
value
| updated |
+-+--+-+++
| 1 | full email address |
use_bayes |
1
| 20030924164532 |
| 6 | full email address |
bayes_path |
/home/vpopmail/domains/domain/.spamassassin/bayes
| 20030924164532 |
| 4 | full email address |
report_safe |
0
| 20030924164532 |
| 7 | full email address | auto_whitelist_path
|
/home/vpopmail/domains/domain/.spamassassin/auto-whitelist
| 20030924164532 |
| 9 | full email address |
auto_learn |
1
| 20030924164532 |
| 10 | full email address |
rewrite_subject |
1
| 20030924164532 |
| 11 | full email address |
required_hits |
5.0
| 20030924164532 |
| 12 | full email address |
use_razor2 |
0
| 20030924164532 |
+-+--+-+++
8 rows in set (0.02 sec)
Each user (ie- full email address) can have it's own settings in this
table. This makes it really easy to turn on/off every SpamAssassin
option on an individual basis.
Note: Currently I'm using one Bayes database per email domain, but
I could change that to use one database per mailbox

[vchkpw] Vpopmail + sa-learn (SpamAssassin)

2003-10-03 Thread Doug Ledbetter
Hello all,

I've setup SpamAssassin to work with individual Vpopmail 
mailboxes.  I want to know if sa-learn can be used in this 
configuration?  If so, how do you tell sa-learn which Bayes database you 
want to use?  I'm currently using one Bayes database per email domain, but 
I may offer individual Bayes databases per mailbox in the future.

I realize that this question is a little off topic for the list, 
but I can't seem to find the answer anywhere else.  Any help/suggestions 
would be appreciated.

thanks,
-dougl


Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]
My PGP Public Key: http://dougledbetter.org/public_key.html



Unable_to_chdir_to_maildir._(#4.2.1)

2001-11-29 Thread Doug Ledbetter

Hello all,

Everything's been working great until I made a change today.  I have lots 
of users with their own domains and I just created a catch-all POP3 
account for each of them in my domain (www1.hagenhosting.com).  Then, I 
adjusted each domain's .qmail-default to have a bounce email 
([EMAIL PROTECTED]).

Now, I'm getting Unable_to_chdir_to_maildir._(#4.2.1) errors *SOMETIMES* 
in the /var/log/maillog.  It *appears* that the message DOES get delivered 
successfully eventually, though.  The file permissions appear to be correct.

Any ideas?

VPOPMAIL version 5.0

LOG EXAMPLE:
Nov 29 12:54:20 www1 qmail: 1007056460.410130 starting delivery 313: msg 
6079811 to local [EMAIL PROTECTED]
Nov 29 12:54:20 www1 qmail: 1007056460.410304 status: local 1/10 remote 7/20
Nov 29 12:54:20 www1 qmail: 1007056460.431790 delivery 313: deferral: 
Unable_to_chdir_to_maildir._(#4.2.1)/

DIRECTORY LISTING for ~vpopmail/domains/www1.hagenhosting.com (partial):
-rw---1 vpopmail vchkpw 55 Nov 10 00:08 .qmail-default
drwx--   38 vpopmail vchkpw   4096 Nov 29 12:01 0
drwx--3 vpopmail vchkpw   4096 Nov 29 11:50 a1moving
drwx--3 vpopmail vchkpw   4096 Nov 29 11:40 a21ltd
drwx--3 vpopmail vchkpw   4096 Nov 29 11:40 a8thlett


THANKS!
-dougl



Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]





double bounce management

2001-10-29 Thread Doug Ledbetter

Hello all!

Is there a way to make double bounces deliver to the virtual email domain 
instead of going to the main postmaster account?

thanks,
-dougl



Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]





Re: double bounce management

2001-10-29 Thread Doug Ledbetter

At 06:13 PM 10/29/2001 +0100, you wrote:
At 16:16 29/10/01, Doug Ledbetter wrote:
Hello all!

Is there a way to make double bounces deliver to the virtual email domain 
instead of going to the main postmaster account?

Here's one way:

1) echo double-bounce  /var/qmail/control/doublebounceto
2) /home/vpopmail/bin/vadduser [EMAIL PROTECTED] H8yT65cvP

Do `man qmail-send` for more info.


Well, actually, I wanted the double bounce to go to the DOMAIN that's 
bouncing...so, [EMAIL PROTECTED] would bounce to some account on 
domain1.com (like [EMAIL PROTECTED]) and [EMAIL PROTECTED] 
would bounce to some account on domain2.com (like 
[EMAIL PROTECTED]).  I don't suppose that's possible, though, eh?

thanks,
-dougl



Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]





SegFaults instead of error codes?

2001-10-08 Thread Doug Ledbetter

Hello VPopMail List!

I've noticed that sometimes the VPopMail utilities will SegFault instead 
of returning an error number or an error message.

For instance, if you try to add a user to a non-existant domain...which 
_I_ would never do...  ;)

Is this supposed to happen at this stage in development or is something 
awry with my compile?

thanks,
-dougl



Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]





Passwords in binaries

2001-10-01 Thread Doug Ledbetter

Hi,

I've been looking into using MySQL instead of CDB for VPopMail, but I 
noticed that the MySQL username and password were stored in the 
binaries.  This is a significant problem for me, since any user could do 
`strings vchkpw` and find the username/password to connect to MySQL.

I realize that I can setup a username/password that only has access to the 
VPopMail data, but even that is too much access, IMHO.

Are there plans to store this information in a config file that can be set 
to only be read by the VPopMail user/group?

thanks,
-dougl



Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]





Autoresponders?

2001-09-27 Thread Doug Ledbetter

Hi!

Can somebody tell me how to setup an autoresponder that works with VPopMail?

I have qmail-autoresponder (by Bruce Guenter [EMAIL PROTECTED]) and would like 
to make that work if possible.  If not, can you make a suggestion?

thanks!,
-dougl



Doug Ledbetter -- Hagen Software, Inc.
[EMAIL PROTECTED]