Re: [vchkpw] multimaildir in .qmail
On Feb 4, 2004, at 1:49 AM, Luca Morettoni wrote: Tom Collins, il 03/02/2004 alle 07:48, mi scrisse... I'm pretty sure that vdelivermail is assuming the second line is an address and not a Maildir since it doesn't contains the string /Maildir/. I'll look into updating vpopmail to do Maildir delivery if the line starts with . or /. this is a little patch for my 5.3.30 installation, it chech if is a valid maildir name (start with a slash or a dot and end with a slash too), I hope it could be applied to the 5.4.x revision (I try later) Enjoy this patch: --- vdelivermail.c.orig Mon Oct 20 20:59:57 2003 +++ vdelivermail.c Wed Feb 4 09:44:43 2004 @@ -470,10 +470,11 @@ return(0); } -/* Contains /Maildir/ ? Then it must be a full or relative - * path to a Maildir +/* Contains a Maildir delivery? Then it must be a full or relative + * path to a Maildir (must start with a dot or a slash and end with a slash) + * Patched by Luca Morettoni */ -else if ( strstr(address, /Maildir/) != NULL ) { +else if ((*address == '.' || *address == '/') *(address+strlen(address)-1) == '/') { /* if the user has a quota set */ if ( strncmp(quota, NOQUOTA, 2) != 0 ) { Here's my version of the patch, currently in CVS. The only thing I'm considering changing is the vexit(111) to return(0) to have it skip the mbox delivery instead of deferring the message. (In a .qmail file, if the path doesn't end with /, it's considered to be a mbox delivery which is something vdelivermail doesn't support.) diff -u -r1.10 vdelivermail.c --- vdelivermail.c 11 Jan 2004 03:53:40 - 1.10 +++ vdelivermail.c 12 Feb 2004 17:31:54 - @@ -467,10 +467,13 @@ return(0); } -/* Contains /Maildir/ ? Then it must be a full or relative - * path to a Maildir - */ -else if ( strstr(address, /Maildir/) != NULL ) { +/* Starts with '.' or '/', then it's an mbox or maildir delivery */ +else if ((*address == '.') || (*address == '/')) { +/* check for mbox delivery and exit accordingly */ +if (address[strlen(address)-1] != '/') { +printf (can't handle mbox delivery for %s, address); +vexit(111); +} /* if the user has a quota set */ if ( strncmp(quota, NOQUOTA, 2) != 0 ) { -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter handheld Network Tester: http://sniffter.com/
Re: [vchkpw] multimaildir in .qmail
Tom Collins, il 03/02/2004 alle 07:48, mi scrisse... I'm pretty sure that vdelivermail is assuming the second line is an address and not a Maildir since it doesn't contains the string /Maildir/. I'll look into updating vpopmail to do Maildir delivery if the line starts with . or /. this is a little patch for my 5.3.30 installation, it chech if is a valid maildir name (start with a slash or a dot and end with a slash too), I hope it could be applied to the 5.4.x revision (I try later) Enjoy this patch: --- vdelivermail.c.orig Mon Oct 20 20:59:57 2003 +++ vdelivermail.c Wed Feb 4 09:44:43 2004 @@ -470,10 +470,11 @@ return(0); } -/* Contains /Maildir/ ? Then it must be a full or relative - * path to a Maildir +/* Contains a Maildir delivery? Then it must be a full or relative + * path to a Maildir (must start with a dot or a slash and end with a slash) + * Patched by Luca Morettoni */ -else if ( strstr(address, /Maildir/) != NULL ) { +else if ((*address == '.' || *address == '/') *(address+strlen(address)-1) == '/') { /* if the user has a quota set */ if ( strncmp(quota, NOQUOTA, 2) != 0 ) { -- Luca Morettoni [EMAIL PROTECTED] - http://morettoni.net GPG keys avaiable at: http://morettoni.net/key Key fingerprint: D69411BB/C329AED4592319826F12 3036B51E664FD69411BB Current system: FreeBSD 5.2-CURRENT, up 3 days, 17 hrs, 51 mins, 2 secs
RE: [vchkpw] multimaildir in .qmail
Luca Morettoni wrote: starting delivery 10826: msg 178327 to local ./Maildir2/@the_host status: local 1/20 remote 0/40 delivery 10826: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/ status: local 0/20 remote 0/40 Well, the same with 5.4.0-rc2. I've created another two maildir with maildirmake, but when I send a message, I receive the message in Maildir, but an error from Maildir2 and Maildir3: [EMAIL PROTECTED]: Sorry, no mailbox here by that name. vpopmail (#5.1.1) [EMAIL PROTECTED]: Sorry, no mailbox here by that name. vpopmail (#5.1.1) Well, where is the problem? A mistake in the configuration? Thanks for your support Regards Andrea
Re: [vchkpw] multimaildir in .qmail
On Feb 2, 2004, at 7:21 AM, Luca Morettoni wrote: I have two server running vpopmail (5.3.27 on the first and 5.3.30 on the second), some user have a particular .qmail file (with some command executed with | command) and all work fine. The problem (on both version) come when I try to put a multiple maildir delivery command in .qmail file, like this: ./Maildir/ ./Maildir2/ I'm pretty sure that vdelivermail is assuming the second line is an address and not a Maildir since it doesn't contains the string /Maildir/. I'll look into updating vpopmail to do Maildir delivery if the line starts with . or /. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter handheld Network Tester: http://sniffter.com/
RE: [vchkpw] multimaildir in .qmail
Tom Collins wrote: On Feb 2, 2004, at 7:21 AM, Luca Morettoni wrote: I have two server running vpopmail (5.3.27 on the first and 5.3.30 on the second), some user have a particular .qmail file (with some command executed with | command) and all work fine. The problem (on both version) come when I try to put a multiple maildir delivery command in .qmail file, like this: ./Maildir/ ./Maildir2/ I'm pretty sure that vdelivermail is assuming the second line is an address and not a Maildir since it doesn't contains the string /Maildir/. I'll look into updating vpopmail to do Maildir delivery if the line starts with . or /. How about using safecat? You could use something like ./Maildir/ |safecat /path/to/Maildir2/tmp /path/to/Maildir2/new More info on safecat: http://budney.homeunix.net:8080/users/budney/linux/software/safecat.html PK
Re: [vchkpw] multimaildir in .qmail
Tom Collins, il 03/02/2004 alle 07:48, mi scrisse... I'm pretty sure that vdelivermail is assuming the second line is an address and not a Maildir since it doesn't contains the string /Maildir/. I'll look into updating vpopmail to do Maildir delivery if the line starts with . or /. good and thanks! -- Luca Morettoni [EMAIL PROTECTED] - http://morettoni.net GPG keys avaiable at: http://morettoni.net/key Key fingerprint: D69411BB/C329AED4592319826F12 3036B51E664FD69411BB Current system: FreeBSD 5.2-CURRENT, up 3 days, 5 hrs, 15 mins, 26 secs
Re: [vchkpw] multimaildir in .qmail
Tom Collins wrote: On Feb 2, 2004, at 7:21 AM, Luca Morettoni wrote: I have two server running vpopmail (5.3.27 on the first and 5.3.30 on the second), some user have a particular .qmail file (with some command executed with | command) and all work fine. The problem (on both version) come when I try to put a multiple maildir delivery command in .qmail file, like this: ./Maildir/ ./Maildir2/ I'm pretty sure that vdelivermail is assuming the second line is an address and not a Maildir since it doesn't contains the string /Maildir/. I'll look into updating vpopmail to do Maildir delivery if the line starts with . or /. How about starts with '.' or '/' and ends with a '/' for maildir delivery. Do a mbox delivery if it starts with '.' or '/' and does not end with '/'. see man dot-qmail case (4) and (5). Rick