[vchkpw] Vadddomain should create limits entry in MySQL

2003-10-06 Thread Jonathan Viney
Hi,

I have just checked with 5.3.28 and when creating a new domain with
vadddomain, an entry is not added for the domain in the limits table.
This means that the vmoddomlimits command doesn't work and fails with
Failed to vget_limits.

I suggest that either a) an entry is created with the domain or b)
vmoddomlimits creates one if necessary.

Thanks,

Jonathan




[vchkpw] maildrop forwarding error

2003-10-06 Thread greg gede
i'm using
vpopmail-5.3.6+sqwebmail-3.6.0.20030922+maildrop-1.6.2+usendmail-0.1.6

maildrop configured with : --enable-maildirquota
--enable-sendmail=/usr/sbin/usendmail

when user set up a filter from sqwebmail interface to
forward an email, i've got a lot of defferal in my
qmail-send log and the mail never gets delivered.
here's the error from the log file :

2003-10-04 11:39:44.023834500 delivery 7442: deferral:
This_account_is_currently
_not_available./maildrop:_error_writing_to_mailbox.//usr/local/bin/maildrop:_Una
ble_to_deliver_to_mailbox./

the .qmail-someuser look like this :

|/usr/local/bin/maildrop \

/vpopmail/domains/somedomain/someuser/Maildir/mailfilter

the mailfilter look like this:

#MFMAILDROP=2
#
# DO NOT EDIT THIS FILE.  This is an automatically
generated filter.

FROM='[EMAIL PROTECTED]'
import SENDER
if ($SENDER eq )
{
 SENDER=$FROM
}

##Op:contains
##Header:FROM
##Value:word
##Folder:[EMAIL PROTECTED]
##From:
##PlainString
##Name:rule


if ((/^FROM:.*word/))
{
to | $SENDMAIL -f  '$SENDER' 
[EMAIL PROTECTED]
}

to /vpopmail/domains/somedomain/someuser/Maildir/.

can anybody help me please ? i don't get any answers
in maildrop's mailing list so i bring this problem
here and hoping that someone will come up with an
idea.

thank  you.

regards,
greg

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



Re: [vchkpw] Vadddomain should create limits entry in MySQL

2003-10-06 Thread Alexander Gruber
Hello,

same to me. I also get the message

Failed to vget_limits.

when i use vpopmail with enable-mysql-limits and try to read them via 
vmoddomlimits.
I also noticed that the mysql table limits has no entries when i add a 
domain via e.g. qmailadmin.

looks like a bug! :-)

greetings

alex

Jonathan Viney wrote:

Hi,

I have just checked with 5.3.28 and when creating a new domain with
vadddomain, an entry is not added for the domain in the limits table.
This means that the vmoddomlimits command doesn't work and fails with
Failed to vget_limits.
I suggest that either a) an entry is created with the domain or b)
vmoddomlimits creates one if necessary.
Thanks,

Jonathan

 





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 or 

Re: [vchkpw] directory wackiness

2003-10-06 Thread Tom Collins
On Monday, October 6, 2003, at 12:17  PM, Erik Bourget wrote:
Does vpopmail, at any point, do a vauth_getpw() and then update
pw_dir with the field it gets?  I'm having a hard time tracking this 
one down.
Whenever a user's account is modified (change password, change quota, 
turn vacation on, etc.), their new information is saved.

It's a shortcoming of the vpopmail apps (and qmailadmin) that when 
modifying a user record, it usually saves the entire vpw structure 
instead of just changing the items that need to change.

Why can't you store the actual directory in the MySQL table?

--
Tom Collins
[EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/



Re: [vchkpw] Vadddomain should create limits entry in MySQL

2003-10-06 Thread Jonathan Viney
Hi,

This is easily fixed manually, just run 'INSERT INTO limits (domain)
VALUES ('example.net')' to create an entry and vmoddomlimits works fine.
It is just that this should be done automatically at some point.

 Failed to vget_limits.
 
 when i use vpopmail with enable-mysql-limits and try to read them via 
 vmoddomlimits.
 I also noticed that the mysql table limits has no entries when i add a 
 domain via e.g. qmailadmin.
 
 looks like a bug! :-)

Cheers,
Jonathan




[vchkpw] Help!! with qmail+vpopmail PLEASE!!!

2003-10-06 Thread Jason Kim
Hi.

I am having no end of trouble with getting vpopmail-5.2.1 and the 
patched version of qmail-1.0.3 up and running nicely together.
The patches I used for qmail are

Bill Guenter's famous Qmail QUEUE patch, which will allow us to run 
alternate programs as Qmail's queue.
Christopher K. Davis's oversized DNS packets patch, which enables Qmail 
to accept oversized DNS packets.
Bill Shupp's maildir++ patch, which will fix vpopmail and Qmail quota 
issues.
Eric M. Johnston's SMTP-AUTH patch, which allows users outside of your 
network to send email after they have authentic


For a while at least, the POP3 service *was* working, but then
just recently I started getting this particularly strange error,
via recordio - when I just resumed testing.
@40003f81fb4e2c9f7c1c tcpserver: pid 22086 from 192.168.1.10
@40003f81fb4e2ca129cc tcpserver: ok 22086 
nemesis.com:192.168.1.10:110 :192.168.1.10::33596
 40003f81fb4e2cbb511c 22086  +OK 
22086.1065483076@/var/qmail/vpopmail/bin/vchkpw
 40003f81fb4e2d050834 22086  USER [EMAIL PROTECTED]
 40003f81fb4e2d06dcf4 22086  +OK
 40003f81fb5323860074 22086  PASS foo
 40003f81fb532397520c 22086  -ERR this user has no $HOME/Maildir
@40003f81fb53239cbcc4 tcpserver: end 22086 status 256
@40003f81fb53239cc494 tcpserver: status: 0/20
@40003f81fb53239ff4fc 22086  [EOF]

As far as I know, nothing really has changed.
nemesis.com is a test virtual domain running on my machine (behind 
NAT+firewall).
I am able to administer the user fine using qmailadmin's cgi scripts.
And as far as I can see ~vpopmail/domains/nemesis.com/jason/Maildir
dOES exist! and qmail-inject DOES properly place any incoming mail into 
the ~vpopmail/domains/nemesis.com/jason/Maildir/new

But I guess something has made qmail-popup or qmail-pop3d forget that it
[EMAIL PROTECTED] is a virtual user on a virtual domain.
Is there a way to debug the pop3 interface without using pop3??
I'd like to get at exactly when qmail starts to process an account as a 
virtual as opposed to a shell account.
The machine DOES have a local jason account, but it didn't matter 
before. So I am wondering what has changed

I followed instruction found on 
http://linux.oreillynet.com/pub/a/linux/2003/09/25/advanced_mail_server.html?page=1

I am at my wits end here (almost). Before I go foraging through the 
source, can any kind soul please toss some pointers my way?

I'd appreciate it very much!



Thanks!!



-jason

p.s. here go the /service run scripts.
##
##POP3d::
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z $QMAILDUID -o -z $NOFILESGID -o -z $MAXSMTPD -o -z 
$LOCAL ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-pop3d/run
exit 1
fi

exec /usr/local/bin/softlimit -m 300 \
/usr/local/bin/tcpserver \
  -H -l $LOCAL \
  -v -x /etc/tcp.pop3.cdb -c $MAXSMTPD -R 0 pop3 
/usr/local/bin/recordio \
/var/qmail/bin/qmail-popup  \
/var/qmail/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 21

###
##SMTP
!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z $QMAILDUID -o -z $NOFILESGID -o -z $MAXSMTPD -o -z 
$LOCAL ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi

if [ ! -f /var/qmail/control/rcpthosts ]; then
echo No /var/qmail/control/rcpthosts!
echo Refusing to start SMTP listener because it'll create an open 
relay
exit 1
fi

exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -v -R -l $LOCAL -x /etc/tcp.smtp.cdb -c 
$MAXSMTPD \
-u $QMAILDUID -g $NOFILESGID 0 smtp /usr/local/bin/recordio \
/var/qmail/bin/qmail-smtpd \
  /var/qmail/vpopmail/bin/vchkpw /bin/true 21







Re: [vchkpw] Help!! with qmail+vpopmail PLEASE!!!

2003-10-06 Thread Tom Collins
On Monday, October 6, 2003, at 04:55  PM, Jason Kim wrote:
exec /usr/local/bin/softlimit -m 300 \
/usr/local/bin/tcpserver \
  -H -l $LOCAL \
  -v -x /etc/tcp.pop3.cdb -c $MAXSMTPD -R 0 pop3 
/usr/local/bin/recordio \
/var/qmail/bin/qmail-popup  \
/var/qmail/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 21
Add $LOCAL after qmail-popup.  The first parameter to qmail-popup is 
the hostname.

exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -v -R -l $LOCAL -x /etc/tcp.smtp.cdb -c 
$MAXSMTPD \
-u $QMAILDUID -g $NOFILESGID 0 smtp 
/usr/local/bin/recordio \
/var/qmail/bin/qmail-smtpd \
  /var/qmail/vpopmail/bin/vchkpw /bin/true 21
Depending on which SMTP AUTH patch you're using, you might need to add 
$LOCAL after qmail-smtpd, otherwise the SMTP AUTH patch will not work 
correctly.

To test, try the following:

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 frida.tomlogic.com ESMTP
EHLO
250-frida.tomlogic.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
AUTH LOGIN
334 VXNlcm5hbWU6
VXNlcm5hbWU6
334 UGFzc3dvcmQ6
UGFzc3dvcmQ6
user invalid username:
535 authorization failed (#5.7.0)
This is an attempt to log in with a blank username and password.  If 
you get authorization failed, you're OK.  If not, you need the hostname.

By the way, I've just submitted an update to the CVS repository to send 
error messages to stderr instead of stdout for vpopmail.c.  This should 
get rid of the user invalid username: line shown above.

--
Tom Collins
[EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/



[Fwd: Re: [vchkpw] Help!! with qmail+vpopmail PLEASE!!!]

2003-10-06 Thread Jason Kim


Tom Collins wrote:
On Monday, October 6, 2003, at 04:55  PM, Jason Kim wrote:

exec /usr/local/bin/softlimit -m 300 \
/usr/local/bin/tcpserver \
  -H -l $LOCAL \
  -v -x /etc/tcp.pop3.cdb -c $MAXSMTPD -R 0 pop3 
/usr/local/bin/recordio \
/var/qmail/bin/qmail-popup  \
/var/qmail/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 21


Add $LOCAL after qmail-popup.  The first parameter to qmail-popup is the 
hostname.
Thanks. Just RTM'd qmail-popup :)


exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -v -R -l $LOCAL -x /etc/tcp.smtp.cdb -c 
$MAXSMTPD \
-u $QMAILDUID -g $NOFILESGID 0 smtp /usr/local/bin/recordio \
/var/qmail/bin/qmail-smtpd \
  /var/qmail/vpopmail/bin/vchkpw /bin/true 21


Depending on which SMTP AUTH patch you're using, you might need to add 
$LOCAL after qmail-smtpd, otherwise the SMTP AUTH patch will not work 
correctly.
Goodness. gracious.
Thanks again!
Looks like I have more things to fix however.
Before, with the broken auth (i.e. withoutg $LOCAL arg after smtp)
I was at least able to send mail, but now..
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 nemesis.com ESMTP
EHLO
250-nemesis.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
AUTH LOGIN
334 VXNlcm5hbWU6
VXNlcm5hbWU6
334 UGFzc3dvcmQ6
UGFzc3dvcmQ6
/var/qmail/vpopmail/bin/vchkpw: error while loading shared libraries:
libc.so.6: failed to map segment from shared object: Cannot allocate memory
535 authorization failed (#5.7.0)





Re: Re: [vchkpw] Help!! with qmail+vpopmail PLEASE!!!]

2003-10-06 Thread Michael Bowe
  exec /usr/local/bin/softlimit -m 200 \
  /usr/local/bin/tcpserver -v -R -l $LOCAL -x /etc/tcp.smtp.cdb -c
  $MAXSMTPD \
  -u $QMAILDUID -g $NOFILESGID 0 smtp /usr/local/bin/recordio
\
  /var/qmail/bin/qmail-smtpd \
/var/qmail/vpopmail/bin/vchkpw /bin/true 21
 
 
  Depending on which SMTP AUTH patch you're using, you might need to add
  $LOCAL after qmail-smtpd, otherwise the SMTP AUTH patch will not work
  correctly.

 Goodness. gracious.
 Thanks again!

 Looks like I have more things to fix however.
 Before, with the broken auth (i.e. withoutg $LOCAL arg after smtp)
 I was at least able to send mail, but now..

 Trying 127.0.0.1...
 Connected to 127.0.0.1.
 Escape character is '^]'.
 220 nemesis.com ESMTP
 EHLO
 250-nemesis.com
 250-AUTH LOGIN CRAM-MD5 PLAIN
 250-AUTH=LOGIN CRAM-MD5 PLAIN
 250-PIPELINING
 250 8BITMIME
 AUTH LOGIN
 334 VXNlcm5hbWU6
 VXNlcm5hbWU6
 334 UGFzc3dvcmQ6
 UGFzc3dvcmQ6
 /var/qmail/vpopmail/bin/vchkpw: error while loading shared libraries:
 libc.so.6: failed to map segment from shared object: Cannot allocate
memory
 535 authorization failed (#5.7.0)

Looks like you need to increase the softlimit on your smtp run script

Try bumping it from 200 to 300

Michael.