[vchkpw] questions on implementing/converting
I actually have two questions. The first one is if anybody has experience with converting a qmail system from vmailmgr to vpopmail. We have devised ways of doing it, but if anybody has already done it and has to do's/don'ts/pointers they came across I would appreciate it if you would share them. Second question. We have a lot of domains that resided on our server and due to directory limitations, can not have all the domains reside in ~path/vpopmail/domains. Is there any good solutions that people know of? The only one that we have come up with is to modify the code to add the domain directories into sublevels (ie ~path/vpopmail/domains/a-e/, ~path/vpopmail/domains/f-n, etc). After considering this, I realized that this probably would require a lot of changes in the code which is possible but we're hoping for a shorter time frame to get it up and going.
Re: [vchkpw] vmailmgr -> vpopmail
I'm currently in the same situation and am looking for feedback in the same area. So far as I have planned it out, I have come up with this steps: 1) Create the domains using the vpopmail script 2) Create mailboxes through vpopmail script of all the mailboxes in vmailmgr. Once the mailboxes are created, replace the password strings in vpopmail with the password strings (md5 or crypt) that were in vmailmgr. Then copy the contents of mailbox from vmailmgr to vpopmail (understanding a little change in the directory structure). 3) Aliases ... can just use .qmail- when moving over. This is the way I was thinking might work since I don't have a second machine to put vpopmail on and then transfer everything that way. If anybody has any thoughts on problems/concerns/pointers I would greatly appreciate it. James On Mon, 03 Jan 2005 15:37:25 +0100, Alexander Gruber <[EMAIL PROTECTED]> wrote: > hi together, > > does anybody know a way to convert mails and accounts from vmailmgr to > vpopmail? i already searched the archive and google without any result. > > thanks! > > regards > > alex >
[vchkpw] mysql and valias_insert()
I'm currently using vpopmail version 5.4.6 (from FreeBSD ports) and i'm curious about how vpopmail handles aliases while using mysql. I have build vpopmail with --enable-valias and --enable-auth-module=mysql (using the USE_MYSQL and WITH_VALIAS settings in ports for those FreeBSD people out there). The problem that I have run into is that I'm writing an application in c which uses the vpopmail libraries, and if I use the valias_insert(alias, domain, line) function that is provided, it creates a .qmail-alias file instead of inserting it directly into the database. I was curious if this is how it's supposed to work even though mysql has been specified or possibly in the new versions it places the information in the valias table now. I know I can just have my program use the mysql database directly, I was just hoping to use the vpopmail library as much as possible. James Whitt
[vchkpw] hashing directories
My question is on the removal of empty hashing directories or at least their reuse. While running through our test server which we are setting up to replace our old system, I noticed that when domains are removed, they aren't being replaced when new domains are being created. To get to the point, we now have basically 0 - N directories with no domains in them, and they are completely empty, yet when we create more domains, a new directory will be created when the last one is filled (so if P gets filled, then Q is created even though 0 - N are sitting with no domains in it). Is there an easy way to have it reuse directories that are not hitting the quota anymore instead of potentially having a lot of empty directories? James Whitt
Re: [vchkpw] hashing directories
In the next three months, I will more than likely start looking into writing a script of some kind to interact with .dir-control so that I will be able to update the hashed directories to recognize spots that can be filled in previous directories. Do you think this is a feasible goal (at this point I haven't looked into how the .dir-control file works since it will be a later project for me). I don't like the solution of deleting the file and restarting over completely from scratch nor do I like the idea that after a while I will more than likely have a lot of empty directories (or directories with only a couple domains in it). James On Mon, 14 Feb 2005 16:26:45 -0600, Ken Jones <[EMAIL PROTECTED]> wrote: > On Monday 14 February 2005 4:15 pm, Charles J. Boening wrote: > > Right. But if you remove the .dir-control file and already have an > > existing structure, are the routines smart enough to reuse the space and > > skip where the directories are "full"? Or does it just start from > > scratch in which you would reuse the directories but it would be > > additive to existing structure. So if you have 100 users in the "c" > > directory it would add 100 more. > > The second. Starts over again from scratch. > > > > > > > Charles > > > > > > > > > > > > -Original Message- > > From: Ken Jones [mailto:[EMAIL PROTECTED] > > Sent: Monday, February 14, 2005 11:42 AM > > To: vchkpw@inter7.com > > Subject: Re: [vchkpw] hashing directories > > > > On Monday 14 February 2005 1:16 pm, Charles J. Boening wrote: > > > If it sees an exiting one will it skip it? > > > > If it sees an existing .dir_control file then it will use the > > information contained therein. Meaning the directories will continue to > > be in the sub directorys. > > > > If you remove the .dir_control file it will automatically create a > > .dir_control file with the initial values. meaning no subdirectories > > yet. > > > > Ken Jones > > > > > -Original Message- > > > From: Ken Jones [mailto:[EMAIL PROTECTED] > > > Sent: Monday, February 14, 2005 7:36 AM > > > To: vchkpw@inter7.com > > > Subject: Re: [vchkpw] hashing directories > > > > > > On Sunday 13 February 2005 9:38 pm, James Whitt wrote: > > > > My question is on the removal of empty hashing directories or at > > > > least > > > > > > > > their reuse. While running through our test server which we are > > > > setting up to replace our old system, I noticed that when domains > > > > are removed, they aren't being replaced when new domains are being > > > > created. To get to the point, we now have basically 0 - N > > > > directories > > > > > > > > with no domains in them, and they are completely empty, yet when we > > > > create more domains, a new directory will be created when the last > > > > one > > > > > > > > is filled (so if P gets filled, then Q is created even though 0 - N > > > > are sitting with no domains in it). Is there an easy way to have it > > > > > > > > reuse directories that are not hitting the quota anymore instead of > > > > potentially having a lot of empty directories? > > > > > > > > James Whitt > > > > > > If you remove the ~vpopmail/domains/.dir-control file, then the > > > directory hashing will start over at the begining. > > > > > > Ken Jones >
Re: [vchkpw] how to do simple vpopmail delivery with filtering
Thanks for this, I was in middle of implementing something like this when I read the post and realized it would work. It did raise a question for me though. If I'm using the valias with mysql, how would I enable those accounts to be check for viruses since vdelivermail would need to be called to have it forward it according to the mysql table? I can't use a .qmail- file that sends it to the script which then sends it to vdelivermail for the reason you had mentioned. On Apr 7, 2005 12:41 AM, Kurt Bigler <[EMAIL PROTECTED]> wrote: > on 4/5/05 5:41 PM, Kurt Bigler <[EMAIL PROTECTED]> wrote: > > > on 4/5/05 6:28 AM, Kyle Wheeler <[EMAIL PROTECTED]> wrote: > > > >> | preline yourfilter | maildir /path/to/vpopdomains/`echo $USER | tr A-Z > >> a-z`/`echo $EXT | tr A-Z a-z`/Maildir/ > > > > Thanks, that's great. > > > >>> In the mean time, what is the best (simplest, most reliable) way to > >>> achieve this simplistic delivery functionality? > >> > >> I think "maildir" (or "safecat") is what you want to use. If you think > >> the environment manipulation is a bit much, I agree, but them's the > >> breaks, at the moment. > > > > Ok, but that's not too bad. It just bugs me to have to install yet another > > package, just to do what vpopmail already knows how to do. > > > > But thanks, that's what I needed to know! > > > > But I have a question to the vpopmail developers: > > > > If I were to implement this, as a option to vdelivermail, say: > > > > -d Deliver only. Do not preline and skip all .qmail processing > > > > would you find this to be something worth integrating? I'm not sure that > > I'd have time now, but it seems worth asking the question. > > I actually implemented this in my copy of vdelivermail.c. It was actually > easier than I thought, and there were fewer issues, apparently, although I'm > not intimately familiar enough to know that I haven't missed something. > > Here's what I did: > > I tentatively reclaimed the unused there-for-compatibility command-line > argument 1. If that argument equals '-d', intended to mean "Deliver Only" > (but could also mean Disable .qmail processing), then processing proceeds as > if the .qmail file did not exist, which I guess is just what Kyle Wheeler > was suggesting. That appears to be all there is do it. > > This change allows you do basic filtering in your .qmail files without > needing any of: > > procmail > maildrop > maildir/safecat > > In my book this is a very good thing. It not only avoids the need for > dependencies on extra packages, but offers all the advantages that > vdelivermail already provides, including quota checking. As README.quotas > says: > > > NOTE: Non-system domain quotas are only enforcable when vdelivermail is the > > local delivery agent. If you pipe your mail into anything else, like > > maildrop, then the non-system domain quota will be ignored. > > So with this change, you can now have the following line in your user/.qmail > file: > > | myfilter | vdelivermail -d bounce-no-mailbox > > and it will not result in infinite vdelivermail recursion. And so you can > have a pure-vpopmail solution for your QmailAdmin-enabled Spam Detection > option. > > Here are the changes to vdelivermail.c in vpopmail-5.4.10 needed to > implement this: > > == > --- vdelivermail.orig.c Wed Apr 6 05:07:36 2005 > +++ vdelivermail.c Wed Apr 6 05:15:06 2005 > @@ -52,6 +52,7 @@ > struct vqpasswd *vpw; > off_t message_size = 0; > char bounce[AUTH_SIZE]; > +char option[AUTH_SIZE];/*kkb*/ > int CurrentQuotaSizeFd; > > #ifdef QMAIL_EXT > @@ -177,6 +178,11 @@ > vexit(111); > } > > + /*kkb begin*/ > + /* get the obsolete/option argument */ > +strncpy(option, argv[1], sizeof(option)); > + /*kkb end*/ > + > /* get the last parameter in the .qmail-default file */ > strncpy(bounce, argv[2], sizeof(bounce)); > > @@ -733,6 +739,14 @@ > int deliver_err; > > chdir(dir); > + > + /*kkb begin*/ > +if ( strcmp(option, "-d") == 0 ) { > + > +/* feature disabled, so just return */ > +return(-1); > + } > + /*kkb end*/ > > /* format the file name */ > if ( (fs = fopen(".qmail","r")) == NULL ) { > == > > It was probably eaiser for me to do that than it would have been to download > and make procmail, maildrop, or safecat! > > If there's not something wrong with this that I'm missing, I'd love to see > this (or something similar) get integrated into vpopmail. > > -Kurt > >