Re: [vchkpw] vdelivermail writes the wrong ,S= value when spamassassin is enabled
> When spamassassin is enabled but maildrop is not I see failed assertions in > dovecots POP server[2], which are caused by vdelivermail using a wrong > filename. The filename, more exactly the S= value is calculated > _before_ the mail is piped into spamassassin, which adds two more header > lines with it's scan results, so the actual size afterwards is bigger than > what is recorded. The attached patch #5 fixes this for me, with some > cleanups in #1-#4 I did on the way to find the culprit. Ping? signature.asc Description: This is a digitally signed message part. !DSPAM:55fafb1041552455840022!
[vchkpw] vdelivermail writes the wrong ,S= value when spamassassin is enabled
Hi, my setup is as follows: I use Qsmtp[1] to do the SMTP part, use (net)qmail for the queueing, use vpopmail 5.4.33 for the user/domain stuff. The users get their mail through IMAP or POP using dovecot. For some users I have maildrop and/or spamassassin enabled. When spamassassin is enabled but maildrop is not I see failed assertions in dovecots POP server[2], which are caused by vdelivermail using a wrong filename. The filename, more exactly the S=size value is calculated _before_ the mail is piped into spamassassin, which adds two more header lines with it's scan results, so the actual size afterwards is bigger than what is recorded. The attached patch #5 fixes this for me, with some cleanups in #1-#4 I did on the way to find the culprit. Also attached is another patch I on my server to make the user and domain directories world-accessible so the incoming SMTP process can read config files from the user and domain directories for user-defined filtering. The maildirs itself are still 0700 so it has no access to them. While talking about patches, here are the patches that Gentoo applies to vpopmail, which may or may not be useful for being taken upstream: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-mail/vpopmail/files/ Eike 1) shameless plug: http://opensource.sf-tec.de/Qsmtp/ 2) http://dovecot.org/pipermail/dovecot/2014-August/097548.htmlFrom e402c2f49b25d78af3e9ee90b030678972294755 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer k...@opensource.sf-tec.de Date: Thu, 21 Aug 2014 17:34:27 +0200 Subject: [PATCH 1/5] vdelivermail: add static --- vdelivermail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdelivermail.c b/vdelivermail.c index d94129f..241106e 100644 --- a/vdelivermail.c +++ b/vdelivermail.c @@ -322,7 +322,7 @@ int process_valias(void) #endif /* Forks off qmail-inject. Returns PID of child, or 0 for failure. */ -pid_t qmail_inject_open(char *address) +static pid_t qmail_inject_open(char *address) { int pim[2]; pid_t pid; @@ -351,7 +351,7 @@ pid_t qmail_inject_open(char *address) return(pid); } -int fdcopy (int write_fd, int read_fd, const char *extra_headers, size_t headerlen, char *address) +static int fdcopy (int write_fd, int read_fd, const char *extra_headers, size_t headerlen, char *address) { char msgbuf[4096]; ssize_t file_count; -- 1.8.4.5 From af7e1c5ede39340e12f93253b6a53f5459c97900 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer k...@opensource.sf-tec.de Date: Thu, 21 Aug 2014 17:36:36 +0200 Subject: [PATCH 2/5] fix those vfork() instances that do more than exec*() --- vdelivermail.c | 4 ++-- vpopmail.c | 8 vqmaillocal.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vdelivermail.c b/vdelivermail.c index 241106e..be83a2a 100644 --- a/vdelivermail.c +++ b/vdelivermail.c @@ -330,7 +330,7 @@ static pid_t qmail_inject_open(char *address) if ( pipe(pim) == -1) return 0; -switch(pid=vfork()){ +switch(pid=fork()){ case -1: close(pim[0]); close(pim[1]); @@ -381,7 +381,7 @@ static int fdcopy (int write_fd, int read_fd, const char *extra_headers, size_t !(vpw-pw_gid NO_SPAMASSASSIN) ) { if (!pipe(pim)) { - pid = vfork(); + pid = fork(); switch (pid) { case -1: close(pim[0]); diff --git a/vpopmail.c b/vpopmail.c index a2bdc0b..7a4657f 100644 --- a/vpopmail.c +++ b/vpopmail.c @@ -1472,9 +1472,9 @@ int update_newu() { int pid; - pid=vfork(); + pid=fork(); if ( pid==0){ - umask(022); +umask(022); execl(QMAILNEWU,qmail-newu, NULL); exit(127); } else { @@ -3360,9 +3360,9 @@ long unsigned tcprules_open() /* create a pair of filedescriptors for our pipe */ if (pipe(pim) == -1) { return(-1);} - switch( pid=vfork()){ + switch( pid=fork()){ case -1: -/* vfork error. close pipes and exit */ +/* fork error. close pipes and exit */ close(pim[0]); close(pim[1]); return(-1); case 0: diff --git a/vqmaillocal.c b/vqmaillocal.c index 6d3068c..80efa24 100644 --- a/vqmaillocal.c +++ b/vqmaillocal.c @@ -359,7 +359,7 @@ long unsigned qmail_inject_open(char *address) if ( pipe(pim) == -1) return(-1); -switch(pid=vfork()){ +switch(pid=fork()){ case -1: close(pim[0]); close(pim[1]); -- 1.8.4.5 From 88d305d9f072639ed4bc2705b46708e706a50ffc Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer k...@opensource.sf-tec.de Date: Thu, 21 Aug 2014 17:45:28 +0200 Subject: [PATCH 3/5] remove unneeded forward declaration --- vchkpw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/vchkpw.c b/vchkpw.c index b1c8a5d..d7d4351 100644 --- a/vchkpw.c +++ b/vchkpw.c @@ -91,7 +91,6 @@ void login_system_user(); void read_user_pass(); void vlog(int verror, char *TheUser, char *TheDomain, char *ThePass, char *TheName, char *IpAddr, char *LogLine); void vchkpw_exit(int err);
[vchkpw] vdelivermail:_deferred,_database_down
Hi ! I'm not sure this is the good mailling list for my question, if not i apologize. My problem is i'm trying to use autorespond with qmail but it does not work properly. It worked (i get response message if i send a mail to an address with autorespond activated) but after some hours the response messages are stuck in queue and not sent. if i restart the server after some days, i receive failure messages. Here is a part of my Send log after the reboot : 12-03 21:42:23 starting delivery 1: msg 416540 to local nordiquefrance.com-ora...@nordiquefrance.com 12-03 21:42:23 status: local 1/75 remote 0/150 12-03 21:42:24 delivery 1: failure: vdelivermail:_deferred,_database_down/I'm_not_going_to_try_again;_this_message_has_been_in_the_queue_too_long./ 12-03 21:42:24 status: local 0/75 remote 0/150 12-03 21:42:24 bounce msg 416540 qp 2870 12-03 21:42:24 end msg 416540 Why dit i get a vdelivermail:_deferred,_database_dow error and how can i make it works ? Thank you for your help. Maloupi !DSPAM:4b18cd9b32711610912518!
Re: [vchkpw] vdelivermail segfault on 5.4.28
What is the os Federico Contattano off line ciao Remo Inviato da iPhone Il giorno Sep 6, 2009, alle ore 14:15, Federico Santulli mob...@nhm.it ha scritto: dmesg shows this: vdelivermail[17906]: segfault at 20 ip 00411311 sp 7fffc3f1c290 error 4 in vdelivermail[40+19000] is there any fix ? What is the os Federico Inviato da iPhone Il giorno Sep 6, 2009, alle ore 14:15, Federico Santulli mob...@nhm.it ha scritto: dmesg shows this: vdelivermail[17906]: segfault at 20 ip 00411311 sp 7fffc3f1c290 error 4 in vdelivermail[40+19000] is there any fix ? !DSPAM:4aa4187e51101367615150! !DSPAM:4aa521b332711988320330!
[vchkpw] vdelivermail segfault on 5.4.28
dmesg shows this: vdelivermail[17906]: segfault at 20 ip 00411311 sp 7fffc3f1c290 error 4 in vdelivermail[40+19000] is there any fix ? !DSPAM:4aa4185432712101216618!
Re: [vchkpw] vdelivermail fault with 5.4.28
On Tuesday 25 August 2009 04:23:48 pm Matt Brookings wrote: Steve Cole wrote: Moving to the new vpopmail (with the identical CFLAGS configure options for 5.4.23 that I've been using for a long time), I get: What CFLAGS and configure options are you using? ./configure --enable-valias --enable-auth-module=mysql hostname = zeus uname -m = x86_64 uname -r = 2.6.30.5 uname -s = Linux uname -v = #1 SMP Mon Aug 17 11:03:52 EDT 2009 CFLAGS=-Os -pipe -fomit-frame-pointer GCC 4.3.4 !DSPAM:4a96aaa532714587391783!
Re: [vchkpw] vdelivermail fault with 5.4.28
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Cole wrote: CFLAGS=-Os -pipe -fomit-frame-pointer Remove these CFLAGS and try again. Let me know how it goes. I can't reproduce this issue unfortunately. If you can, and would like to contact me off-list to give me access to the environment so I can debug it, that would be highly appreciated. - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqWrDQACgkQIwet2/rgZyymBgCfXIQbyj3Jh49dQB+Lwke9YYD3 umkAnisiRXSzolKSY2a6/GthlPOv+ed3 =qdMf -END PGP SIGNATURE-
[vchkpw] vdelivermail fault with 5.4.28
Moving to the new vpopmail (with the identical CFLAGS configure options for 5.4.23 that I've been using for a long time), I get: Aug 25 14:45:47 zeus kernel: vdelivermail[30615]: segfault at 20 ip 0040eff6 sp 7fff74149560 error 4 in vdelivermail[40+16000] Aug 25 14:45:47 zeus kernel: vdelivermail[30625]: segfault at 20 ip 0040eff6 sp 7fffc3f26750 error 4 in vdelivermail[40+16000] Aug 25 14:45:47 zeus kernel: vdelivermail[30633]: segfault at 20 ip 0040eff6 sp 783be570 error 4 in vdelivermail[40+16000] Aug 25 14:45:50 zeus kernel: vdelivermail[30755]: segfault at 20 ip 0040eff6 sp 7fff1ac13d40 error 4 in vdelivermail[40+16000] Aug 25 14:45:51 zeus kernel: vdelivermail[30934]: segfault at 20 ip 0040eff6 sp 7fffa6073b70 error 4 in vdelivermail[40+16000] Aug 25 14:45:51 zeus kernel: vdelivermail[30944]: segfault at 20 ip 0040eff6 sp 7fffc1280c20 error 4 in vdelivermail[40+16000] Aug 25 14:45:51 zeus kernel: vdelivermail[30945]: segfault at 20 ip 0040eff6 sp 7fff87a5d550 error 4 in vdelivermail[40+16000] Aug 25 14:45:51 zeus kernel: vdelivermail[30954]: segfault at 20 ip 0040eff6 sp 7fffa61a3000 error 4 in vdelivermail[40+16000] Shows up in my syslog and dmesg. OS: Debian Squeeze GCC 4.3.4 GlibC 2.9 MySQL 5.0.51a Also, when I just type vdelivermail I get: vdelivermail: invalid syntax in .qmail-default file !DSPAM:4a94376a32713827114405!
Re: [vchkpw] vdelivermail fault with 5.4.28
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steve Cole wrote: Moving to the new vpopmail (with the identical CFLAGS configure options for 5.4.23 that I've been using for a long time), I get: What CFLAGS and configure options are you using? - -- /* Matt Brookings m...@inter7.com GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAkqUSFQACgkQIwet2/rgZywpxACUDRGuCfg9dokkzuhM04z9GE1t VgCfQvsPgDHHG9T5AnnsGfetJJ8qH1Q= =tJle -END PGP SIGNATURE-
Re: [vchkpw] vdelivermail stdout to Dovecot deliver
On Thu, 2009-04-02 at 06:01 -0700, Tom Collins wrote: On Mar 30, 2009, at 7:32 PM, Rick Romero wrote: What I'm trying to work around with this method is to handle user-specific .qmail directives. Dovecot doesn't do that, and that is why I can't full out replace vdelivermail with deliver. What if vpopmail was updated to store a user's .qmail file as domain.com/.qmail-user instead of domain.com/user/.qmail? It seems whatever solution I want to implement has a lot of work involved. In this case it would involve migrating all the existing domain.com/user/.qmail files to domain.com/.qmail-user, and the applications which create/modify them. It's not done through vpopmaild. I think the simplest option is just calling deliver via vdelivermail's existing run_command function (which IMHO does exactly what is needed - it would be exactly the same as calling maildrop via domain.com/user/.qmail), I just have been too busy to really test it. Rick !DSPAM:49d699c132681621912481!
Re: [vchkpw] vdelivermail stdout to Dovecot deliver
On Mar 30, 2009, at 7:32 PM, Rick Romero wrote: What I'm trying to work around with this method is to handle user-specific .qmail directives. Dovecot doesn't do that, and that is why I can't full out replace vdelivermail with deliver. What if vpopmail was updated to store a user's .qmail file as domain.com/.qmail-user instead of domain.com/user/.qmail? Granted, with a lot of users you end up with a huge number of files in the domain directory, and that will have an impact on performance, but it might be a solution to your problem. We'd have to make other changes to the codebase so the alias/forward routines ignored .qmail- user files that belonged to actual POP/IMAP accounts. -Tom !DSPAM:49d4b73032681666196558!
Re: [vchkpw] vdelivermail stdout to Dovecot deliver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rick Romero wrote: vdelivermail already has a 'run_command' function for running .qmail commands, I'm going to try using that next to call deliver. That should solve the chained pipe issue. I'll admit that I'm not very familiar with the issues involved in getting vdelivermail to deliver to Dovecot directly, but I would like to see more support for Dovecot in vpopmail. As soon as there's some preliminary idea of how to get this part working, or some sample code, please let me know so I can look over it. - -- /* Matt Brookings m...@inter7.com GnuPG Key D9414F70 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknSJM4ACgkQ6QgvSNlBT3AMSQCfRgRJKWFkAZBWF5yVG8OIupF9 kqYAoITu0i1zvDJfstERjcU2HrviTZqm =3ImN -END PGP SIGNATURE-
Re: [vchkpw] vdelivermail stdout to Dovecot deliver
Ok. This won't work. My test system had all the variables set in the shell, which is why it worked. :( The reason it won't work is that qmail-local is the parent process of both vdelivermail AND deliver. If vdelivermail sets HOME, it does not apply to deliver's environment. :( On the up side, with vdelivermail sending the mail to STDOUT, if you do |/usr/local/vpopmail/bin/vdelivermailstdout | /usr/local/libexec/dovecot/deliver -d $...@$host It should deliver.. I'll try and test this tonite - on my test system I received an error 'email' in my INBOX when $EXT and $HOST didn't exist on my commandline. The caveat being you need to run the dovecot Auth on each machine that does delivery. :/ The other option would be for vdelivermail to call Dovecot's deliver after setting the environment. Programming question - if I write to fd0 (STDOUT), and then exec() a process, will that child process see the data I put in fd0 from the parent? Maybe I'll just try that as well. Rick Quoting Rick Romero r...@havokmon.com: On Wed, 2009-03-11 at 14:19 -0500, Rick Romero wrote: I think it'll work just dandy if vdelivermail set's the HOME variable and writes the email to stdout. I attached a patch, but I think testing this is going to be a pita unless someone has some sort of shell 'vdelivermail' tester ? :O Holy crap it worked. Not only did it compile without error, but it actually worked as expected. The command: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236799820.50282.mx.vfemail.net,S=3365:2,S | env -v EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermailstdout '' r...@havokmon.com Causes the ./vdelivermail (which is compiled to send to STDOUT) to display the email in the terminal If I run: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236799820.50282.mx.vfemail.net,S=3365:2,S | env -v EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermail '' r...@havokmon.com The email will be delivered to my mailbox. So I've got a decent test environment. Now appending deliver to that first command line: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236751658.43485.mx.vfemail.net,S=3436:2,S | env EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermailstdout '' r...@havokmon.com | /usr/local/libexec/dovecot/deliver And it worked too! Wow. I'm blown away. I need a glass of champagne. Not that I didn't think it would work, but that it worked 'pefectly' without throwing an error on the first try. :) I think it took me longer to figure out how to test it in a shell. The only problem I see is the new message starts with a (null). (null)Delivered-To: r...@havokmon.com Now the null occurs whether I use deliver, the original vdelivermail, or the new vdelivermailstdout, so I think its part of the cat. I'll work on it a little more tomorrow, so I can go to bed happy tonite :) Rick !DSPAM:49d1032d32681689686421!
RE: [vchkpw] vdelivermail stdout to Dovecot deliver
I have a question about this. When I first implemented dSPAM I used the same method of nested pipes to handle delivery through .qmail-default. However the problem I ran into was if there was a problem in the first pipe that caused an error mail was lost due to the broken pipe. Is that something that could happen here? Is the pipe intelligent enough to see a failure and notify the previous process? And with regards to the environment variables, if you export them in the parent process shouldn't they be part of the environments of the child processes? Another possibility is piping through maildrop. That's the solution I ended up moving to for dSPAM since it was able to handle errors properly through an exception and xfilter clause. Based on the error codes dspamc sent I could re-queue or do other things. And to ensure that chkuser still functioned properly for bounce-no-mailbox you just setup the .qmail-default like this: | /usr/local/bin/maildrop /etc/maildroprc # bounce-no-mailbox Because chkuser only checks for the existence of bounce-no-mailbox in .qmail-default. It doesn't care about vdelivermail so adding it as a comment works perfectly. I'm not sure if this method would be worth doing in the case of dovecot, but it helped me get around some of the same issues with dSPAM, and ensure that mail was never lost. Regards, Tren -Original Message- From: Rick Romero [mailto:r...@havokmon.com] Sent: Monday, March 30, 2009 10:37 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] vdelivermail stdout to Dovecot deliver Ok. This won't work. My test system had all the variables set in the shell, which is why it worked. :( The reason it won't work is that qmail-local is the parent process of both vdelivermail AND deliver. If vdelivermail sets HOME, it does not apply to deliver's environment. :( On the up side, with vdelivermail sending the mail to STDOUT, if you do |/usr/local/vpopmail/bin/vdelivermailstdout | /usr/local/libexec/dovecot/deliver -d $...@$host It should deliver.. I'll try and test this tonite - on my test system I received an error 'email' in my INBOX when $EXT and $HOST didn't exist on my commandline. The caveat being you need to run the dovecot Auth on each machine that does delivery. :/ The other option would be for vdelivermail to call Dovecot's deliver after setting the environment. Programming question - if I write to fd0 (STDOUT), and then exec() a process, will that child process see the data I put in fd0 from the parent? Maybe I'll just try that as well. Rick Quoting Rick Romero r...@havokmon.com: On Wed, 2009-03-11 at 14:19 -0500, Rick Romero wrote: I think it'll work just dandy if vdelivermail set's the HOME variable and writes the email to stdout. I attached a patch, but I think testing this is going to be a pita unless someone has some sort of shell 'vdelivermail' tester ? :O Holy crap it worked. Not only did it compile without error, but it actually worked as expected. The command: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236799820.50282.m x.vfemail.net,S=3365:2,S | env -v EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermailstdout '' r...@havokmon.com Causes the ./vdelivermail (which is compiled to send to STDOUT) to display the email in the terminal If I run: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236799820.50282.m x.vfemail.net,S=3365:2,S | env -v EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermail '' r...@havokmon.com The email will be delivered to my mailbox. So I've got a decent test environment. Now appending deliver to that first command line: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236751658.43485.m x.vfemail.net,S=3436:2,S | env EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermailstdout '' r...@havokmon.com | /usr/local/libexec/dovecot/deliver And it worked too! Wow. I'm blown away. I need a glass of champagne. Not that I didn't think it would work, but that it worked 'pefectly' without throwing an error on the first try. :) I think it took me longer to figure out how to test it in a shell. The only problem I see is the new message starts with a (null). (null)Delivered-To: r...@havokmon.com Now the null occurs whether I use deliver, the original vdelivermail, or the new vdelivermailstdout, so I think its part of the cat. I'll work on it a little more tomorrow, so I can go to bed happy tonite :) Rick !DSPAM:49d1159e32681919617724!
RE: [vchkpw] vdelivermail stdout to Dovecot deliver
-Original Message- From: Tren Blackburn [mailto:t...@eotnetworks.com] Sent: Monday, March 30, 2009 11:55 AM To: vchkpw@inter7.com Subject: RE: [vchkpw] vdelivermail stdout to Dovecot deliver I have a question about this. When I first implemented dSPAM I used the same method of nested pipes to handle delivery through .qmail-default. However the problem I ran into was if there was a problem in the first pipe that caused an error mail was lost due to the broken pipe. Is that something that could happen here? Is the pipe intelligent enough to see a failure and notify the previous process? And with regards to the environment variables, if you export them in the parent process shouldn't they be part of the environments of the child processes? Another possibility is piping through maildrop. That's the solution I ended up moving to for dSPAM since it was able to handle errors properly through an exception and xfilter clause. Based on the error codes dspamc sent I could re-queue or do other things. And to ensure that chkuser still functioned properly for bounce-no-mailbox you just setup the .qmail-default like this: | /usr/local/bin/maildrop /etc/maildroprc # bounce-no-mailbox Because chkuser only checks for the existence of bounce-no-mailbox in .qmail-default. It doesn't care about vdelivermail so adding it as a comment works perfectly. I'm not sure if this method would be worth doing in the case of dovecot, but it helped me get around some of the same issues with dSPAM, and ensure that mail was never lost. Regards, Tren [Cleaver, J.C.] One option is patching vdelivermail to not see the final delivery through. At a previous location I was at, we had it leave files in Maildir/tmp and trigger an external script. If that exited successfully, vdeliermail left it in Maildir/tmp and exited OK -- presumably leaving that file there for later processing by some other script. If it didn't, back out of the delivery with a tempfail. Ideally, you would have that external script record an entry in a DB queue somewhere. Later on (later meaning a few async seconds later), the queue is polled and the final delivery process does whatever it wants with that guaranteed-safe file, it being responsible for dropping it in Maildir/new when it's complete. If everything goes according to plan, you should be guaranteed not to drop mail. The only drawback is that your final delivery script can't generate a bounce back out through the mail stream automatically, it would have to re-inject. Regards, Japheth Cleaver !DSPAM:49d11a8032681616791409!
RE: [vchkpw] vdelivermail stdout to Dovecot deliver
-Original Message- From: Cleaver, Japheth [mailto:jclea...@soe.sony.com] Sent: Monday, March 30, 2009 12:16 PM To: vchkpw@inter7.com Subject: RE: [vchkpw] vdelivermail stdout to Dovecot deliver -Original Message- From: Tren Blackburn [mailto:t...@eotnetworks.com] Sent: Monday, March 30, 2009 11:55 AM To: vchkpw@inter7.com Subject: RE: [vchkpw] vdelivermail stdout to Dovecot deliver I have a question about this. When I first implemented dSPAM I used the same method of nested pipes to handle delivery through .qmail- default. However the problem I ran into was if there was a problem in the first pipe that caused an error mail was lost due to the broken pipe. Is that something that could happen here? Is the pipe intelligent enough to see a failure and notify the previous process? And with regards to the environment variables, if you export them in the parent process shouldn't they be part of the environments of the child processes? Another possibility is piping through maildrop. That's the solution I ended up moving to for dSPAM since it was able to handle errors properly through an exception and xfilter clause. Based on the error codes dspamc sent I could re-queue or do other things. And to ensure that chkuser still functioned properly for bounce-no-mailbox you just setup the .qmail-default like this: | /usr/local/bin/maildrop /etc/maildroprc # bounce-no-mailbox Because chkuser only checks for the existence of bounce-no-mailbox in .qmail-default. It doesn't care about vdelivermail so adding it as a comment works perfectly. I'm not sure if this method would be worth doing in the case of dovecot, but it helped me get around some of the same issues with dSPAM, and ensure that mail was never lost. Regards, Tren [Cleaver, J.C.] One option is patching vdelivermail to not see the final delivery through. At a previous location I was at, we had it leave files in Maildir/tmp and trigger an external script. If that exited successfully, vdeliermail left it in Maildir/tmp and exited OK -- presumably leaving that file there for later processing by some other script. If it didn't, back out of the delivery with a tempfail. Hmmm...it seems to me like that wouldn't scale very well, and could possibly get messy if you're dealing with a cluster of SMTP delivery nodes. But it's another way for sure. Maildrop doesn't require any hacking of vdelivermail as it's a drop-in replacement for it since vdelivermail is called at the end of maildrop after all the filtering is done inside. This guarantees no loss of mail, without needing extra external processes. Ideally, you would have that external script record an entry in a DB queue somewhere. Later on (later meaning a few async seconds later), the queue is polled and the final delivery process does whatever it wants with that guaranteed-safe file, it being responsible for dropping it in Maildir/new when it's complete. If everything goes according to plan, you should be guaranteed not to drop mail. The only drawback is that your final delivery script can't generate a bounce back out through the mail stream automatically, it would have to re-inject. How much additional overhead is caused due to re-injection over re-queuing? It seems like this requires on quite a few additional pieces that are outside of the qmail delivery path and if any of them break or not work as expected, could delay final delivery infinitely due to messages gathering in the tmp folder. I'm unsure how you would handle remote delivery with this method as it seems to assume the final mailbox is on the same server/cluster as the delivery process. Ideally we shouldn't need *any* of these hacks, maildrop or otherwise. It'd be nice to plug in a different delivery method to qmail. However, that's not really an option, so we build what we can to do what we need, and we all have different needs usually. :) Regards, Tren !DSPAM:49d1215832689616257855!
RE: [vchkpw] vdelivermail stdout to Dovecot deliver
What I'm trying to work around with this method is to handle user-specific .qmail directives. Dovecot doesn't do that, and that is why I can't full out replace vdelivermail with deliver. As for pipes, I see where you're coming from, and it's probably best to not chain pipes, but instead exec the deliver process from within vdelivermail just as it would a user-specific .qmail directive. I was having problems with that, but you've just given me another avenue to try - vdelivermail will exec piped commands, so I may be able to re-use that code. Then your 'piped program failed' action should be no different than when maildrop or procmail is called from .qmail. The problem with the environments is that piping doesn't appear to be creating a child process of the previous command (within .qmail-default). fd1 (I think that's STDOUT) is a persistent file descriptor which each piped process can read, but qmail-local is the actual parent process of everything that runs from .qmail-default - vdelivermail is the parent of everything that runs from ~user/.qmail. I also discovered that I have an .inbox under my domain folder after testing dovecot deliver because $home was set to my domain, which qmail-local does. Unfortuantely it's tried and true :/ Rick On Mon, 2009-03-30 at 11:55 -0700, Tren Blackburn wrote: I have a question about this. When I first implemented dSPAM I used the same method of nested pipes to handle delivery through .qmail-default. However the problem I ran into was if there was a problem in the first pipe that caused an error mail was lost due to the broken pipe. Is that something that could happen here? Is the pipe intelligent enough to see a failure and notify the previous process? And with regards to the environment variables, if you export them in the parent process shouldn't they be part of the environments of the child processes? Another possibility is piping through maildrop. That's the solution I ended up moving to for dSPAM since it was able to handle errors properly through an exception and xfilter clause. Based on the error codes dspamc sent I could re-queue or do other things. And to ensure that chkuser still functioned properly for bounce-no-mailbox you just setup the .qmail-default like this: | /usr/local/bin/maildrop /etc/maildroprc # bounce-no-mailbox Because chkuser only checks for the existence of bounce-no-mailbox in .qmail-default. It doesn't care about vdelivermail so adding it as a comment works perfectly. I'm not sure if this method would be worth doing in the case of dovecot, but it helped me get around some of the same issues with dSPAM, and ensure that mail was never lost. Regards, Tren -Original Message- From: Rick Romero [mailto:r...@havokmon.com] Sent: Monday, March 30, 2009 10:37 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] vdelivermail stdout to Dovecot deliver Ok. This won't work. My test system had all the variables set in the shell, which is why it worked. :( The reason it won't work is that qmail-local is the parent process of both vdelivermail AND deliver. If vdelivermail sets HOME, it does not apply to deliver's environment. :( On the up side, with vdelivermail sending the mail to STDOUT, if you do |/usr/local/vpopmail/bin/vdelivermailstdout | /usr/local/libexec/dovecot/deliver -d $...@$host It should deliver.. I'll try and test this tonite - on my test system I received an error 'email' in my INBOX when $EXT and $HOST didn't exist on my commandline. The caveat being you need to run the dovecot Auth on each machine that does delivery. :/ The other option would be for vdelivermail to call Dovecot's deliver after setting the environment. Programming question - if I write to fd0 (STDOUT), and then exec() a process, will that child process see the data I put in fd0 from the parent? Maybe I'll just try that as well. Rick Quoting Rick Romero r...@havokmon.com: On Wed, 2009-03-11 at 14:19 -0500, Rick Romero wrote: I think it'll work just dandy if vdelivermail set's the HOME variable and writes the email to stdout. I attached a patch, but I think testing this is going to be a pita unless someone has some sort of shell 'vdelivermail' tester ? :O Holy crap it worked. Not only did it compile without error, but it actually worked as expected. The command: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236799820.50282.m x.vfemail.net,S=3365:2,S | env -v EXT=rick HOST=havokmon.com HOME=/home/vpopmail/domains/havokmon.com/rick /usr/local/vpopmail/bin/vdelivermailstdout '' r...@havokmon.com Causes the ./vdelivermail (which is compiled to send to STDOUT) to display the email in the terminal If I run: cat /home/vpopmail/domains/havokmon.com/rick/Maildir/cur/1236799820.50282.m x.vfemail.net,S=3365:2,S | env -v EXT=rick HOST
Re: [vchkpw] vdelivermail stdout to Dovecot deliver
On Mon, Mar 30, 2009 at 11:06 PM, Rick Romero r...@havokmon.com wrote: Programming question - if I write to fd0 (STDOUT), and then exec() a process, will that child process see the data I put in fd0 from the parent? Maybe I'll just try that as well. make fd0 a file (using makeseekable) and do lseek (0, 0L, SEEK_SET); Attached is a function which can make stdin seekable. !DSPAM:49d192c032681954743819! makeseekable.c Description: Binary data
RE: [vchkpw] vdelivermail stdout to Dovecot deliver
But regardless of whether the parent is qmail-local or vdelivermail, vdelivermail still provides the same environment variables. I did a test by writing a quick one line shell script that wrote the environment variables to a file and ran it from /home/vpopmail/domains/test.com/test/.qmail via a pipe. It sets all the environment variables that you need: DEFAULT=test DTLINE='Delivered-To: test.com-t...@test.com ' EXT=test EXT2= EXT3= EXT4= HOME=/home/vpopmail/domains/test.com HOST=test.com HOST2=test HOST3=test HOST4=test LOCAL=test.com-test newsender=r...@mx3.eotnetworks.com PWD=/home/vpopmail/domains/test.com/test recipient=test.com-t...@test.com RPLINE='Return-Path: r...@mx3.eotnetworks.com ' sender=r...@mx3.eotnetworks.com UFLINE='From r...@mx3.eotnetworks.com Tue Mar 31 05:17:31 2009 ' USER=test.com _=/home/vpopmail/etc/test.sh You should have all the environment variables you need/want there. And if you need something extra, just have vdelivermail set the environment variable and the pipe in user/.qmail will pick it up, or if using maildrop, use the import command to bring the variables you need in and go crazy. I'd still using something like maildrop that lets you properly handle the pipe as it only requires one pipe; nested pipes cause mail loss when they break due to not being able to properly pass exit codes through the extra pipe (or so it was explained to me when I was fighting with that issue). Maildrop can be setup to handle any circumstance you have to deal with and just defer delivery until the problem is resolved without causing mail loss. Hope that helps, Tren -Original Message- From: Rick Romero [mailto:r...@havokmon.com] Sent: Monday, March 30, 2009 7:32 PM To: vchkpw@inter7.com Subject: RE: [vchkpw] vdelivermail stdout to Dovecot deliver What I'm trying to work around with this method is to handle user-specific .qmail directives. Dovecot doesn't do that, and that is why I can't full out replace vdelivermail with deliver. As for pipes, I see where you're coming from, and it's probably best to not chain pipes, but instead exec the deliver process from within vdelivermail just as it would a user-specific .qmail directive. I was having problems with that, but you've just given me another avenue to try - vdelivermail will exec piped commands, so I may be able to re-use that code. Then your 'piped program failed' action should be no different than when maildrop or procmail is called from .qmail. The problem with the environments is that piping doesn't appear to be creating a child process of the previous command (within .qmail-default). fd1 (I think that's STDOUT) is a persistent file descriptor which each piped process can read, but qmail-local is the actual parent process of everything that runs from .qmail-default - vdelivermail is the parent of everything that runs from ~user/.qmail. I also discovered that I have an .inbox under my domain folder after testing dovecot deliver because $home was set to my domain, which qmail-local does. Unfortuantely it's tried and true :/ Rick On Mon, 2009-03-30 at 11:55 -0700, Tren Blackburn wrote: I have a question about this. When I first implemented dSPAM I used the same method of nested pipes to handle delivery through .qmail- default. However the problem I ran into was if there was a problem in the first pipe that caused an error mail was lost due to the broken pipe. Is that something that could happen here? Is the pipe intelligent enough to see a failure and notify the previous process? And with regards to the environment variables, if you export them in the parent process shouldn't they be part of the environments of the child processes? Another possibility is piping through maildrop. That's the solution I ended up moving to for dSPAM since it was able to handle errors properly through an exception and xfilter clause. Based on the error codes dspamc sent I could re-queue or do other things. And to ensure that chkuser still functioned properly for bounce-no-mailbox you just setup the .qmail-default like this: | /usr/local/bin/maildrop /etc/maildroprc # bounce-no-mailbox Because chkuser only checks for the existence of bounce-no-mailbox in .qmail-default. It doesn't care about vdelivermail so adding it as a comment works perfectly. I'm not sure if this method would be worth doing in the case of dovecot, but it helped me get around some of the same issues with dSPAM, and ensure that mail was never lost. Regards, Tren -Original Message- From: Rick Romero [mailto:r...@havokmon.com] Sent: Monday, March 30, 2009 10:37 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] vdelivermail stdout to Dovecot deliver Ok. This won't work. My test system had all the variables set in the shell, which is why it worked. :( The reason it won't work is that qmail-local is the parent process of both vdelivermail
[vchkpw] vdelivermail delete for the win
After my recent issues with maildrop and delivering mail, I got to know my system a little better. Having scanned through the qmail-queue I noticed a lot of messages just sitting around for days on end trying to deliver to non-existent email boxes, in response to spammers. Some of my bigger customers had all email set to 'bounce' and not 'delete'. Several hundred e-mail accounts getting several thousand spams a day ended up creating a constant flow of between 10,000 and 20,000 mail messages bouncing in the qmail-queue on a daily basis. I was getting pretty worried about the hard disks that contain my mail queue and the /var/vpopmail/domains tree. They were dishing out between 250 - 400 (I've seen it as high as 800) transactions per second on average. After setting vdelivermail delete on some of my bigger domains, my queue has dropped to under 1000 messages, and iostat shows a SIGNIFICANT decrease in disk activity during both peak and off-peak times. I wish someone had told me about that earlier. What a great tool for reducing unnecessary load. !DSPAM:477e0c4c310541912799895!
Re: [vchkpw] vdelivermail delete for the win
Hi I am about to install John M. Simpsons suite of patches around validrcptto.cdb, see: http://qmail.jms1.net/patches/validrcptto.cdb.shtml The onchange patch, see: http://qmail.jms1.net/vpopmail/ In order to only recieve mail, on my system, for which I have a valid recipient. Allan Dukat E|:-{)= On Fri, 4 Jan 2008, Matthew Goodman wrote: After my recent issues with maildrop and delivering mail, I got to know my system a little better. Having scanned through the qmail-queue I noticed a lot of messages just sitting around for days on end trying to deliver to non-existent email boxes, in response to spammers. Some of my bigger customers had all email set to 'bounce' and not 'delete'. Several hundred e-mail accounts getting several thousand spams a day ended up creating a constant flow of between 10,000 and 20,000 mail messages bouncing in the qmail-queue on a daily basis. I was getting pretty worried about the hard disks that contain my mail queue and the /var/vpopmail/domains tree. They were dishing out between 250 - 400 (I've seen it as high as 800) transactions per second on average. After setting vdelivermail delete on some of my bigger domains, my queue has dropped to under 1000 messages, and iostat shows a SIGNIFICANT decrease in disk activity during both peak and off-peak times. I wish someone had told me about that earlier. What a great tool for reducing unnecessary load. !DSPAM:477e2355310542473718141!
Re: [vchkpw] vdelivermail delete for the win
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matthew Goodman wrote: I wish someone had told me about that earlier. What a great tool for reducing unnecessary load. An ever better tool is the chkuser patch and vdelivermail set to bounce so the message never even reaches qmail-queue. - -- /* Matt Brookings [EMAIL PROTECTED] GnuPG Key ABA26FE7 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org iD8DBQFHflE4Yaj0Mauib+cRArpOAKCg61nk0EwTLdZdOQev+uQJ+G7dLQCeK0/o urTGbkw0uXyh5PJ3A7ljbKo= =9imd -END PGP SIGNATURE-
RE: [vchkpw] vdelivermail delete for the win
Hmm I may have to check that out :) Working with Gentoo ebuilds and what-not, so I don't get all the cl packages. I know you all have a p0f-qmail install too. Almost had you guys do it... I put it aside for the holidays though. -Original Message- From: Matt Brookings [mailto:[EMAIL PROTECTED] Sent: Friday, January 04, 2008 5:31 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] vdelivermail delete for the win -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matthew Goodman wrote: I wish someone had told me about that earlier. What a great tool for reducing unnecessary load. An ever better tool is the chkuser patch and vdelivermail set to bounce so the message never even reaches qmail-queue. - -- /* Matt Brookings [EMAIL PROTECTED] GnuPG Key ABA26FE7 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org iD8DBQFHflE4Yaj0Mauib+cRArpOAKCg61nk0EwTLdZdOQev+uQJ+G7dLQCeK0/o urTGbkw0uXyh5PJ3A7ljbKo= =9imd -END PGP SIGNATURE- !DSPAM:477e726f310541851520309!
[vchkpw] vdelivermail(?) QUEUE_EXTRA problem
Hey all, I'm setting up an additional MX for my domains, and while normal delivery works fine, my queue_extra doesn't work. I have the same setup as on another server (also 5.4.17), and that server works fine. extra.h: #define QUEUE_EXTRA Tlog\0 #define QUEUE_EXTRALEN 5 mx# cat /var/qmail/alias/.qmail-log # Keep a copy of all incoming and outgoing messages # in the /home/archive/mail/.070212_Mon/ folder: /home/archive/mail/.070212_Mon/ mx# ls -la /home/archive/mail/.070212_Mon/ total 14 drwxrwxrwx5 vpopmail vchkpw 512 Feb 12 00:01 . drwxr-xr-x 222 root wheel 4608 Feb 12 00:01 .. drwxrwxrwx2 vpopmail vchkpw 512 Feb 12 00:01 cur drwxrwxrwx2 vpopmail vchkpw 512 Feb 12 00:01 new drwxrwxrwx2 vpopmail vchkpw 512 Feb 12 00:01 tmp When I send an email to myself, the send log shows: 2007-02-12 11:46:40.150406500 new msg 7961560 2007-02-12 11:46:40.150426500 info msg 7961560: bytes 197 from [EMAIL PROTECTED] qp 43854 uid 89 2007-02-12 11:46:40.150484500 starting delivery 569: msg 7961560 to local [EMAIL PROTECTED] 2007-02-12 11:46:40.150539500 status: local 1/10 remote 0/100 2007-02-12 11:46:40.150623500 starting delivery 570: msg 7961560 to local [EMAIL PROTECTED] 2007-02-12 11:46:40.151853500 status: local 2/10 remote 0/100 2007-02-12 11:46:40.536058500 delivery 569: failure: maildirmake:_No_such_file_or_directory/Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/ mx# cat /var/qmail/control/me vfemail.net I can send email to everyone that I host, except the log alias doesn't work. If I put the alias in the valias table, I get: 2007-02-12 11:54:35.703769500 delivery 604: success: maildirmake:_No_such_file_or_directory/vdelivermail:_valiases_processed/did_0+0+2/ So it'll work with valias - but spawn an error. The aliases/.qmail-log method doesn't work at all. Rights should be fine, it's all global for the moment, and I'm delivering across NFS without an issue. My setup is based on Matt Simerson's scripts, so it's already pretty consistant. Any ideas? Thanks, Rick
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
Rick Inserting maildrop into .qmail-default is a fine implementation solution but this patch provide thoses advantages : - Maildrop handle correctly the maildir quota (and in you mailfilter sample you should handle the exit codde 77). But for example, this configuration will nevers bounce the quota-warn and over-quota message ... - Imagine you use and admin tool like qmailadmin, you'll have to patch it to modify permanently the behavior of .qmail-default of the domain. This patch let you use you mailfterfile in very simple way handling all specific case maildrop do, and the implementation is in our mind cleanest ... for many raison. Hoping this feature help. Regards, Jerome MOLLIER-PIERRET Rick Romero a écrit : On Thu, 2006-10-26 at 12:39 -0400, John Simpson wrote: On 2006-10-26, at 0359, Jérôme MOLLIER-PIERRET wrote: John Simpson a écrit : also, what if a user (i.e. the owner of one specific mailbox) wants to create their own .mailfilter file, either directly or using some kind of web interface which gives them a set of options and writes a .mailfilter file based on their choices? i would search for /home/vpopmail/domains/.mailfilter-userid before the file names you're already checking for. This case is not implemented in the patch, and therefore because it is not simple to handle .qmail-* style for maildrop. But it should be very easy to do this in maildrop style in the main or referal .mailfilter file. For the web interface, i agree ... it would be very nice. But there is lot of job to do before :))) that's what i was thinking- at some point in the future, somebody (maybe myself, if i ever get some free time) (yeah, right) will want to write a web interface which gives individual mailbox owners the ability to either edit their own .mailfilter file, or choose from a list of options which will cause the web back-end to create or modify a per-mailbox .mailfilter file, maybe using some kind of templates to support each available option. Horde has a module that allows for mailfiler file modification, but I haven't looked into it. It uses FTP to put it in the user's mailbox. Also, There's an FTP Server called Pure-FTPd that can auth against MySQL, and use that home folder as the user's FTP folder (this I've used to give my mail users an FTP option) - so something is out there to implement. I just don't trust my users with, IMHO essentially, shell access. i just don't like seeing patches which lock out future possibilities. flexibility is a good thing. other than that, your patch looks like a good idea. I don't know what everyone else is doing, but my .qmail-default looks like this: |maildrop /home/vpopmail/domains/havokmon.com/mailfilter | /usr/home/vpopmail/bin/vdelivermail '' /usr/home/vpopmail/domains/havokmon.com/rick And my mailfiler is essentially: SHELL=/bin/sh VHOME=`/usr/local/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] if (/^X-Spam-Status: Yes*/) { # Delete messages with a score of 10 or higher, filter all other # spam messages into a spam folder /^X-Spam-Status: yes, (hits|score)=![:digit:]+\.[:digit:]+!.*/ if ( $MATCH2 = 10.0 ) { exception { EXITCODE = 99 to /dev/null exit } } else { # then try delivering it to a Spam folder exception { EXITCODE = 99 to $VHOME/Maildir/.Spam/ exit } } } exit I forget exactly what option does it - it's either the EXITCODE with exit, and or the exception{} blocks, but my .qmail-default is processeed entirely. It took a bit of searching to get that to work - it was a few years ago... Rick
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
On Fri, 2006-10-27 at 09:42 +0200, Jérôme MOLLIER-PIERRET wrote: Rick Inserting maildrop into .qmail-default is a fine implementation solution but this patch provide thoses advantages : - Maildrop handle correctly the maildir quota (and in you mailfilter sample you should handle the exit codde 77). But for example, this configuration will nevers bounce the quota-warn and over-quota message ... - Imagine you use and admin tool like qmailadmin, you'll have to patch it to modify permanently the behavior of .qmail-default of the domain. Ahhh That's what I was missing - I wasn't sure what wasn't covered by what I was doing. Thanks. :) Rick
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
John Simpson a écrit : what if there happens to be a mailbox with the name mailfilter? (yes, it's a rather contrived example, but you see some really weird stuff when you run an ISP... as an example, we had one user who ran one of the local post offices and wanted postmaster as his userid, the tech support guy who took the signup told him he could have it, and i was the one who got to call him back and explain why he couldn't have it... i ended up telling him it was already used, and that was that. of course for the next three weeks i got a series of who are you? emails to the postmaster mailbox from this guy...) instead of using mailfilter, you should probably use .mailfilter as the filename. names starting with a letter or number should really be reserved for mailbox names. Yes your remark is good, just have to sed mailfilter by .mailfilter ... in the patch file. also, what if a user (i.e. the owner of one specific mailbox) wants to create their own .mailfilter file, either directly or using some kind of web interface which gives them a set of options and writes a .mailfilter file based on their choices? i would search for /home/vpopmail/domains/.mailfilter-userid before the file names you're already checking for. This case is not implemented in the patch, and therefore because it is not simple to handle .qmail-* style for maildrop. But it should be very easy to do this in maildrop style in the main or referal .mailfilter file. For the web interface, i agree ... it would be very nice. But there is lot of job to do before :))) Jérôme MOLLIER-PIERRET
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
On Oct 25, 2006, at 8:52 AM, Jérôme MOLLIER-PIERRET wrote: You'll find our patch below, if it can help someone ... I'll put it in my personal patch queue for inclusion in a future release of vpopmail, but since I don't use maildrop, I may not include it unless others tell me it's worth adding. Let us know, but if you add this to future realease it would be nice to include IFDEF header to activate or not this feature in the configure... Please upload it to SourceForge http://vpopmail.sf.net/ so there's a permanent record of it out there, and someone searching for that functionality can use your patch until it's added to the release versions of vpopmail. I'll post it today. Regards, Jérôme.
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
On 2006-10-26, at 0359, Jérôme MOLLIER-PIERRET wrote: John Simpson a écrit : also, what if a user (i.e. the owner of one specific mailbox) wants to create their own .mailfilter file, either directly or using some kind of web interface which gives them a set of options and writes a .mailfilter file based on their choices? i would search for /home/vpopmail/domains/.mailfilter-userid before the file names you're already checking for. This case is not implemented in the patch, and therefore because it is not simple to handle .qmail-* style for maildrop. But it should be very easy to do this in maildrop style in the main or referal .mailfilter file. For the web interface, i agree ... it would be very nice. But there is lot of job to do before :))) that's what i was thinking- at some point in the future, somebody (maybe myself, if i ever get some free time) (yeah, right) will want to write a web interface which gives individual mailbox owners the ability to either edit their own .mailfilter file, or choose from a list of options which will cause the web back-end to create or modify a per-mailbox .mailfilter file, maybe using some kind of templates to support each available option. i just don't like seeing patches which lock out future possibilities. flexibility is a good thing. other than that, your patch looks like a good idea. -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ [EMAIL PROTECTED] | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
On 2006-10-26, at 1251, Rick Romero wrote: I don't know what everyone else is doing, but my .qmail-default looks like this: |maildrop /home/vpopmail/domains/havokmon.com/mailfilter | /usr/home/vpopmail/bin/vdelivermail '' /usr/home/vpopmail/domains/havokmon.com/rick And my mailfiler is essentially: ... # Delete messages with a score of 10 or higher, filter all other # spam messages into a spam folder /^X-Spam-Status: yes, (hits|score)=![:digit:]+\.[:digit:]+!.*/ if ( $MATCH2 = 10.0 ) { exception { EXITCODE = 99 to /dev/null it's been my experience that this line is not necessary, just setting EXITCODE=99 and then exit is enough to cause the message to NOT be delivered anywhere. I forget exactly what option does it - it's either the EXITCODE with exit, and or the exception{} blocks, but my .qmail-default is processeed entirely. setting EXITCODE to 99 tells qmail-local (which is what actually reads the .qmail file) that the delivery is done, it was successful, and it should stop processing the .qmail file (i.e. don't go on to the next line.) the exit codes are documented in man qmail- command. -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ [EMAIL PROTECTED] | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
that's what i was thinking- at some point in the future, somebody (maybe myself, if i ever get some free time) (yeah, right) will want to write a web interface which gives individual mailbox owners the ability to either edit their own .mailfilter file, or choose from a list of options which will cause the web back-end to create or modify a per-mailbox .mailfilter file, maybe using some kind of templates to support each available option. sqwebmail provides some ability to generate .mailfilter files although the interface isn't the greatest. There is also a module for squirrelmail too that generates .mailfilter files. However I had to make some changes before it would work properly.
[vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
Dear list, We were looking over internet for someone who patched vdelivermail in order to call maildrop in the delivery process for filtering purpose. This kind of implementation using maildrop for filtering seems to be the cleanest way for us in our mind, because we do not have to change .qmail-default behavior in many ways (ie because of other qmail tools like qmailadmin…). And therefore, using vdelivermail make us sure to do many more check regarding vpopmail, like for sample ‘bouncing over-quota mails over full mailboxes’ and reading dot qmail files. We founded a patch located here : http://katastrophos.net/andre/blog/2006/10/03/vpopmail-maildrop-sqwebmail-mailfilter-patch/ but after many check and test this was not as clean as we wanted. So we rewritted a patch from scratch, witch is working fine in ours tests … in synthesis : This patch keep the behavior of vdelivermail on all delivering cases (like bouncing, deferals …). This is particularly important on the way that vdelivermail handle quota, and the users notifications. It also has the granularity of a using a mailfilter configuration file for domains (ie /home/vpopmail/domains/onedomain/mailfilter), all domains (ie /home/vpopmail/domains/mailfilter) … and indeed a default one in /etc/mailfilter. If no mailfilter file is present, vdelivermail act as it does naturally. You'll find our patch below, if it can help someone ... Any feedback would be cool :) Regards, --- vpopmail-5.4.17/vdelivermail.c 2006-06-29 21:36:43.0 +0200 +++ vpopmail-5.4.17.patchmaildrop_actinux/vdelivermail.c 2006-10-25 16:59:17.0 +0200 @@ -22,6 +22,13 @@ * */ +/* Patch insertion for using maildrop delivery program October 2006 + * by Actinux Team + * Jerome MOLLIER-PIERRET [EMAIL PROTECTED], + * Brian PASSANTE [EMAIL PROTECTED] + * + */ + /* include files */ #include unistd.h #include stdlib.h @@ -81,6 +88,9 @@ /* from qmail's wait.h for run_command() */ #define wait_exitcode(w) ((w) 8) +/* Maildrop binary path */ +#define MAILDROP /usr/local/bin/maildrop + /* Forward declarations */ int process_valias(void); void get_arguments(int argc, char **argv); @@ -93,6 +103,7 @@ void usernotfound(void); int is_loop_match( const char *dt, const char *address); int deliver_quota_warning(const char *dir, const char *q); +int launchmaildrop(void); /* print an error string and then exit @@ -610,7 +621,7 @@ maildir_to_email(address)); } -switch (deliver_to_maildir (address, DeliveredTo, 0, message_size)) { +switch (launchmaildrop()) { case -1: vexiterr (EXIT_OVERQUOTA, user is over quota); break; @@ -620,6 +631,22 @@ case -3: vexiterr (EXIT_BOUNCE, mail is looping); break; +case -200: + /*start the old launch */ + printf (trying_normal_delivery: ); + switch (deliver_to_maildir (address, DeliveredTo, 0, message_size)) { +case -1: + vexiterr (EXIT_OVERQUOTA, user is over quota); + break; + case -2: + vexiterr (EXIT_DEFER, system error); + break; + case -3: + vexiterr (EXIT_BOUNCE, mail is looping); + break; + default: + return; + } default: return; } @@ -1042,6 +1069,7 @@ maildir_to_email(newdir), date_header()); } + err = deliver_to_maildir (dir, DeliveredTo, read_fd, sb.st_size); close (read_fd); @@ -1063,3 +1091,67 @@ return (strcasecmp (compare, (dt+14)) == 0); } + +int launchmaildrop(void) +{ + char *prog; + int child; + char *(args[4]); + int wstat; + char mailfilter_file[256]; + FILE *fs; + + printf(trying_through_maildrop: ); + + sprintf(mailfilter_file, %s/mailfilter,TheDomainDir); + if ( (fs=fopen(mailfilter_file, r)) == NULL ) { + /* if no mailfilter in domain then check in vpopmail dir */ + sprintf(mailfilter_file, %s/%s/mailfilter,VPOPMAILDIR,DOMAINS_DIR); + if ( (fs=fopen(mailfilter_file, r)) == NULL ) { + /* if no mailfilter in vpopmail dir check in /etc/ */ + sprintf(mailfilter_file, /etc/mailfilter); + if ( (fs=fopen(mailfilter_file, r)) == NULL ) { + /* no mailfilter file present */ + printf(Ouups,_no_mailfilter_file: ); + return -200; + } + } + } + +snprintf(prog, AUTH_SIZE, | /usr/bin/env HOME=%s VDOMAINDIR=%s VUSERDIR=%s VUSER=%s VDOMAIN=%s preline \%s\ %s, TheDomainDir, TheDomainDir, vpw-pw_dir, TheUser, TheDomain, MAILDROP, mailfilter_file); + +/*to put maildrop in debug mode uncomment theses line +snprintf(prog, AUTH_SIZE, | /usr/bin/env HOME=%s VDOMAINDIR=%s VUSERDIR=%s VUSER=%s VDOMAIN=%s
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
On Oct 25, 2006, at 8:52 AM, Jérôme MOLLIER-PIERRET wrote: You'll find our patch below, if it can help someone ... I'll put it in my personal patch queue for inclusion in a future release of vpopmail, but since I don't use maildrop, I may not include it unless others tell me it's worth adding. Please upload it to SourceForge http://vpopmail.sf.net/ so there's a permanent record of it out there, and someone searching for that functionality can use your patch until it's added to the release versions of vpopmail. -- Tom Collins - [EMAIL PROTECTED] Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/ QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/
Re: [vchkpw] vdelivermail patch in order to handle maildrop filtering capabilities
On 2006-10-25, at 1152, Jérôme MOLLIER-PIERRET wrote: It also has the granularity of a using a mailfilter configuration file for domains (ie /home/vpopmail/domains/onedomain/mailfilter), all domains (ie /home/vpopmail/domains/mailfilter) … and indeed a default one in /etc/mailfilter. what if there happens to be a mailbox with the name mailfilter? (yes, it's a rather contrived example, but you see some really weird stuff when you run an ISP... as an example, we had one user who ran one of the local post offices and wanted postmaster as his userid, the tech support guy who took the signup told him he could have it, and i was the one who got to call him back and explain why he couldn't have it... i ended up telling him it was already used, and that was that. of course for the next three weeks i got a series of who are you? emails to the postmaster mailbox from this guy...) instead of using mailfilter, you should probably use .mailfilter as the filename. names starting with a letter or number should really be reserved for mailbox names. also, what if a user (i.e. the owner of one specific mailbox) wants to create their own .mailfilter file, either directly or using some kind of web interface which gives them a set of options and writes a .mailfilter file based on their choices? i would search for /home/ vpopmail/domains/.mailfilter-userid before the file names you're already checking for. -- | John M. Simpson - KG4ZOW - Programmer At Large | | http://www.jms1.net/ [EMAIL PROTECTED] | -- | Mac OS X proves that it's easier to make UNIX | | pretty than it is to make Windows secure. | -- PGP.sig Description: This is a digitally signed message part
Re: [vchkpw] vdelivermail qmail-queue ALPHA patch - take 3
On May 9, 2006, at 12:57 PM, Jeremy Kitchen wrote: the problem is that vpopmail is using qmail-inject to forward messages. qmail-inject does not tolerate malformed messages. it's that simple. Any volunteers to review the code in vdelivermail.c and modify it to use qmail-queue instead of qmail-inject? OK, here's a quick stab at a basic patch - I modified qmail_inject_open to open qmail-queue appropriately (no args), and changed deliver_mail to talk to it. I THINK :) There's no bounds checking and so forth in here, there are a few places where there really needs to be some extra code to make sure that the data acquired is valid, but it's designed to be proof-of-concept. It compiles, but that's all I can guarantee. Use at your own risk, yada yada... Feel free to modify it as needed, I have no ego attached to this code :) OK, so I can't stand writing sloppy code :) Here's an updated version of the patch that handles things a little better (albeit in a slightly more complicated manner), and cleans up a couple remaining stragglers of the changeover. And here's another update. I realized as I was driving home last night that I'd made a mistake (that's what I get for coding while tired :)) and was printing double NULLs in the envelope. This fixes it (and simplifies the code a little too). Josh -- Joshua Megerman SJGames MIB #5273 - OGRE AI Testing Division You can't win; You can't break even; You can't even quit the game. - Layman's translation of the Laws of Thermodynamics --- vdelivermail.c.orig 2006-05-09 17:35:00.0 -0400 +++ vdelivermail.c 2006-05-10 09:09:19.0 -0400 @@ -72,6 +72,7 @@ #define BUFF_SIZE 300 int fdm; +int fde; #define EXIT_BOUNCE 100 #define EXIT_DEFER 111 @@ -304,33 +305,41 @@ } #endif -/* Forks off qmail-inject. Returns PID of child, or 0 for failure. */ -pid_t qmail_inject_open(char *address) +/* Forks off qmail-queue. Returns PID of child, or 0 for failure. */ +pid_t qmail_queue_open() { int pim[2]; + int pie[2]; + pid_t pid; - static char *binqqargs[4]; + static char *binqqargs[2]; if ( pipe(pim) == -1) return 0; +if ( pipe(pie) == -1) return 0; switch(pid=vfork()){ case -1: close(pim[0]); close(pim[1]); +close(pie[0]); +close(pie[1]); printf (Unable to fork: %d., errno); return 0; case 0: close(pim[1]); +close(pie[1]); if (vfd_move(0,pim[0]) == -1 ) _exit(-1); +if (vfd_move(1,pie[0]) == -1 ) _exit(-1); binqqargs[0] = QMAILINJECT; -binqqargs[1] = --; -binqqargs[2] = (*address == '' ? address[1] : address[0]); +binqqargs[1] = 0; execv(*binqqargs, binqqargs); -printf (Unable to launch qmail-inject.); +printf (Unable to launch qmail-queue.); exit (EXIT_DEFER);/* child's exit caught later */ } fdm = pim[1]; +fde = pie[1]; close(pim[0]); +close(pie[0]); return(pid); } @@ -628,10 +637,18 @@ char *dtline; char *atpos; int dtlen; + char *sender = 0; + char keychar[2] = { 'F', 'T' }; + char *envptrs[4] = { keychar, sender, keychar+1, address }; + int envlens[4] = { 1, 0, 1, 0 }; // sender and address get initialized later + int writestr; if (*address=='') ++address; /* will this case ever happen? */ - inject_pid = qmail_inject_open(address); - if (inject_pid == 0) vexiterr (EXIT_DEFER, system error, can't open qmail-inject); + envptrs[3] = address; + envlens[3] = strlen(address) + 1; + + inject_pid = qmail_queue_open(); + if (inject_pid == 0) vexiterr (EXIT_DEFER, system error, can't open qmail-queue); /* use the DTLINE variable, but skip past the dash in * [EMAIL PROTECTED] @@ -665,13 +682,33 @@ } if (fdcopy (fdm, 0, DeliveredTo, strlen(DeliveredTo)) != 0) { - printf (write to qmail-inject failed: %d\n, errno); + printf (write to qmail-queue failed: %d\n, errno); close(fdm); + close(fde); waitpid(inject_pid,child,0); vexiterr (EXIT_DEFER, system error); } + if (!(sender = getenv(SENDER))) { + printf (unable to acquire SENDER from environment\n); + close(fdm); + close(fde); + vexiterr (EXIT_DEFER, system error); + } + envptrs[1] = sender; + envlens[1] = strlen(sender) + 1; + + for (writestr = 0; writestr 4; writestr++) { +if ((write(fde, (void *)envptrs[writestr], envlens[writestr])) != envlens[writestr]) { +printf (write to qmail-queue failed: %d\n, errno); +close(fdm); +close(fde); +vexiterr (EXIT_DEFER, system error); +} + } + close(fdm); + close(fde); waitpid(inject_pid,child,0); if (wait_exitcode(child) == 0) return; vexiterr (EXIT_DEFER,
Re: [vchkpw] vdelivermail qmail-queue ALPHA patch
On May 9, 2006, at 12:57 PM, Jeremy Kitchen wrote: the problem is that vpopmail is using qmail-inject to forward messages. qmail-inject does not tolerate malformed messages. it's that simple. Any volunteers to review the code in vdelivermail.c and modify it to use qmail-queue instead of qmail-inject? OK, here's a quick stab at a basic patch - I modified qmail_inject_open to open qmail-queue appropriately (no args), and changed deliver_mail to talk to it. I THINK :) There's no bounds checking and so forth in here, there are a few places where there really needs to be some extra code to make sure that the data acquired is valid, but it's designed to be proof-of-concept. It compiles, but that's all I can guarantee. Use at your own risk, yada yada... Feel free to modify it as needed, I have no ego attached to this code :) OK, so I can't stand writing sloppy code :) Here's an updated version of the patch that handles things a little better (albeit in a slightly more complicated manner), and cleans up a couple remaining stragglers of the changeover. Josh -- Joshua Megerman SJGames MIB #5273 - OGRE AI Testing Division You can't win; You can't break even; You can't even quit the game. - Layman's translation of the Laws of Thermodynamics [EMAIL PROTECTED]--- vdelivermail.c.orig 2006-05-09 17:35:00.0 -0400 +++ vdelivermail.c 2006-05-09 18:33:26.0 -0400 @@ -72,6 +72,7 @@ #define BUFF_SIZE 300 int fdm; +int fde; #define EXIT_BOUNCE 100 #define EXIT_DEFER 111 @@ -304,33 +305,41 @@ } #endif -/* Forks off qmail-inject. Returns PID of child, or 0 for failure. */ -pid_t qmail_inject_open(char *address) +/* Forks off qmail-queue. Returns PID of child, or 0 for failure. */ +pid_t qmail_queue_open() { int pim[2]; + int pie[2]; + pid_t pid; - static char *binqqargs[4]; + static char *binqqargs[2]; if ( pipe(pim) == -1) return 0; +if ( pipe(pie) == -1) return 0; switch(pid=vfork()){ case -1: close(pim[0]); close(pim[1]); +close(pie[0]); +close(pie[1]); printf (Unable to fork: %d., errno); return 0; case 0: close(pim[1]); +close(pie[1]); if (vfd_move(0,pim[0]) == -1 ) _exit(-1); +if (vfd_move(1,pie[0]) == -1 ) _exit(-1); binqqargs[0] = QMAILINJECT; -binqqargs[1] = --; -binqqargs[2] = (*address == '' ? address[1] : address[0]); +binqqargs[1] = 0; execv(*binqqargs, binqqargs); -printf (Unable to launch qmail-inject.); +printf (Unable to launch qmail-queue.); exit (EXIT_DEFER);/* child's exit caught later */ } fdm = pim[1]; +fde = pie[1]; close(pim[0]); +close(pie[0]); return(pid); } @@ -628,10 +637,18 @@ char *dtline; char *atpos; int dtlen; + char *sender = 0; + char keychar[3] = FT; + char *envptrs[6] = { keychar, sender, keychar+2, keychar+1, address, keychar+2 }; + int envlens[6] = { 1, 0, 1, 1, 0, 1 }; // sender and address get initialized later + int writestr; if (*address=='') ++address; /* will this case ever happen? */ - inject_pid = qmail_inject_open(address); - if (inject_pid == 0) vexiterr (EXIT_DEFER, system error, can't open qmail-inject); + envptrs[4] = address; + envlens[4] = strlen(address) + 1; + + inject_pid = qmail_queue_open(); + if (inject_pid == 0) vexiterr (EXIT_DEFER, system error, can't open qmail-queue); /* use the DTLINE variable, but skip past the dash in * [EMAIL PROTECTED] @@ -665,13 +682,33 @@ } if (fdcopy (fdm, 0, DeliveredTo, strlen(DeliveredTo)) != 0) { - printf (write to qmail-inject failed: %d\n, errno); + printf (write to qmail-queue failed: %d\n, errno); close(fdm); + close(fde); waitpid(inject_pid,child,0); vexiterr (EXIT_DEFER, system error); } + if (!(sender = getenv(SENDER))) { + printf (unable to acquire SENDER from environment\n); + close(fdm); + close(fde); + vexiterr (EXIT_DEFER, system error); + } + envptrs[1] = sender; + envlens[1] = strlen(sender) + 1; + + for (writestr = 0; writestr 6; writestr++) { +if ((write(fde, (void *)envptrs[writestr], envlens[writestr])) != envlens[writestr]) { +printf (write to qmail-queue failed: %d\n, errno); +close(fdm); +close(fde); +vexiterr (EXIT_DEFER, system error); +} + } + close(fdm); + close(fde); waitpid(inject_pid,child,0); if (wait_exitcode(child) == 0) return; vexiterr (EXIT_DEFER, system error);
[vchkpw] vdelivermail - expected behaviour?
Hi all, Have an interesting question. I have a domain set up with qmail/ vpopmail, with the contents of /var/vpopmail/domains/ briandowney.net/.qmail-default set to: | /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox The bounce-no-mailbox works when junk heads to '[EMAIL PROTECTED]', but when adding a dash extension onto any /existing/ address, such as [EMAIL PROTECTED], it gets delivered. Even while the address does not specifically exist in the database or a corresponding .qmail-whatever file. Is this expected behavior? It's somewhat frustrating since there are a few lists out there that got ahold of my older email addresses (bdowney-something) and everything gets delivered no matter what. Thanks!
Re: [vchkpw] vdelivermail - expected behaviour?
On Oct 1, 2005, at 1:16 PM, Brian Downey wrote: The bounce-no-mailbox works when junk heads to '[EMAIL PROTECTED]', but when adding a dash extension onto any /existing/ address, such as [EMAIL PROTECTED], it gets delivered. Even while the address does not specifically exist in the database or a corresponding .qmail-whatever file. Is this expected behavior? It's somewhat frustrating since there are a few lists out there that got ahold of my older email addresses (bdowney-something) and everything gets delivered no matter what. Yes, that is expected behavior. It may only apply if you compile with the --enable-qmail-ext configure option though. One workaround would be to create a .qmail-bdowney-blablablah file with the following: |/var/qmail/bin/bouncesaying 'Nonexistent account' All mail to that address will bounce. Of course, chkuser will still accept the message instead of rejecting it at the SMTP level, but it's better than having to deal with the mail. Another option would be to just put '#' in the .qmail file to delete the message without delivering it. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com
Re: [vchkpw] vdelivermail strangeness over nfs
On 4/12/05, Tom Collins [EMAIL PROTECTED] wrote: On Apr 12, 2005, at 6:59 AM, John Chess wrote: Running lsof on the nfs mount, it looks like vdelivermail is walking the entire user directory tree on the nfs server. After sending a test mail to [EMAIL PROTECTED], an lsof shows: You probably have domain quotas enabled, and it's checking usage. If you're not using domain quotas (AFAIK, they don't work), then recompile vpopmail with that feature disabled. Make sure both servers are set in the same time zone with clocks relatively in sync. It could be that one thinks the maildirsize file is old and should be updated. That's exactly what the problem was- ntpd had died on that box, and the clock drifted enough to confuse it. Thank you for your help! I misspoke when I said that vdelivermail was walking the entire user directory. What I meant to say is that it was walking the entire _domain_ directory, looking in each user's directory. I'm still puzzled by this. Do you think domain quotas are causing this? JC
Re: [vchkpw] vdelivermail strangeness over nfs
On Apr 13, 2005, at 4:41 AM, John Chess wrote: I misspoke when I said that vdelivermail was walking the entire user directory. What I meant to say is that it was walking the entire _domain_ directory, looking in each user's directory. I'm still puzzled by this. Do you think domain quotas are causing this? I know domain quotas are causing that. Turn them off. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com
[vchkpw] vdelivermail strangeness over nfs
Here's my setup: -Linux -Vpopmail 5.4.9 -Netqmail User maildirs are mounted over nfs. The existing servers (one SMTP, two POP/Sqwebmail) all work fine. They run an older version of Vpopmail (5.2.1). User information is in MySQL. I'm adding a second SMTP server. This server runs Vpopmail 5.4.9 and Netqmail. Mail deliveries work, but they're slow- almost a minute and a half to deliver an incoming message. This delay only happens on the new server. There are _no_ errors or informative messages in the logs- I see the message come in, and then a minute or so later I see it delivered. Running lsof on the nfs mount, it looks like vdelivermail is walking the entire user directory tree on the nfs server. After sending a test mail to [EMAIL PROTECTED], an lsof shows: [EMAIL PROTECTED] queue]# lsof /nfs/mail COMMAND PID USER FD TYPE DEVICE SIZENODE NAME qmail-loc 25104 vpopmail cwdDIR 0,10 106496 540673 /nfs/mail/domains/ding.net (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail cwdDIR 0,10 4096 3162130 /nfs/mail/domains/ding.net/test (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail5r DIR 0,10 106496 540673 /nfs/mail/domains/ding.net (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail6r DIR 0,10 4096 1131219 /nfs/mail/domains/ding.net/arbowers/Maildir (nfs-i:/u01/nfs/mail) Note the looking around in arbowers' directory. Running lsof again, I see: [EMAIL PROTECTED] queue]# lsof /nfs/mail COMMAND PID USER FD TYPE DEVICE SIZENODE NAME qmail-loc 25104 vpopmail cwdDIR 0,10 106496 540673 /nfs/mail/domains/ding.net (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail cwdDIR 0,10 4096 3162130 /nfs/mail/domains/ding.net/test (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail5r DIR 0,10 106496 540673 /nfs/mail/domains/ding.net (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail6r DIR 0,10 4096 7340188 /nfs/mail/domains/ding.net/bfjelstd/Maildir (nfs-i:/u01/nfs/mail) vdeliverm 25105 vpopmail7r DIR 0,10 4096 6177644 /nfs/mail/domains/ding.net/bfjelstd/Maildir/.Drafts/cur (nfs-i:/u01/nfs/mail) It's really digging around inside bfjelstd's directory- looking in the Sqwebmail drafts folder! For the life of me, I can't figure out what's going on here. There are no incoming mails to this server from the outside- it's in a testing mode behind a firewall, so there's no reason for it to be accessing other user directories. It really looks like it's walking the directory tree- if I keep running lsof over and over and over again, it'll progress through the alphabet. I'd be incredibly grateful for any pointers here. Thanks! JC
Re: [vchkpw] vdelivermail strangeness over nfs
On Apr 12, 2005, at 6:59 AM, John Chess wrote: Running lsof on the nfs mount, it looks like vdelivermail is walking the entire user directory tree on the nfs server. After sending a test mail to [EMAIL PROTECTED], an lsof shows: You probably have domain quotas enabled, and it's checking usage. If you're not using domain quotas (AFAIK, they don't work), then recompile vpopmail with that feature disabled. Make sure both servers are set in the same time zone with clocks relatively in sync. It could be that one thinks the maildirsize file is old and should be updated. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ You don't need a laptop to troubleshoot high-speed Internet: sniffter.com
[vchkpw] vdelivermail
Hi! I need a help here. i am makeing a new mailserver. i installed qmail, vpopmail, maildrop, etc... the mail server works fine. the problem is that i have many .qmail-user files that redirect mail with vdeliver mail, exemple: | /opt/vpopmail/bin/vdelivermail '' /opt/vpopmail/domains/test.com/user It works fine in old mail server but in the new one it fails. in qmail-send log i got the folowing message: deferral: Unable_to_run_/bin/sh:_ i traced back and i know that it happens when vdelivermail execute the execv command. i change de vdelivermail to print errno message and the message was too many open files. it happens because vdelivermail was not supose to return in execv command, but it does and happens to execute too many vdelivermail process i did check /bin/sh and /bin/bash permissions and it's ok (755). just to make shure i've changed to 777 and the error persist. i checked out qmail and vpopmail permissions and it was what it supose to be The diferences between de old server and the new server are: - vpopmail version(5.4.5 in the old one, 5.4.10 in the new one) - qmail location (/var/qmail in the old one, /opt/qmail in the new one) i tried to downgrade vpopmail to 5.4.5 and the same error happens. i compiled all software informing then where qmail is installed and i don't think this could be the problem... (am i right?) the vdelivermail in .qmail-default (bounce) works fine, only in .qmail-user or .qmail-user-default the error hapens. please, help me. I don't know what to do anymore. thanks Mario Cardia [EMAIL PROTECTED] (i'm brazilian, so sorry by my poor english)
Re: [vchkpw] vdelivermail
mario, you did changed the location of vpopmail but copied the old domains/ directory, right? if so, you must change many things, firstly, check if the vpopmail user and vchkpw group have same id's in /etc/passwd. if so, you can go on w/o reinstall secondly, you must check out the qmail's assing file and, then, change every single vpasswd file and every file in domains/ that begins with .qmail* you can do it with a simple shell script. Mario Cardia wrote: Hi! I need a help here. i am makeing a new mailserver. i installed qmail, vpopmail, maildrop, etc... the mail server works fine. the problem is that i have many .qmail-user files that redirect mail with vdeliver mail, exemple: | /opt/vpopmail/bin/vdelivermail '' /opt/vpopmail/domains/test.com/user It works fine in old mail server but in the new one it fails. in qmail-send log i got the folowing message: deferral: Unable_to_run_/bin/sh:_ i traced back and i know that it happens when vdelivermail execute the execv command. i change de vdelivermail to print errno message and the message was too many open files. it happens because vdelivermail was not supose to return in execv command, but it does and happens to execute too many vdelivermail process i did check /bin/sh and /bin/bash permissions and it's ok (755). just to make shure i've changed to 777 and the error persist. i checked out qmail and vpopmail permissions and it was what it supose to be The diferences between de old server and the new server are: - vpopmail version(5.4.5 in the old one, 5.4.10 in the new one) - qmail location (/var/qmail in the old one, /opt/qmail in the new one) i tried to downgrade vpopmail to 5.4.5 and the same error happens. i compiled all software informing then where qmail is installed and i don't think this could be the problem... (am i right?) the vdelivermail in .qmail-default (bounce) works fine, only in .qmail-user or .qmail-user-default the error hapens. please, help me. I don't know what to do anymore. thanks Mario Cardia [EMAIL PROTECTED] (i'm brazilian, so sorry by my poor english)
[vchkpw] vdelivermail and overquota catchalls
Hi all, I wonder if someone could shed some light over the following issue regarding vdelivermail. When a message is sent directly to a catchall account that is over quota, vdelivermail behaves as expected and bounces the message back to the sender. However, if the message is sent to a non-existent account of a domain with an over quota catchall, the message gets delivered. Is there a way to enforce the quota limit in this case? Our setup: - Qmail 1.03 - Vpopmail 5.4.9 ./configure \ --enable-roaming-users=y \ --enable-relay-clear-minutes=120 \ [EMAIL PROTECTED] \ --enable-auth-module=mysql \ --enable-many-domains=y \ --enable-clear-passwd=n \ --enable-tcpserver-file=/var/vpopmail/etc/tcp.smtp \ --enable-auth-logging=n \ --enable-valias Thanks in advance. Regards, Juliano Simões Gerente de Tecnologia Axios Tecnologia e Serviços http://www.axios.com.br [EMAIL PROTECTED] +55 41 2141-1800
Re: [vchkpw] vdelivermail and overquota catchalls
Tom, We would be glad to test the new version of vdelivermail on our test environment. If you would like to send us the code, we will let you about the results in a few days. Regards, Juliano Simões Gerente de Tecnologia Axios Tecnologia e Serviços http://www.axios.com.br [EMAIL PROTECTED] +55 41 2141-1800 - Original Message - From: Tom Collins [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Friday, February 04, 2005 7:01 PM Subject: Re: [vchkpw] vdelivermail and overquota catchalls On Feb 4, 2005, at 10:37 AM, Juliano Simões wrote: However, if the message is sent to a non-existent account of a domain with an over quota catchall, the message gets delivered. Is there a way to enforce the quota limit in this case? I have an updated vdelivermail that corrects this problem. I haven't had time to test it enough to release it to the other developers though. I think I still need to add one more piece of code (if it is processing a user's .qmail file and they don't have a maildirsize file, lookup the account's quota) before it will be ready for release. If someone out there has a development system and can thoroughly test it (verify that it defers in all overquota instance), I'll send it their way. -- 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/
[vchkpw] vdelivermail slow delivery (too much...)
I'm experiencing problem setting up a mail server with qmail+vpopmail+mysql. The hardware is a Compaq Prolian 7000 whith 1.5 gb RAM and RAID 5 storage (100 gb). There are 2 partition (both ext3) / and /var. qmail and vpopmail are installed in /var. The mail server has about 200 hosted domain but only one is big. This one has about 20k mail accounts. The problem is that when qmail delivers mail (via qmail-local-vdelivermail) to small domain, the time elapsed is small. When it delivers mail to the (only) big domain the operation is really long. Is seems that vdelivermail spends a lot of time delivering the mail. Just for example: a mail to a little domain takes 1 sec (at most) to be delivered, a mail to huge domain takes more than 60 sec. These test have been done using 3 conncurrent local delivery agent. I tried to move (only for testing) the vpopmail's directory of big domain to a tmpfs partition and times reduced to about 10 secs. The problem shouldn't be of mysql. Any idea? May be the storage too slow? Do famd and courier-imap impact on system' performance? Thanks Luca ICT Made Easy N.C.E. Network Consulting Engineering srl http://www.nce-ict.it
Re: [vchkpw] vdelivermail slow delivery (too much...)
The hardware is a Compaq Prolian 7000 whith 1.5 gb RAM and RAID 5 storage (100 gb). There are 2 partition (both ext3) / and /var. qmail and vpopmail are installed in /var. The mail server has about 200 hosted domain but only one is big. This one has about 20k mail accounts. Aha! Problem probably found! I have had similar problems with large mail accounts on ext3 partitions. Above some number of files (which I've never bothered to find out), server load goes through the roof and delivery slows to a crawl. I suspect you have one or more users with thousands of files in their maildir -- possibly a postmaster account set to catch-all (which is dangerous), that is never checked and is full of spam. Move your maildirs onto a parition formatted with a filesystem better suited to large numbers of files in directories. Reiserfs is liked by many and is frequently recommended by others on this list. I use XFS myself, mainly due to its very nice backup/dump tools. -Bill * Waveform Technology UNIX Systems Administrator
Re: [vchkpw] vdelivermail, user quotas and the maildirsize file
On Dec 3, 2004, at 7:24 PM, Tom Collins wrote: I don't know. I've only started to look into the mail quota code. I may pull fresh code from the most recent Courier-IMAP (original source of most of the code) and make sure that I spend as little time with the file open as necessary. I think that vdelivermail will open it for exclusive write access and then append the new size. I have no idea how it will behave if multiple processes want to append to it at the same time. It may be difficult, but I guess I could write a shell script that attempts to deliver two very large emails simultaneously. I could also add an artificial delay in vdelivermail so it keeps the file open longer than necessary in order to force one process to wait for write access. -- 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/ How about locking the file from reading and writing until the writing task is complete, that way there should never be an inconsistent moment, unless off course two vdelivermails try to grab the file lock at the same time, and kernel both grants them (Happened to me on BSD 4.2, was solved in a later version). So that should never happen. If you make the time spent with the file as little as possible, then there should be no slowdown at all. X-Istence
Re: [vchkpw] vdelivermail, user quotas and the maildirsize file
[intentionaly top posted] You are my new hero Mr. Collins. If you are in or near central Indiana, my wife makes apple pie and vegetable soup that grown men will crawl through broken glass for, there are a few servings waiting for you. Can't wait to give it a try. DAve Tom Collins wrote: I've undertaken the task of cleaning up vdelivermail. I think I've fixed some problems where vdelivermail could exit without closing its connection to MySQL. I've also fixed sections that exited with the wrong exit code (causing qmail-local to assume mail was delivered when it wasn't, or vice-versa). I'm now digging into quotas. Oh, the joy. I found one immediate problem. vdelivermail was adding an email's size to the maildirsize file before it was successfully delivered. If there was any sort of error, the maildirsize file would end up out of whack. Additionally, the size of the extra headers (Return-Path and Delivered-To) weren't included in the values written. This causes a problem because POP/IMAP will enter a negative value for the size of the entire message (including those headers). I could be wrong on that -- the POP/IMAP server might use the S= part of the filename which was also written incorrectly by the old vdelivermail. Anyway, I've made some good progress, and now it only updates maildirsize if the message was successfully written. It will update the maildirsize of ANY Maildir that it delivers to, including valiases, the catchall, and save-a-copy on .qmail files that forward to another location. The only missing piece is actually checking for overquota situations on anything but a standard user without a .qmail file. I also don't handle the situation where the maildirsize file does not exist. Realistically, I can only re-create it for the Maildir that belongs to the current user. Other than reading the maildirsize file, there's no easy way to look up a quota based on a Maildir directory path. After all of the time I've put into it, there's no way I'm going to touch domain quotas... If anyone knows of any other vdelivermail oddities that should be fixed, please let me know and I'll try to address them in this upcoming release. -- 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/ No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.4 - Release Date: 11/30/2004 -- Systems Administrator http://www.tls.net Get rid of Unwanted Emails...get TLS Spam Blocker!
RE: [vchkpw] vdelivermail, user quotas and the maildirsize file
Title: Message does this change take into account the ablity for multi processing on the maildirsize and 2 vdeliverers attempting to add to the mailbox at near simultaneous time... think multiple mailservers with a nfs connection to the maildirectories... ie at this time if i accept a mail its added to quota.. then while im writing my mail in a second vdeliver needs to write, looksin quota, reports over,and we bounce.. under the new structure.. will this occur or will BOTH files get written into the mail directory... -Original Message-From: Tom Collins [mailto:[EMAIL PROTECTED] I found one immediate problem. vdelivermail was adding an email's size to the maildirsize file before it was successfully delivered. If there was any sort of error, the maildirsize file would end up out of whack.
Re: [vchkpw] vdelivermail, user quotas and the maildirsize file
On Dec 3, 2004, at 3:01 PM, shadowplay.net wrote: does this change take into account the ablity for multi processing on the maildirsize and 2 vdeliverers attempting to add to the mailbox at near simultaneous time... think multiple mailservers with a nfs connection to the maildirectories... ie at this time if i accept a mail its added to quota.. then while im writing my mail in a second vdeliver needs to write, looks in quota, reports over, and we bounce.. under the new structure.. will this occur or will BOTH files get written into the mail directory... I don't know. I've only started to look into the mail quota code. I may pull fresh code from the most recent Courier-IMAP (original source of most of the code) and make sure that I spend as little time with the file open as necessary. I think that vdelivermail will open it for exclusive write access and then append the new size. I have no idea how it will behave if multiple processes want to append to it at the same time. It may be difficult, but I guess I could write a shell script that attempts to deliver two very large emails simultaneously. I could also add an artificial delay in vdelivermail so it keeps the file open longer than necessary in order to force one process to wait for write access. -- 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/
[vchkpw] vdelivermail, user quotas and the maildirsize file
I've undertaken the task of cleaning up vdelivermail. I think I've fixed some problems where vdelivermail could exit without closing its connection to MySQL. I've also fixed sections that exited with the wrong exit code (causing qmail-local to assume mail was delivered when it wasn't, or vice-versa). I'm now digging into quotas. Oh, the joy. I found one immediate problem. vdelivermail was adding an email's size to the maildirsize file before it was successfully delivered. If there was any sort of error, the maildirsize file would end up out of whack. Additionally, the size of the extra headers (Return-Path and Delivered-To) weren't included in the values written. This causes a problem because POP/IMAP will enter a negative value for the size of the entire message (including those headers). I could be wrong on that -- the POP/IMAP server might use the S= part of the filename which was also written incorrectly by the old vdelivermail. Anyway, I've made some good progress, and now it only updates maildirsize if the message was successfully written. It will update the maildirsize of ANY Maildir that it delivers to, including valiases, the catchall, and save-a-copy on .qmail files that forward to another location. The only missing piece is actually checking for overquota situations on anything but a standard user without a .qmail file. I also don't handle the situation where the maildirsize file does not exist. Realistically, I can only re-create it for the Maildir that belongs to the current user. Other than reading the maildirsize file, there's no easy way to look up a quota based on a Maildir directory path. After all of the time I've put into it, there's no way I'm going to touch domain quotas... If anyone knows of any other vdelivermail oddities that should be fixed, please let me know and I'll try to address them in this upcoming release. -- 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/
[vchkpw] Vdelivermail high load
Hi all, Today, when issuing a top on my pop server, I noticed that there were some vdelivermails process eating a lot of cpu resources. Then, looking in the logs files, I saw that it was a spam to a specific domain, and this domain had the postmaster account as the 'catchall account'. What surprised me is the number of emails in the its Maildir: about 1479158 Is the number of emails in a Maildir related to the amount of cpu vdelivermail uses? I saw an increasing use of the disc too, somethings 100%... Thanks! ___ ALMEIDA, Fernando Costa de Computeasy Informtica www.computeasy.com.br BSD USER BSD050945 ICQ 72293951
Re: [vchkpw] Vdelivermail high load
On Tuesday 13 July 2004 09:47 am, Fernando Costa de Almeida wrote: Hi all, Today, when issuing a top on my pop server, I noticed that there were some vdelivermails process eating a lot of cpu resources. Then, looking in the logs files, I saw that it was a spam to a specific domain, and this domain had the postmaster account as the 'catchall account'. What surprised me is the number of emails in the its Maildir: about 1479158 Is the number of emails in a Maildir related to the amount of cpu vdelivermail uses? I saw an increasing use of the disc too, somethings 100%... if you're using ext2/3 filesystem, or any other non-directory hashing filesystem, this will occur. This isn't vpopmail's fault, it's the filesystem. You have two options, remove the emails, or switch to a better filesystem (such as reiserfs, or UFS with DIR_HASH) for more details about this filesystem issue, please visit google, as this is discussed on more mailing lists than you could possibly think of. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail
RE: [vchkpw] Vdelivermail high load
Hi Jeremy, thanks for your explanation! Im using FreeBSD and consequently an UFS Filesystem (with DIR_HASH and SoftUpdates enabled). I will delete the emails, but I posted this question just to make sure that my problem was caused by the high number of files in the user's Maildir. The next step is to avoid that an user have so many emails in his Maildir, perhaps enabling quota for all users... I frequently face high IO loads in this server, even though its has one dedicated disk for the qmail queue and logs. Thanks. ___ ALMEIDA, Fernando Costa de Computeasy Informtica www.computeasy.com.br BSD USER BSD050945 ICQ 72293951 -Original Message- From: Jeremy Kitchen [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [vchkpw] Vdelivermail high load On Tuesday 13 July 2004 09:47 am, Fernando Costa de Almeida wrote: Hi all, Today, when issuing a top on my pop server, I noticed that there were some vdelivermails process eating a lot of cpu resources. Then, looking in the logs files, I saw that it was a spam to a specific domain, and this domain had the postmaster account as the 'catchall account'. What surprised me is the number of emails in the its Maildir: about 1479158 Is the number of emails in a Maildir related to the amount of cpu vdelivermail uses? I saw an increasing use of the disc too, somethings 100%... if you're using ext2/3 filesystem, or any other non-directory hashing filesystem, this will occur. This isn't vpopmail's fault, it's the filesystem. You have two options, remove the emails, or switch to a better filesystem (such as reiserfs, or UFS with DIR_HASH) for more details about this filesystem issue, please visit google, as this is discussed on more mailing lists than you could possibly think of. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail
RE: [vchkpw] Vdelivermail high load
On Tue, 13 Jul 2004, Fernando Costa de Almeida wrote: Hi Jeremy, thanks for your explanation! Im using FreeBSD and consequently an UFS Filesystem (with DIR_HASH and SoftUpdates enabled). I will delete the emails, but I posted this question just to make sure that my problem was caused by the high number of files in the user's Maildir. The next step is to avoid that an user have so many emails in his Maildir, perhaps enabling quota for all users... Another question... Is there a quota on this account? I've caught some maildrop and vdelivermail processes chewing up a ton of cpu just trying to recalculate the quota. Very similar situation; catchalls are evil and outdated. Since the user had an incredibly huge quota anyway, I set them to NOQUOTA with vmoduser and everything calmed down. Thanks, Charles I frequently face high IO loads in this server, even though its has one dedicated disk for the qmail queue and logs. Thanks. ___ ALMEIDA, Fernando Costa de Computeasy Informtica www.computeasy.com.br BSD USER BSD050945 ICQ 72293951 -Original Message- From: Jeremy Kitchen [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [vchkpw] Vdelivermail high load On Tuesday 13 July 2004 09:47 am, Fernando Costa de Almeida wrote: Hi all, Today, when issuing a top on my pop server, I noticed that there were some vdelivermails process eating a lot of cpu resources. Then, looking in the logs files, I saw that it was a spam to a specific domain, and this domain had the postmaster account as the 'catchall account'. What surprised me is the number of emails in the its Maildir: about 1479158 Is the number of emails in a Maildir related to the amount of cpu vdelivermail uses? I saw an increasing use of the disc too, somethings 100%... if you're using ext2/3 filesystem, or any other non-directory hashing filesystem, this will occur. This isn't vpopmail's fault, it's the filesystem. You have two options, remove the emails, or switch to a better filesystem (such as reiserfs, or UFS with DIR_HASH) for more details about this filesystem issue, please visit google, as this is discussed on more mailing lists than you could possibly think of. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail
RE: [vchkpw] Vdelivermail high load
Yes! This account has a big quota (about 50MB)... Here is what I did: 1) Deleted all emails from this account; 2) Increased vfs.ufs.dirhash_maxmem to improve performance on big directories (Thanks to Jeremy who mades me read more about DIRHASH)... And now, I will set the users to NOQUOTA (thanks to you, hehe)... Another question... Is there a quota on this account? I've caught some maildrop and vdelivermail processes chewing up a ton of cpu just trying to recalculate the quota. Very similar situation; catchalls are evil and outdated. Since the user had an incredibly huge quota anyway, I set them to NOQUOTA with vmoduser and everything calmed down. Thanks, Charles I frequently face high IO loads in this server, even though its has one dedicated disk for the qmail queue and logs. Thanks. ___ ALMEIDA, Fernando Costa de Computeasy Informtica www.computeasy.com.br BSD USER BSD050945 ICQ 72293951 -Original Message- From: Jeremy Kitchen [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 13, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [vchkpw] Vdelivermail high load On Tuesday 13 July 2004 09:47 am, Fernando Costa de Almeida wrote: Hi all, Today, when issuing a top on my pop server, I noticed that there were some vdelivermails process eating a lot of cpu resources. Then, looking in the logs files, I saw that it was a spam to a specific domain, and this domain had the postmaster account as the 'catchall account'. What surprised me is the number of emails in the its Maildir: about 1479158 Is the number of emails in a Maildir related to the amount of cpu vdelivermail uses? I saw an increasing use of the disc too, somethings 100%... if you're using ext2/3 filesystem, or any other non-directory hashing filesystem, this will occur. This isn't vpopmail's fault, it's the filesystem. You have two options, remove the emails, or switch to a better filesystem (such as reiserfs, or UFS with DIR_HASH) for more details about this filesystem issue, please visit google, as this is discussed on more mailing lists than you could possibly think of. -Jeremy -- Jeremy Kitchen ++ Systems Administrator ++ Inter7 Internet Technologies, Inc. [EMAIL PROTECTED] ++ www.inter7.com ++ 866.528.3530 ++ 847.492.0470 int'l kitchen @ #qmail #gentoo on EFnet ++ scriptkitchen.com/qmail
[vchkpw] vdelivermail traversing all maildirs on server before delivering mail
I'm setting up a new server with vpopmail 5.4.4 (should be the latest stable?), and everything was working as it should until I got to the point of load testing. I added 10,000 accounts (not quite as many as I have on the production server, which runs vpopmail 5.2.1) to test.com on the server with this script: #!/bin/bash # Script to create some email accounts on the test server @test.com for i in `seq 1 1`; do /usr/local/vpopmail/bin/vadduser -n [EMAIL PROTECTED] done which completes in fairly short order (took about 2 minutes) with no errors. Looking at the domain in vqadmin and through mysql directly show all the users, and everything looks fine. However, when I then send a mail to any user (doesn't matter which) qmail-local kicks off the delivery process and it takes a LONG time and there is LOTS of disk access. By using the lsof command i was able to see what files vdelivermail had open, and it was pretty clear that it was traversing EVERY maildir on the domain (only one domain right now - I don't know if it would traverse other domains as well) before delivering the mail to the correct Maildir (which it will do eventually). While not documented as not right, it clearly isn't supposed to do that (as it would take forever for the server to get anything done). Is this a known issue? Possibly my compile-time options for vpopmail? Did I do something wrong, or is this a bug? Any comments/suggestions are welcome. -- - Nick Bright Terraworld, Inc http://home.terraworld.net | 888-332-1616
Re: [vchkpw] vdelivermail traversing all maildirs on server before delivering mail
On Jun 29, 2004, at 5:09 PM, Nick Bright wrote: I will try this, but could you elaborate on why that is/would cause this? Is this 'by design' for a setup with domain limits turned on? It's a poor design that requires vdelivermail to traverse the entire domain to determine whether it's over quota or not. -- 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] vdelivermail traversing all maildirs on server before delivering mail
On Tue, 2004-06-29 at 19:20, Tom Collins wrote: On Jun 29, 2004, at 5:09 PM, Nick Bright wrote: I will try this, but could you elaborate on why that is/would cause this? Is this 'by design' for a setup with domain limits turned on? It's a poor design that requires vdelivermail to traverse the entire domain to determine whether it's over quota or not. Ah. I see, thanks Tom. -- 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/ -- - Nick Bright Terraworld, Inc http://home.terraworld.net | 888-332-1616
[vchkpw] vdelivermail issue
Hi all, a few days ago i noticed that a lot of vdelivermail processes weren't doing what they're supposed to do. I have an account on a vpopmail domain, whose only purpose is to forward mail to another server. That user has the following .qmail file: # cat ~vpopmail/domains/moinhopraiaclub.com/webmaster/.qmail [EMAIL PROTECTED] I sent an email to that account by telneting the smtp server. Here's what shows up: # qmailctl queue messages in queue: 3 messages in queue but not yet preprocessed: 0 26 May 2004 09:20:20 GMT #98478 28674 [EMAIL PROTECTED] local [EMAIL PROTECTED] 26 May 2004 22:07:26 GMT #98805 642 [EMAIL PROTECTED] local [EMAIL PROTECTED] 26 May 2004 09:20:20 GMT #98622 28677 [EMAIL PROTECTED] local [EMAIL PROTECTED] and: # ps -ef (...) vpopmail 4441 4413 0 23:26 ?00:00:00 bin/qmail-local -- moinhopraiaclub.com /home/vpopmail/domains/moinhopraiaclub.com moinhopraiaclub.com-webmaster - webmaster moinhopvpopmail 4442 4441 0 23:26 ?00:00:00 /home/vpopmail/bin/vdelivermail bounce-no-mailbox vpopmail 4443 4413 0 23:26 ?00:00:00 bin/qmail-local -- moinhopraiaclub.com /home/vpopmail/domains/moinhopraiaclub.com moinhopraiaclub.com-Webmaster - Webmaster MoinhoPvpopmail 4413 0 23:26 ?00:00:00 bin/qmail-local -- moinhopraiaclub.com /home/vpopmail/domains/moinhopraiaclub.com moinhopraiaclub.com-webmaster - webmaster moinhopvpopmail 4445 4443 0 23:26 ?00:00:00 /home/vpopmail/bin/vdelivermail bounce-no-mailbox vpopmail 4446 0 23:26 ?00:00:00 /home/vpopmail/bin/vdelivermail bounce-no-mailbox vpopmail 4447 4442 0 23:26 ?00:00:00 /home/vpopmail/bin/vdelivermail bounce-no-mailbox vpopmail 4448 4445 0 23:26 ?00:00:00 /home/vpopmail/bin/vdelivermail bounce-no-mailbox vpopmail 4449 4446 0 23:26 ?00:00:00 /home/vpopmail/bin/vdelivermail bounce-no-mailbox The [EMAIL PROTECTED] account is working perfectly so i guess someway i managed to mess up the configuration. The logs don't say anything obvious, only show that the emails are getting queued. No errors, nothing. I'm using vpopmail 5.4.2. Any suggestions? Regards, Celso
[vchkpw] vdelivermail ignoring NOQUOATA?
I have Vpopmail 5.4.0 installed on a FreeBSD 4.9 system. We experienced a situation with very heaver load averages (sometimes 30) and determined that vdelivermail seemed to be taking far too long to process mail delivery. I ran truss on several of the vdelivermail processes and discovered that vdelivermal was doing a stat on every directory in the recipients domain, evidently for quota purposes. However, no quotas are installed on the system. vlimits.default is using default and every user also has NOQUOTA set. Any ideas as to what could be causing this? Rod Kreisler
Re: [vchkpw] vdelivermail ignoring NOQUOATA?
Nevermind it was a corrupt build. Interesting thing was that I rebuilt it... twice... and still had problems. I finally got the idea to copy the vdelivermail executable from a machine with the same arch. Problem solved. Rod K wrote: I have Vpopmail 5.4.0 installed on a FreeBSD 4.9 system. We experienced a situation with very heaver load averages (sometimes 30) and determined that vdelivermail seemed to be taking far too long to process mail delivery. I ran truss on several of the vdelivermail processes and discovered that vdelivermal was doing a stat on every directory in the recipients domain, evidently for quota purposes. However, no quotas are installed on the system. vlimits.default is using default and every user also has NOQUOTA set. Any ideas as to what could be causing this? Rod Kreisler
[vchkpw] vdelivermail bounce-no-mailbox. Can I drop?
The standard implementation of the ~.qmail-default for a vpopmail domain is to use the string | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox I don't care about handling bounces for typo'd addresses and I want to /dev/null them. does vdelivermail mail have a drop-no-mailbox option?
Re: [vchkpw] vdelivermail bounce-no-mailbox. Can I drop?
[EMAIL PROTECTED] wrote: does vdelivermail mail have a drop-no-mailbox option? Replace drop-no-mailbox with delete Rick
Re: [vchkpw] vdelivermail is soo slow..
Brian wrote: Hello All, I'm at a loss and all I can come up with is this: last pid: 70373; load averages: 4.32, 3.48, 3.53 up 33+19:31:48 09:32:36 148 processes: 26 running, 122 sleeping CPU states: 5.6% user, 0.0% nice, 94.0% system, 0.2% interrupt, 0.2% idle Mem: 125M Active, 262M Inact, 67M Wired, 19M Cache, 61M Buf, 28M Free Swap: 512M Total, 512M Free PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND 93447 www18 0 15384K 13288K lockf 1 3:06 2.20% 2.20% httpd 68988 vpopmail 56 0 1376K 944K RUN1 0:00 17.94% 1.71% vdelivermai snip Ouch, that looks painfull. Do the messages get delivered at all? This is a snapshot from top as I'm trying to send an email to a local ezmlm list that goes to about 50 local people. This shouldnt be slow at all. I have a mailling list that goes to 300 local people, with vdelivermail and never have this problem, however, i do not use MySQL. I get 50 vdelivermails (which is fine) but they are all slow to deliver. I've had this server for almost a year (dual 933's 512Ecc U160 drives) and it does nothing but qmail+vpopmail and a webmail client. I have clam antivirus and spamassassin which I'm calling through qmail-scanner. this is my tcp.rules file: 127.0.0.:allow,RELAYCLIENT=,RBLSMTPD=,QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue 192.168.1.:allow,RELAYCLIENT=,RBLSMTPD=,QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue :allow,QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue This is useless to us if its vdelivermail that is screwing up and not qmail-smtpd. snip and yesterday I was getting intermittent errors like this: 2004-04-06 09:28:48.197123500 delivery 19551: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ 2004-04-06 09:28:48.211717500 delivery 19534: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ 2004-04-06 09:28:48.232450500 delivery 19544: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ This cant be good. snip but so far today things have been ok.. except that vdeliver mail is *so* high.. Have you tried recompiling vpopmail from scratch/ports tree, and installing a new copy. It shouldnt make a difference, but if it does then something was wrong with your old binaries. 2004-04-07 09:41:06.857760500 delivery 956: success: did_0+0+1/ How long does it take approxamitly for each mail to be delivered with vdelivermail? And do you have it compiled with the spamassassin patch or not. This is on a FreeBSD 4.9-p3 system ( I know I have to patch to p4 ) Go patch yourself :P vpopmail-5.4.0 and mysql 3.23.57 (compiled for freebsd 4.8) Should be fine. Uptime: 23 hours 32 min 43 sec Threads: 3 Questions: 18086 Slow queries: 0 Opens: 19 Flush tables: 1 Open tables: 13 Queries per second avg: 0.213 TIA - Brian X-Istence
Re: [vchkpw] vdelivermail is soo slow..
On Wednesday 07 April 2004 09:29 am, Brian wrote: [snip bunch of vdelivermail's fighting for cpu] This is a snapshot from top as I'm trying to send an email to a local ezmlm list that goes to about 50 local people. do all of those users have lots and lots of mail in their accounts, and you're running and old filesystem such as ext2/3 or UFS without DIR_HASH? If so, you're seeing filesystem chokage, and need to either clean out those mail directories or get a better filesystem. -Jeremy -- Jeremy Kitchen Systems Administrator [EMAIL PROTECTED] Kitchen @ #qmail on EFNet - Join the party! . Inter7 Internet Technologies, Inc. www.inter7.com 866.528.3530 toll free 847.492.0470 int'l 847.492.0632 fax GNUPG key ID: 93BDD6CE
[vchkpw] vdelivermail is soo slow..
Hello All, I'm at a loss and all I can come up with is this: last pid: 70373; load averages: 4.32, 3.48, 3.53 up 33+19:31:48 09:32:36 148 processes: 26 running, 122 sleeping CPU states: 5.6% user, 0.0% nice, 94.0% system, 0.2% interrupt, 0.2% idle Mem: 125M Active, 262M Inact, 67M Wired, 19M Cache, 61M Buf, 28M Free Swap: 512M Total, 512M Free PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND 93447 www18 0 15384K 13288K lockf 1 3:06 2.20% 2.20% httpd 68988 vpopmail 56 0 1376K 944K RUN1 0:00 17.94% 1.71% vdelivermai 62048 vpopmail 55 0 1376K 944K RUN1 0:00 14.86% 1.42% vdelivermai 65547 vpopmail 54 0 1376K 944K RUN1 0:00 14.86% 1.42% vdelivermai 68537 vpopmail 55 0 1376K 944K RUN1 0:00 14.86% 1.42% vdelivermai 69065 vpopmail 53 0 1376K 944K RUN1 0:00 10.25% 0.98% vdelivermai 68932 vpopmail 53 0 1372K 940K RUN0 0:00 9.74% 0.93% vdelivermai 68634 vpopmail 53 0 1372K 940K RUN0 0:00 7.69% 0.73% vdelivermai 65358 vpopmail 52 0 1372K 940K RUN0 0:00 7.18% 0.68% vdelivermai 68423 vpopmail 52 0 1372K 940K RUN0 0:00 6.66% 0.63% vdelivermai 69546 vpopmail 53 0 1372K 940K RUN1 0:00 6.66% 0.63% vdelivermai 69565 vpopmail 53 0 1372K 940K RUN0 0:00 6.66% 0.63% vdelivermai 68777 vpopmail 52 0 1372K 940K RUN0 0:00 6.15% 0.59% vdelivermai 69294 vpopmail 52 0 1372K 940K RUN0 0:00 6.15% 0.59% vdelivermai 68841 vpopmail 52 0 1372K 940K RUN0 0:00 5.64% 0.54% vdelivermai 70020 vpopmail 52 0 1372K 940K RUN1 0:00 5.64% 0.54% vdelivermai 70316 vpopmail 53 0 1372K 940K RUN1 0:00 5.13% 0.49% vdelivermai 70342 vpopmail 52 0 1372K 940K RUN0 0:00 5.13% 0.49% vdelivermai 70136 vpopmail 52 0 1372K 940K RUN0 0:00 4.61% 0.44% vdelivermai 70139 vpopmail 52 0 1372K 940K RUN1 0:00 3.59% 0.34% vdelivermai 68330 vpopmail 51 0 1372K 940K RUN0 0:00 3.08% 0.29% vdelivermai This is a snapshot from top as I'm trying to send an email to a local ezmlm list that goes to about 50 local people. I get 50 vdelivermails (which is fine) but they are all slow to deliver. I've had this server for almost a year (dual 933's 512Ecc U160 drives) and it does nothing but qmail+vpopmail and a webmail client. I have clam antivirus and spamassassin which I'm calling through qmail-scanner. this is my tcp.rules file: 127.0.0.:allow,RELAYCLIENT=,RBLSMTPD=,QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue 192.168.1.:allow,RELAYCLIENT=,RBLSMTPD=,QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue :allow,QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue I'm using qmail-scanner 1.21 compiled by hand with this configure statement: ./configure \ --admin postmaster \ --add-dscr-hdrs yes \ --domain poklib.org \ --log-details syslog \ --skip-text-msgs yes \ --scanners clamdscan,verbose_spamassassin \ --notify sender \ --debug no \ --unzip yes \ --batch \ --install and yesterday I was getting intermittent errors like this: 2004-04-06 09:28:48.197123500 delivery 19551: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ 2004-04-06 09:28:48.211717500 delivery 19534: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ 2004-04-06 09:28:48.232450500 delivery 19544: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ and even after just restarting it all: 2004-04-06 11:20:58.672465500 delivery 637: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ 2004-04-06 11:20:58.675404500 delivery 620: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ 2004-04-06 12:42:10.905863500 delivery 18: deferral: vmysql:_sql_error[1]:_Can't_create_database_'vpopmail'._Database_exists/ but so far today things have been ok.. except that vdeliver mail is *so* high.. 2004-04-07 09:41:06.857760500 delivery 956: success: did_0+0+1/ This is on a FreeBSD 4.9-p3 system ( I know I have to patch to p4 ) vpopmail-5.4.0 and mysql 3.23.57 (compiled for freebsd 4.8) Uptime: 23 hours 32 min 43 sec Threads: 3 Questions: 18086 Slow queries: 0 Opens: 19 Flush tables: 1 Open tables: 13 Queries per second avg: 0.213 TIA - Brian
[vchkpw] Vdelivermail/vpopmail spamassassin patch by Alex Dupre
Heya In the FreeBSD ports there now exists a way to compile vpopmail with a patch that will include spamassassin to be run from vdelivermail so all mail that goes to any domains it manages will be scanned, and it allows for user based bayesion filtering and what not, ever since it was included in the FreeBSD ports and i have used it, i have found that its a fast easy way to add spamassassin and customers have loved it more than ever. We get very little false positives, and even then its awesome. Here is the patch, this is a repost of code that Alex Dupre added to the ports tree, i did not email him if it was okay, but i will assume so as he is letting people freely use it in the ports tree. I know i should have posted this at sourceforge, but i am a complete noob with its system. Props once again for this patch go to Alex Dupre. To compile you will need to set SPAM_THRESHOLD to something, on the FreeBSD compile this is normally 15, but testing has suggest 10 is the best to go with. SPAMC has to be set to the location where it is located. --- vdelivermail.c.orig Mon Oct 20 20:59:57 2003 +++ vdelivermail.c Sat Nov 1 11:21:15 2003 @@ -62,6 +62,7 @@ #define FILE_SIZE 156 char hostname[FILE_SIZE]; char loop_buf[FILE_SIZE]; +char spam_buf[FILE_SIZE]; #define MSG_BUF_SIZE 5000 char msgbuf[MSG_BUF_SIZE]; @@ -90,6 +91,10 @@ void usernotfound(void); int is_loop_match( char *dt, char *address); int deliver_quota_warning(const char *dir, const char *q); +#ifdef SPAM_THRESHOLD +int is_spam(int threshold); +int is_spam_match(char *xsl, int threshold); +#endif static char local_file[156]; static char local_file_new[156]; @@ -257,7 +262,7 @@ /* check for wildcard if there's no match */ if(tmpstr == NULL) { -for(i=strlen(TheUser);i = 0 j != 1;--i) { +for(i=strlen(TheUser);i 0 j != 1;--i) { if(TheUser[i-1]=='-') { tmpuser[0] = '\0'; strncat(tmpuser,TheUser,i); @@ -444,6 +449,7 @@ int inject = 0; FILE *fs; char tmp_file[256]; + int pim[2]; /* check if the email is looping to this user */ if ( is_looping( address ) == 1 ) { @@ -631,6 +637,51 @@ } } +#ifdef SPAMC +/* fork the SpamAssassin client - patch by Alex Dupre */ +if (!pipe(pim)) { +pid = vfork(); +switch (pid) { +case -1: +close(pim[0]); +close(pim[1]); +break; +case 0: +close(pim[0]); +dup2(pim[1], 1); +close(pim[1]); +if (execl(SPAMC, SPAMC, -u, maildir_to_email(address), 0) == -1) { +while ((file_count = read(0, msgbuf, MSG_BUF_SIZE)) 0) +write(1, msgbuf, file_count); +_exit(0); +} +} +close(pim[1]); +dup2(pim[0], 0); +close(pim[0]); +} +#ifdef SPAM_THRESHOLD +/* silently delete message if spam level SPAM_THRESHOLD */ +if (is_spam(SPAM_THRESHOLD) == 1) { +close(write_fd); +if (unlink(local_file) != 0) { +printf(unlink failed %s errno = %d\n, local_file, errno); +return(errno); +} +return(0); +} + +#ifdef MAKE_SEEKABLE +if (!Seekable(0)) +MakeSeekable(stdin); +#endif + +if (lseek(0, 0L, SEEK_SET) 0) { +printf(lseek errno=%d\n, errno); +return(errno); +} +#endif +#endif /* read it in chunks and write it to the new file */ while((file_count=read(0,msgbuf,MSG_BUF_SIZE))0) { @@ -881,6 +932,9 @@ if (strncmp(loop_buf, Delivered-To: , 14) == 0 is_loop_match(loop_buf, address)==1 ) { +/* seek to the end of stdin */ +fseek(stdin, 0L, SEEK_END); + /* return the loop found */ return(1); @@ -919,6 +973,8 @@ * looping not found value */ if ( found == 0 ) { +/* seek to the end of stdin */ +fseek(stdin, 0L, SEEK_END); /* return not found looping message value */ return(0); } @@ -1335,3 +1391,96 @@ return(1); } +#ifdef SPAM_THRESHOLD +/* Check for a spam message + * This is done by checking for a matching line + * in the email headers for X-Spam-Level: which + * we put in each spam email + * + * Return 1 if spam + * Return 0 if not spam + * Return -1 on error + */ +int is_spam(int threshold) +{ + int i; + int found; + +#ifdef MAKE_SEEKABLE +if (!Seekable(0)) +MakeSeekable(stdin); +#endif + +if ( lseek(0, 0L, SEEK_SET) 0 ) { +printf(lseek errno=%d\n, errno); +return(errno); +} + +while (fgets(spam_buf, sizeof(spam_buf), stdin) != NULL){ + +/* if we find the line, return error (looping) */ +if (strncmp(spam_buf, X-Spam-Level: , 14) == 0 +is_spam_match(spam_buf, threshold) ==1) { + +/* seek to the end of stdin */ +
Re: [vchkpw] vdelivermail EXITCODE problem
Hi Anders, thanks for that hint, I think I´ll give it a try next weekend. To be honest, what I´ve done to get rid of that problem is let qmail do the whole stuff with interpreting the EXITCODE from my spamfilter script. Instead of putting the .qmail file in /path-to-vpopmail/domains/domain1/emailadress1/.qmail ( here vdelivermail would do the delivery and the check for the EXITCODE ) I made a script to create a .qmail-emailadress1 in /path-to-vpopmail/domains/domain1/.qmail-emailadress1 ( here it is qmail that handles the .qmail file, starts my spamfilter script, gets the EXITCODE and then drops the mail into /path-to-vpopmail/domains/domain1/emailadress1/Maildir/ where vdelivermail gets it and delivers it. It is somehow a little bit difficult but works fine for me. If I have any experiences with that patch I´ll let you all know. Thanks Thomas Hi, On Tue, 2003-09-30 at 10:09, [EMAIL PROTECTED] wrote: So I upgraded to the last stable version 5.2.1 whereas the changelog said that within 5.2.1 the EXITCODE checks would be performed. Vpopmail 5.2.1 fails to catch exitcode 100. Here is a patch: http://fmail.dk/stuff/vpopmail-5.2.1-vdeliver-command-100.diff Hope this helps. /Anders
[vchkpw] vdelivermail EXITCODE problem
Hi everybody, yesterday I asked you if there is a problem in vdelivermail of handling EXITCODEs in .qmail files and I discovered that in my installed version 5.2 no checking of the EXITCODE was possible. So I upgraded to the last stable version 5.2.1 whereas the changelog said that within 5.2.1 the EXITCODE checks would be performed. Now over the night I discovered that a script started within a .qmail file before the deliver-to-Maildir instruction and returns an EXITCODE of 99 or 100 ( which value is not important ) the delivery of that mail is interrupted ( not stopped as it sould be ) BUT the mail stays in the queue and the queue starts delivering mail again and again. What I´m trying to say is that one single mail has been delivered about 200 times that night and everytime the script told vdelivermail to end the delivery and everytime the mail stayed within the qmail queue to be delivered some time later. What I now want to know is if there must be another EXITCODE so that vdelivermail definetely kills that mail processing or if this is a bug in vdelivermail and I should upgrade to something higher ( i read in the changelog that several fixes to the EXITCODE thing have been made in 5.3.x but this versions are to be devel-state and I´m wondering if I should use devel-software on a running system. Thanks for your help! Thomas
Re: [vchkpw] vdelivermail EXITCODE problem
Something to look at: it seems to stand out in my memory as ive had this same problem, but i dont recall a resolve for it.. basically if you are having the same problem i was, then you cannot have anything in your .qmail processing fork.. it must continue to run in the foreground or the mail will keep re-spawning.. one day i ended up with 900 mysqld's running due to vdelivermail-maildrop-mailfilter. and it only seemed to happen when called by .qmail files. if you are doing any processing in .qmail files, make sure they do not get backgrounded or forked.. i think the man pages for either vdelivermail or qmail-command will have more info about this.. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 4:09 AM Subject: [vchkpw] vdelivermail EXITCODE problem Hi everybody, yesterday I asked you if there is a problem in vdelivermail of handling EXITCODEs in .qmail files and I discovered that in my installed version 5.2 no checking of the EXITCODE was possible. So I upgraded to the last stable version 5.2.1 whereas the changelog said that within 5.2.1 the EXITCODE checks would be performed. Now over the night I discovered that a script started within a .qmail file before the deliver-to-Maildir instruction and returns an EXITCODE of 99 or 100 ( which value is not important ) the delivery of that mail is interrupted ( not stopped as it sould be ) BUT the mail stays in the queue and the queue starts delivering mail again and again. What I´m trying to say is that one single mail has been delivered about 200 times that night and everytime the script told vdelivermail to end the delivery and everytime the mail stayed within the qmail queue to be delivered some time later. What I now want to know is if there must be another EXITCODE so that vdelivermail definetely kills that mail processing or if this is a bug in vdelivermail and I should upgrade to something higher ( i read in the changelog that several fixes to the EXITCODE thing have been made in 5.3.x but this versions are to be devel-state and I´m wondering if I should use devel-software on a running system. Thanks for your help! Thomas
Re: [vchkpw] vdelivermail EXITCODE problem
Hi, On Tue, 2003-09-30 at 10:09, [EMAIL PROTECTED] wrote: So I upgraded to the last stable version 5.2.1 whereas the changelog said that within 5.2.1 the EXITCODE checks would be performed. Vpopmail 5.2.1 fails to catch exitcode 100. Here is a patch: http://fmail.dk/stuff/vpopmail-5.2.1-vdeliver-command-100.diff Hope this helps. /Anders
[vchkpw] vdelivermail procmail
I have read numerous post concerning procmail and vmaildeliver, but have not found a answer yet. Basic Info: procmailrc LOGABSTRACT=yes LOGFILE=/var/log/procmail.log VERBOSE=yes :0w | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox .qmail-bob | preline procmail -p -t -m ./bob/procmailrc procmail.log procmail: Executing /home/vpopmail/bin/vdelivermail bounce-no-mailbox procmail: Program failure (100) of /home/vpopmail/bin/vdelivermail procmail: Assigning LASTFOLDER=/home/vpopmail/bin/vdelivermail bounce-no-mailbox From [EMAIL PROTECTED] Thu Aug 21 20:13:55 2003 Subject: Folder **Requeued** 1391 Any ideas? Thanks Joe Ruddy
FW: [vchkpw] vdelivermail procmail
I have read numerous post concerning procmail and vmaildeliver, but have not found a answer yet. Basic Info: procmailrc LOGABSTRACT=yes LOGFILE=/var/log/procmail.log VERBOSE=yes :0w | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox .qmail-bob | preline procmail -p -t -m ./bob/procmailrc procmail.log procmail: Executing /home/vpopmail/bin/vdelivermail bounce-no-mailbox procmail: Program failure (100) of /home/vpopmail/bin/vdelivermail procmail: Assigning LASTFOLDER=/home/vpopmail/bin/vdelivermail bounce-no-mailbox From [EMAIL PROTECTED] Thu Aug 21 20:13:55 2003 Subject: Folder **Requeued** 1391 Any ideas? I found the answer. Try the seekable patch located at www.thesafebox.com (for Vpopmail) Once applied compiled and installed everything worked great.
[vchkpw] vdelivermail and bounced messages
I have a problem, and it may just be that vdelivermail doesnt handle bounced mail this way, but the docs don't really say I have alot of vhosts. When mail gets sent to a user that does not exist it gets bounced to the user and to the default postmaster not of the domain but for the email server. my .qmail.default file says | /usr/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox so I assume that it should only bounce to the person who sent it. However it is also sending a message to the default postmaster for the server. I would like it to not send any message to the postmaster and if that is not possible to send a email to the postmaster for the domain that it is related to not the default postmaster for the server. the man page says: default account for delivery] If the email does match any .qmail-user file and also does not match any virtual domain user, this is the default delivery instructions. There are three values this may contain. ·Full path to a vpopmail user directory ·email address to forward email too ·the string bounce-no-mailbox to bounce the email back to the sender. Default is the postmaster account Is it possible to turn off the forwarding to default postmaster or at least send it to the postmaster for that domain that the message was being sent?
Re: [vchkpw] vdelivermail and bounced messages
Hi Chris, On Fri, 04 Apr 2003 08:35:19 -0600 Chris Manjoine wrote: When mail gets sent to a user that does not exist it gets bounced to the user and to the default postmaster not of the domain but for the email server. my .qmail.default file says | /usr/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox Are you sure the _bounce_ gets directed and delivered to $SENDER _AND_ postmaster? Usually postmaster only gets double-bounces, stating ... but the bounce bounced. ... in the very beginning of the mail. What makes you assume _qmail_ (and it is qmail handling the bounce, vdelivermail only exits '100' to tell qmail delivery agent to bounce) doubles the bounce? -- Pit
Re: [vchkpw] vdelivermail and bounced messages
ok bounces the the default postmaster when the sender is bogus so it doesn't send twice. So I guess my problem is how do I get those bounces to goto the virtual email postmaster and not the default mail server postmaster? At 05:00 PM 4/4/2003 +0200, you wrote: Hi Chris, On Fri, 04 Apr 2003 08:35:19 -0600 Chris Manjoine wrote: When mail gets sent to a user that does not exist it gets bounced to the user and to the default postmaster not of the domain but for the email server. my .qmail.default file says | /usr/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox Are you sure the _bounce_ gets directed and delivered to $SENDER _AND_ postmaster? Usually postmaster only gets double-bounces, stating ... but the bounce bounced. ... in the very beginning of the mail. What makes you assume _qmail_ (and it is qmail handling the bounce, vdelivermail only exits '100' to tell qmail delivery agent to bounce) doubles the bounce? -- Pit
RE: Re: [vchkpw] vdelivermail and bounced messages
one solution could be to use doublebounceto and write a program to take care of mails, parsing them and trying to find out what to do with it. And finally dump it to domain postmaster or the mailer-deamon or /dev/null depending on what it is... Just a thought, have never tested, not even done some deeper analyzing of the problem... =d0Mi= Original Message - Date: 4-Apr-2003 22:25:50 +0200 From: Chris Manjoine [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [vchkpw] vdelivermail and bounced messages ok bounces the the default postmaster when the sender is bogus so it doesn't send twice. So I guess my problem is how do I get those bounces to goto the virtual email postmaster and not the default mail server postmaster? At 05:00 PM 4/4/2003 +0200, you wrote: Hi Chris, On Fri, 04 Apr 2003 08:35:19 -0600 Chris Manjoine wrote: When mail gets sent to a user that does not exist it gets bounced to the user and to the default postmaster not of the domain but for the email server. my .qmail.default file says | /usr/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox Are you sure the _bounce_ gets directed and delivered to $SENDER _AND_ postmaster? Usually postmaster only gets double-bounces, stating ... but the bounce bounced. ... in the very beginning of the mail. What makes you assume _qmail_ (and it is qmail handling the bounce, vdelivermail only exits '100' to tell qmail delivery agent to bounce) doubles the bounce? -- Pit
[vchkpw] vdelivermail and Delivered-To
hi i'm using vpopmail 5.2.1, it was configured as following: ./configure --prefix=/opt/vpopmail-5.2 --sysconfdir=/etc/vpopmail --localstatedir=var/vpopmail --enable-mysql=y --enable-roaming-users=y --enable-valias=y --enable-md5-passwords=n --enable-default-domain=cyberlink.ch --enable-clear-passwd=n --enable-relay-clear-minutes=180 --enable-logging=p --enable-tcprules-prog=/opt/bin/tcprules --enable-libdir=/usr/lib --enable-auth-logging=y this makes --enable-many-domains=y (it's the default). now i noticed that vdelivermail seems to corrupt the Delivered-To: header lines when a domain is in a hashed dir: [EMAIL PROTECTED]:/home/vpop/domains/9/testdomain.ch# cat .qmail-default | /home/vpop/bin/vdelivermail '' [EMAIL PROTECTED] [EMAIL PROTECTED]:/home/vpop/domains/9/testdomain.ch# head -2 ./test/Maildir/new/1046863343.4676.igel,S\=175814 Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] so vpopmail looses the domain part of the email address and replaces it with the hash number?!? does anybody have an idea or a pointer ? thank you greetz flavio -- http://no-way.org/~fcu/
Re: [vchkpw] vdelivermail and Delivered-To
Hi, Delivered-To: [EMAIL PROTECTED] when I noticed, and looked up the mailing list archive for a solution I found only messages saying, that it has to be this way. Not beeing convinced myself I modified vdelivermail for me. This should be the needed patch against vpopmail 5.2.1: --- vdelivermail.c.orig Mon Dec 2 15:11:01 2002 +++ vdelivermail.c Tue Dec 10 15:22:51 2002 @@ -824,12 +825,27 @@ return(message_size); } +#define PATHSIZE (500) + char *maildir_to_email(char *maildir) { static char email[256]; + static char pwd[PATHSIZE]; + static char maildir_abs[PATHSIZE]; int i, j=0; + int rc; char *pnt, *last; +if (maildir[0]!='/') { + getcwd(pwd,PATHSIZE); + rc=chdir(maildir); + if (rc==0) { + getcwd(maildir_abs,PATHSIZE); + maildir=(maildir_abs[0]); + strncat(maildir,/,PATHSIZE); + chdir(pwd); + } +} memset(email, 0, sizeof(email)); for(last=NULL, pnt=maildir; (pnt=strstr(pnt,/Maildir/))!=NULL; pnt+=9 ){ last = pnt; @@ -843,20 +859,23 @@ for( i=(pnt-maildir); (i 1 *(pnt-1) != '/'); --pnt, --i); +last=pnt; /* last points to first character of user name */ + for( ; (*pnt *pnt != '/' j 255); ++pnt) { email[j++] = *pnt; } email[j++] = '@'; -for (last=NULL, pnt=maildir; (pnt=strstr(pnt, / DOMAINS_DIR /)); pnt+=strlen(/ DOMAI NS_DIR /)) { -last = pnt; -} +pnt=last-2; +/* pnt points to last character of domain directory */ -if(!last) return ; +for (i=(pnt-maildir); (i1 *(pnt-1)!='/'); --pnt, --i) ; -for( pnt = last + 9; (*pnt *pnt != '/' j 255); ++pnt, ++j ) { - email[j] = *pnt; +/* pnt points to first character of domain name */ + +for( ; (*pnt *pnt != '/' j 255); ++pnt ) { + email[j++] = *pnt; } email[j] = 0; DISCLAIMER: It's some time ago when I did the patching and I am no more sure this is the right version of the patch. Please verify yourself if it does what you expect, and no harm. claudio -- Claudio Nieder . mailto:[EMAIL PROTECTED] . http://www.inodes.ch iNodes AG . Friesenbergstrasse 3 . CH-8055 Zürich . +41 43 960 0066
Re: [vchkpw] vdelivermail and Delivered-To
hi On Wed, Mar 05, 2003 at 07:32:01PM +0100, Claudio Nieder wrote: when I noticed, and looked up the mailing list archive for a solution I found only messages saying, that it has to be this way. Not beeing well, i'm no-way convinced by this as well. imho this breaks a lot of stuff. (Serialmail for example, which relies on the Delivered-To: for the redelivery of the mail). imho according to envelopes(5): When a message is delivered by qmail to a single local recipient, qmail-local records the recipient in Delivered-To and the envelope sender in Return-Path. It uses Delivered-To to detect mail forwarding loops. so, [EMAIL PROTECTED] clearly is not the reciepient. (maildirsmtp will issue a RCPT TO: [EMAIL PROTECTED] in the SMTP conversation, which will lead to a Relaying Denied error) convinced myself I modified vdelivermail for me. This should be the needed patch against vpopmail 5.2.1: thank you for the patch, will this patch make it into the vpopmail release?? thank you greetz flavio -- http://no-way.org/~fcu/
Re: [vchkpw] vdelivermail problem?
On Monday, February 10, 2003, at 08:50 AM, Dzuy Nguyen wrote: Juraj Hantak wrote: Hi all, I have a problem with vdelivermail it is not correctly proceeding .qmail- files. Imagine situation you have a domain called test.com. Do you want to forward the whole domain everything@test.com into address [EMAIL PROTECTED] and the address should be proceed acording its .qmail file. {local deliverded and forwarded to external address} do you have in .qmail-default | path to vdelivermail vdelivermail '' [EMAIL PROTECTED] and there is a file called .qmail-john [EMAIL PROTECTED] path to domain/test.com/john/Maildir/ there is a mailbox [EMAIL PROTECTED] And the behaviour is now: when you send mail directly to [EMAIL PROTECTED] its correctly proceed and is local delivered and a copy is forwarded to external address. But when you send mail to [EMAIL PROTECTED] its only localy delivered it is not forwarded to external mail address. Can somebody help me with this problem, I have tested the stable 5.2.1 version and developement 5.3.14 The correct thing to do is put the external email address in the vdelivermail line, like so: | /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED] .qmal files in the domain directory are for qmail-local processing, NOT vdelivermail. This is why the setup you described fails. vdelivermail checks for a vpasswd entry for john since test.com is the local domain. It does NOT look at .qmail files in the domain's directory, just .qmail files in the user's directory. Best regards Juraj Hantak There is a bug in vdelivermail since 5.2 which I identified and reported. I'm surprised it didn't make it to 5.3 development releases. Basically, forward and keeps a copy works fine, but forward alone does not. Please check the archive for details of the problem. I assume you are referring to this message: http://www.mail-archive.com/vchkpw@inter7.com/msg11007.html See the argument above. The same logic applies, and it's not a bug. Regards, Bill Shupp
Re: [vchkpw] vdelivermail problem?
Bill Shupp wrote: On Monday, February 10, 2003, at 08:50 AM, Dzuy Nguyen wrote: Juraj Hantak wrote: Hi all, I have a problem with vdelivermail it is not correctly proceeding .qmail- files. Imagine situation you have a domain called test.com. Do you want to forward the whole domain everything@test.com into address [EMAIL PROTECTED] and the address should be proceed acording its .qmail file. {local deliverded and forwarded to external address} do you have in .qmail-default | path to vdelivermail vdelivermail '' [EMAIL PROTECTED] and there is a file called .qmail-john [EMAIL PROTECTED] path to domain/test.com/john/Maildir/ there is a mailbox [EMAIL PROTECTED] And the behaviour is now: when you send mail directly to [EMAIL PROTECTED] its correctly proceed and is local delivered and a copy is forwarded to external address. But when you send mail to [EMAIL PROTECTED] its only localy delivered it is not forwarded to external mail address. Can somebody help me with this problem, I have tested the stable 5.2.1 version and developement 5.3.14 The correct thing to do is put the external email address in the vdelivermail line, like so: | /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED] .qmal files in the domain directory are for qmail-local processing, NOT vdelivermail. This is why the setup you described fails. vdelivermail checks for a vpasswd entry for john since test.com is the local domain. It does NOT look at .qmail files in the domain's directory, just .qmail files in the user's directory. Best regards Juraj Hantak There is a bug in vdelivermail since 5.2 which I identified and reported. I'm surprised it didn't make it to 5.3 development releases. Basically, forward and keeps a copy works fine, but forward alone does not. Please check the archive for details of the problem. I assume you are referring to this message: http://www.mail-archive.com/vchkpw@inter7.com/msg11007.html Bill, the message above was unrelated to this problem. I was looking for ways to make alias user to get the spam checking. I didn't say it was a bug. BTW, I still have not found a suitable solution for qmail/vpopmail/spamassassin to play nice with each other. The bug I was refering to was mentioned in a thread months ago. It involves .qmail file in the user's directory. If it's fixed, then I apologized. See the argument above. The same logic applies, and it's not a bug. Regards, Bill Shupp
Re: [vchkpw] vdelivermail problem?
On Tuesday, February 11, 2003, at 08:07 AM, Dzuy Nguyen wrote: Bill, the message above was unrelated to this problem. I was looking for ways to make alias user to get the spam checking. I didn't say it was a bug. BTW, I still have not found a suitable solution for qmail/vpopmail/spamassassin to play nice with each other. A patch to vdelivermail was sent to the list last week. I hope to test it today and integrate it into 5.3.17 if all goes well. The bug I was refering to was mentioned in a thread months ago. It involves .qmail file in the user's directory. If it's fixed, then I apologized. The only other mention I found in the archives was you referring to a bug that was *fixed* in 5.3.x... can you post the URL to the specific problem? Regards, Bill
[vchkpw] vdelivermail problem?
Hi all, I have a problem with vdelivermail it is not correctly proceeding .qmail- files. Imagine situation you have a domain called test.com. Do you want to forward the whole domain everything@test.com into address [EMAIL PROTECTED] and the address should be proceed acording its .qmail file. {local deliverded and forwarded to external address} do you have in .qmail-default | path to vdelivermail vdelivermail '' [EMAIL PROTECTED] and there is a file called .qmail-john [EMAIL PROTECTED] path to domain/test.com/john/Maildir/ there is a mailbox [EMAIL PROTECTED] And the behaviour is now: when you send mail directly to [EMAIL PROTECTED] its correctly proceed and is local delivered and a copy is forwarded to external address. But when you send mail to [EMAIL PROTECTED] its only localy delivered it is not forwarded to external mail address. Can somebody help me with this problem, I have tested the stable 5.2.1 version and developement 5.3.14 Best regards Juraj Hantak
Re: [vchkpw] vdelivermail problem?
Juraj Hantak wrote: Hi all, I have a problem with vdelivermail it is not correctly proceeding .qmail- files. Imagine situation you have a domain called test.com. Do you want to forward the whole domain everything@test.com into address [EMAIL PROTECTED] and the address should be proceed acording its .qmail file. {local deliverded and forwarded to external address} do you have in .qmail-default | path to vdelivermail vdelivermail '' [EMAIL PROTECTED] and there is a file called .qmail-john [EMAIL PROTECTED] path to domain/test.com/john/Maildir/ there is a mailbox [EMAIL PROTECTED] And the behaviour is now: when you send mail directly to [EMAIL PROTECTED] its correctly proceed and is local delivered and a copy is forwarded to external address. But when you send mail to [EMAIL PROTECTED] its only localy delivered it is not forwarded to external mail address. Can somebody help me with this problem, I have tested the stable 5.2.1 version and developement 5.3.14 Best regards Juraj Hantak There is a bug in vdelivermail since 5.2 which I identified and reported. I'm surprised it didn't make it to 5.3 development releases. Basically, forward and keeps a copy works fine, but forward alone does not. Please check the archive for details of the problem.
[vchkpw] vdelivermail Seg Faults
Hi, I am running vpopmail 5.2.1 on FreeBSD 4.7. It works fine, but whenever I add a forwarding address to a local account, eg [EMAIL PROTECTED] in .qmail file, vpopmail segfaults and core dumps the vdelivermail.core in the user's Maildir. in the log: 2003-01-31 10:11:55.183798500 delivery 136: deferral: lseek_errno=29/vdelivermai l_in_free():_warning:_chunk_is_already_free/Segmentation_fault_(core_dumped) / 2003-01-31 10:11:55.184619500 status: local 0/10 remote 0/20 2003-01-31 10:13:36.192645500 starting delivery 137: msg 22060 to local addy deleted 2003-01-31 10:13:36.193313500 status: local 1/10 remote 0/20 2003-01-31 10:13:36.277329500 delivery 137: deferral: lseek_errno=29/vdelivermai l_in_free():_warning:_chunk_is_already_free/Segmentation_fault_(core_dumped) / 2003-01-31 10:13:36.278155500 status: local 0/10 remote 0/20 When I delete the local account and create forward alias, it works fine. forwards on local accounts using .qmail file doesn't! However using vacation function in qmailadmin 1.o.6 works fine. It's the forwarding is causing this problems? Any ideas? Ta,
[vchkpw] vdelivermail loop
Hi, All I have problem. E.g. domain test.tst, there are boxes f1 and f2. dot-qmail files: test.tst/f1/.qmail: /var/vpopmail/domains/Y/test.tst/f1/Maildir/ [EMAIL PROTECTED] test.tst/f2/.qmail: /var/vpopmail/domains/Y/test.tst/f2/Maildir/ [EMAIL PROTECTED] And I get loop that vdelivermail can't define. While debugging seems like I found the problem. At function int is_looping(..) there is lseek(0,0L,SEEK_SET); and I think that it really don't rewind descriptor 0 to start. because after checking mail for first line in dot-qmail (/var/vpopmail/domains/Y/test.tst/f1/Maildir/) it continues (even after lseek) check mail for next line ([EMAIL PROTECTED]) i.e. it doesn't see Delivered-To lines. system is redhat 7.2 where is the problem? in lseek function or?
[vchkpw] vdelivermail and dot-qmail in virtual user directory.
Folks, I think that the way vdelivermail handles dot-qmail files is incorrect, or I've missed something in the documentation. I have a system with --enable-qmail-ext=y, however, dot-qmail files in the virtual user's directory are not read. For example, if I create: /home/vpopmail/domains/domain.dom/andy/.qmail vdelivermail will execute the instructions in there just fine, however, if I then create: /home/vpopmail/domains/domain.dom/andy/.qmail-test It will not even consider that file and instead will execute the instructions in the original .qmail file in that directory. This seems incorrect to me. If it is going to support a .qmail file in domains/domain.dom/user, why doesn't it support extensions in that same directory? Yes, I am aware that /home/vpopmail/domains/domain.dom/.qmail-andy-test does work, but I find this less intuitive and not in line with what dot-qmail implements. Andy -- GnuPG ID 0xA63888C9 (D2DA 68C9 BB2B 26B4 8204 2219 A43E F450 A638 88C9) [---[system uptime]] 1:41pm up 167 days, 22:01, 6 users, load average: 1.16, 1.36, 1.50
[vchkpw] vdelivermail fails when alias line starting with | and containing /Maildir/
Hi, I think i've encountered a bug, vdelivermail seems to process the line: |/do/deliver/to /home/vpopmail/domains/example.com/test1/Maildir/ wrongly. It deals with it like it's a /Maildir/-line, which is wrong. It seems like vdelivermail checks for /Maildir/ anywhere in the line, before it checks for a | at the start of the line. I've made a quick fix to vdelivermail.c. http://fmail.dk/stuff/vdeliver-command.diff Please test and comment. /Anders
Re: [vchkpw] vdelivermail fails when alias line starting with | and containing /Maildir/
On Wednesday, October 23, 2002, at 05:28 AM, Anders Brander wrote: Hi, I think i've encountered a bug, vdelivermail seems to process the line: |/do/deliver/to /home/vpopmail/domains/example.com/test1/Maildir/ wrongly. It deals with it like it's a /Maildir/-line, which is wrong. It seems like vdelivermail checks for /Maildir/ anywhere in the line, before it checks for a | at the start of the line. I've made a quick fix to vdelivermail.c. http://fmail.dk/stuff/vdeliver-command.diff Please test and comment. Looks good, I've added this. Regards, Bill Shupp
[vchkpw] Vdelivermail patch.
Busy day for me, I've been patching left right and center. I have patched vdelivermail.c to properly handle the exit codes generated by Autoresponder (by Brad Dameron), used with QmailAdmin. Now, depending on the exit code returned, vdelivermail.c will either deliver it or bounce it. Wait! Wasn't it doing that before? Yes it was, but it was not handling exit code 99, which aborted autoresponder but still meant for the message to be delivered. As always, I've tested that patch on my systems and it appears to work fine. I offer no guarantees. http://www.esoteric.ca/software/src/vdelivermail-5.3.8.patch And for those who are curious, here are the other patches I did today: I've patched the autoresponder that is required by QmailAdmin for vacation/autoresponder's to work. Now duplicate From: and Subject fields will no longer persist in messages -- and I'm sure my customer inquiries will go down because of it. The details: Autoresponder 2.0.3 http://www.esoteric.ca/software/src/autorespond-2.03.patch - Patched autoresponder.c to allow new option -. This option causes Autoresponder to only insert the To: header, thus the autoresponder file must contain the From: and Subject: lines first. This patch was submitted to Brad D, though I haven't heard back from him yet. QmailAdmin 1.0.6 http://www.esoteric.ca/software/src/qa-autorespond.patch - Patched autorespond.c to include new option. - Patched user.c to include new option. In addition to modifying user.c (vacation messages) to use new option, I also increased the number of messages the autoresponder can receive from a unique e-mail address before it defers additional messages. I also reduced the amount of time funtil the number is reset rom 24 hours to 12. I did this because many offices have people sending multiple e-mails a day to an account with a vacation autoresponder. I've tested this on my own production setup without problems, but of course I offer no guarantees. Make sure you are using those versions listed above, and apply BOTH patches for it to work. Your users will have to recreate their autoresponders / vacation messages in order to take effect. -- Steve