Are there any drawbacks to replacing vdelivermail with maildrop?

I need to implement a complete package consisting of:

1) vpopmail + vqadmin + qmailadmin for mailbox/domain administration
2) maildrop for delivery (but I only really need it for filtering)
3) sqwebmail
4) qmail-scanner for virus filtering and spamassassin processing

In my tests, long long ago, I ended up patching vpopmail and
qmailadmin in a similar fashion as below to just put a call to shell
scripts for delivery.  The shell scripts used maildrop for the final
delivery, and they setup environment variables for quotas.  Now, it
appears as though a lot of that is unnecessary (thankfully!), and I
have yet to actually implement anything, so I'm trying to re-grasp the
whole process.

Also, are there any plans for implementing the pw_maildir field in
vpopmail?  I was playing with maildropmysql, and I tried putting
"concat(pw_dir,'/Maildir')" for the maildir_field into
maildropmysql.config, but I have yet to test it (because I haven't yet
replaced vdelivermail).

I dream of a future in which vdelivermail contains all the necessary
maildrop filtering code..

Tim Hasson wrote (at Thu, Oct 16, 2003 at 10:40:27PM -0700):
> The only way I could get around this problem, is replace vdelivermail with 
> maildrop, for all my domains, and configure it to run in delivery mode to read 
> the vpopmail users from mysql database.
> 
> I also changed qmail-start command to pipe to the deliverquota program from 
> courier-imap or courier-maildrop packages (compiled with quota support). This 
> catches locally delivered messages that could escape the quota because of 
> qmail-local's lack of maildirquota support (the maildir++ patch by bill shupp 
> didn't help either).
> 
> change your `qmail-start ./Maildir/` in /var/qmail/rc to:
> 
> qmail-start | /usr/local/bin/deliverquota -w 90 ./Maildir
> 
> 
> 
> Now time for maildrop:
> 
> # wget http://aleron.dl.sourceforge.net/sourceforge/courier/courier-imap-
> 2.0.0.tar.bz2
> # export HAVE_OPEN_SMTP_RELAY=1
> # export DYNMYSQLLIBS="-L/usr/local/lib/mysql -lmysqlclient"
> 
> ./configure     --prefix=/usr/local --exec-prefix=/usr/local \
>                 --without-authldap --without-authshadow \
>                 --with-authvchkpw --without-authcram \
>                 --sysconfdir=/usr/local/etc/courier-imap \
>                 --datadir=/usr/local/share/courier-imap \
>                 --libexecdir=/usr/local/libexec/courier-imap \
>                 --enable-workarounds-for-imap-client-bugs \
>                 --disable-root-check --without-authdaemon
> 
> sed 's/#undef HAVE_OPEN_SMTP_RELAY/#define HAVE_OPEN_SMTP_RELAY 1/g' \
>                 authlib/preauthvchkpw.c > preauthvchkpw.c.new
> 
> mv authlib/preauthvchkpw.c authlib/preauthvchkpw.c.orig
> 
> mv authlib/preauthvchkpw.c.new authlib/preauthvchkpw.c
> 
> 
> cd maildir
> make autoresponsequota.h
> make mailbot.h
> make maildirfilterconfig.h
> make maildirsharedrc.h
> make quotawarnmsg.h
> cd ../authlib
> make authchangepwdir.h
> make sbindir.h
> cd ..
> 
> make install
> 
> /usr/local/etc/maildropmysql.conf
> ---------------------------------
> 
> # hostname - host name of your ldap server
> hostname        mysql.hostname.com
> port            3306
> database        vpopmail
> dbuser          vpopmail
> dbpw            secret
> dbtable         vpopmail
> 
> #not used now
> #timeout                5
> 
> # default_uid - default uid (number only) to use incase uidnumber attribute not
> # found in users mysql entry
> default_uidnumber       500
> 
> # default_gid - default gid (number only) to use incase gidnumber attribute not
> # found in users ldap entry
> default_gidnumber       500
> 
> # MySQL Field definitions
> #
> # This section allows you to specify the actual attributes you
> # use in your Mysql record
> #
> # The example attribute mapping shown below is also the default
> # mapping used by maildrop in the case that any are missing
> 
> # UID_FIELD - MySQL attribute which contains the users name (w or w/o domain)
> uid_field               pw_email
> 
> # UIDNUMBER_FIELD - MySQL attribute which contains the system uid to deliver
> # mail as
> uidnumber_field         real_uid
> 
> # GIDNUMBER_FIELD - MySQL attribute which contains the system gid to deliver
> # mail as
> gidnumber_field         real_gid
> 
> # MAILDIR_FIELD - MySQL attribute which contains the path to the users
> # custom maildir
> maildir_field           pw_maildir
> 
> # HOMEDIRECTORY_FIELD - MySQL attribute which contains the path to the users
> # home directory
> homedirectory_field     pw_dir
> 
> # QUOTA_FIELD - MySQL attribute which contains the users quota
> quota_field             pw_shell
> 
> # MYSQL_DEFAULT_STATUS_FIELD - MySQL attribute which could be created in the
> # MySQL entry to set whether or not the user is allowed to receive email on
> # this box..
> #               -- looks unused for now; but must be valid column ! (2001-11-
> 03)
> mailstatus_field        pw_status
> 
> 
> # MYSQL_DEFAULT_WHERE_CLAUSE - This is optional !
> # It can be set to any fixed string starting with keyword 'AND'.
> # It will then be appended to the WHERE clause of our query.
> where_clause            ""
> 
> 
> ----------------------
> 
> 
> Apply the attached patch to vpopmail-5.2.1 to enable it to share its mysql db 
> with maildrop and also default to put "| maildrop -d" instead of vdelivermail 
> in .qmail-default for new domains added with vadddomain
> 
> It allows single and multi uid system. uids are also stored in mysql.
> 
> check this for more information on the patch (especially if you have existing 
> users you want to enable to use maildrop):
> 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg14690.html
> 
> this also allows putting a .mailfilter in any user's maildir and it will be 
> processed by maildrop (ex. spam filters etc..)
> 
> 
> remove all existing maildirsize files in all users maildirs, and regenerate 
> them for every user using the up-to-date maildirmake tool that comes with 
> maildrop:
> 
> maildirmake -q 10000000S,1000C ~vpopmail/domains/domain.com/user/Maildir
> 
> this will recreate maildirsize with a quota of 10MB and 1000 message count 
> limit.
> 
> Make sure that after the patch you check that all the pw_shell fields (the 
> quota field in vpopmail table) have the correct quota syntax like:
> 10000000S
> or
> 10000000S,1000C
> 
> or else maildrop will not generate the maildirsize file if it doesn't exist 
> for a user receiving a new mail message.
> 
> 
> After I done this, I haven't had the quota usage reporting negative or 0% when 
> the user has mail.
> 
> 
> Hope this helps....
> 
> 
> Best Regards,
> Tim Hasson
> 
> 
> 
> 
> Quoting Abdul Mahzeer <[EMAIL PROTECTED]>:
> 
> > Tim,
> > 
> > Thank you very much for your response, any advice you can give me is greatly
> > 
> > appreciated.  To answer your questions, first my vpopmail domain is located 
> > locally on a ext3 filesystem.  Secondly, when i telnet into my imap server 
> > and do a "getquota ROOT" for my user it gives me an output of:
> > 
> > a2 getquota ROOT
> > *  QUOTA "ROOT" (STORAGE -166194 20480)
> > a2 OK GETQUOTA Ok.
> > 
> > I hope this was the info you are looking for.  This whole situation is very 
> > bizarre to me.  Once again thank you for all your help and I hope to hear 
> > from you soon.
> > 
> > Warm Regards,
> > 
> > Abdul
> > 
> > 
> > >From: Tim Hasson <[EMAIL PROTECTED]>
> > >To: Abdul Mahzeer <[EMAIL PROTECTED]>
> > >Subject: Re: Vpopmail Problems
> > >Date: Wed, 15 Oct 2003 13:54:58 -0700
> > >
> > >Hi Abdul,
> > >
> > >I'll try to answer your question tomorrow. I have a test today :)
> > >
> > >For now, some information would be helpful:
> > >
> > >1. do you also store your vpopmail domains on NFS, or is it on local disk
> > >partition (ext2/ext3/ufs etc..)
> > >
> > >2. For the user you mentioned, can you do the following from command line 
> > >(to
> > >test if you are really getting negative values in the quota usage instead 
> > >of a
> > >valid number - this is the case when user info returns 0% )
> > >
> > ># telnet your.imap.server.host 143
> > >login [EMAIL PROTECTED] hispassword
> > >getquota ROOT
> > >
> > >This information will greatly help.
> > >
> > >Tim
> > >
> > >
> > >Quoting Abdul Mahzeer <[EMAIL PROTECTED]>:
> > >
> > > > Tim,
> > > >
> > > > Sorry to bother you but just recently I've been experiencing similiar
> > > > maildirsize problems that you mentioned you were having on the vpopmail
> > > > mailing list.  I'm running vpopmail 5.3.23 along with qmail 1.03.  Also 
> > >like
> > > >
> > > > you, I've just recently migrated from courier 1.6 to courier 2.0.  When 
> > >i do
> > > >
> > > > a "vuserinfo -Q [EMAIL PROTECTED]" on a user i get an output of 0%.  But
> > 
> > >I
> > > > know he has over 500 messages on a 20MB quota.  Anyway from your post it
> > > > appears you had the same problem.  Did you ever figure out what was 
> > >causing
> > > > the problem?  Any help on this would be greatly appreciated because i 
> > >have
> > > > no clue.
> > > >
> > > > Regards,
> > > >
> > > > Abdul
> > > >
> > > > _________________________________________________________________
> > > > Concerned that messages may bounce because your Hotmail account has 
> > >exceeded
> > > >
> > > > its 2MB storage limit? Get Hotmail Extra Storage!
> > > > http://join.msn.com/?PAGE=features/es
> > > >
> > > >
> > >
> > 
> > _________________________________________________________________
> > Concerned that messages may bounce because your Hotmail account has exceeded
> > 
> > its 2MB storage limit? Get Hotmail Extra Storage!         
> > http://join.msn.com/?PAGE=features/es
> > 
> > 
> 
> 
> Respectfully,
> Tim Hasson
> Consultant, AiDA Systems
> (209) 639-2989 Voice
> 
> 

-- 
Casey Zacek
Senior Engineer
NeoSpire, Inc.

Reply via email to