[vchkpw] vpopmail and procmail
hi all i have trouble figuring out procmail with vpopmail. i have compiled the procmail procmail changing this variables in ~/procmail-3.22/src/authenticate.c #ifndef MAILSPOOLDIR #define MAILSPOOLDIR/home/vpopmail/domains//* watch the trailing / */ #endif #ifndef MAILSPOOLSUFFIX #define MAILSPOOLSUFFIX / /* suffix to force maildir or MH style */ #endif #ifndef MAILSPOOLHASH #define MAILSPOOLHASH 0 /* 2 would deliver to /var/spool/mail/b/a/bar */ #endif then i call .qmail-user file after a domain .qmail-default file like this: |spamc -u $EXT@$HOST |/usr/local/bin/qmail_procmail where qmail_procmail is a wrapper script for the procmail with preline in the .procmailrc file under user/ i have only this (Trash for tests only): :0: * ./domain.com/user/Maildir/.Trash/ the mail log says that the delivery is a success and is but mails are not diverted to the Trash directory.. should i set up MAILSPOOLHASH to 2?! that my was next step... any ideas welcome. thanks... --
Vpopmail with procmail and serialmail
Hi all, my name is Giuliano and I write from Italy. I contact the mailing list because I have a doubt with vpopmail. My vpopmail is 4.9.8-1. I have installed vpopmai4.9.8-1,serialmail-0.75 and procmail3.15-1. My doubt is: I use vpopmail and so my domains are in the /var/qmail/vpopmail/domains. I must use the package serialmail because I have only dialup line and the procmail for process all mail incoming. Serialmail and procmail uses the file /home/users/.qmail but I don't have it because I use the vpopmail. Must I create it ? If I create the file /home/users/.qmail, can the package vpopmail use it ? Is logic to use the file /home/users/.qmail if I have the vpopmail installed ? If I can't use the file /home/users/.qmail how can work with serialmail and procmail ? Vpopmail have a .qmail file ? Can you help me , please ? Thanking in advance and sorry for my english. Giuliano.
vpopmail and procmail
could someone give me a brief run down of how to use procmail with qmail and vpopmail? or at least point me in the right direction? thanks charlie
vpopmail and procmail
Dear All I want to do some message filtering, and have set a .qmail-tester in the relevant domain thus: |/var/qmail/bin/preline /usr/local/bin/qmail-procmail greg However procmail appears to be ignoring this and going for /home/vpopmail/.procmailrc An ideas or do I need to do something special list set an ENV_VAR and get procmail to use that ? Thanks Greg
Re: vpopmail and procmail
Greg Cope wrote: Dear All I want to do some message filtering, and have set a .qmail-tester in the relevant domain thus: |/var/qmail/bin/preline /usr/local/bin/qmail-procmail greg However procmail appears to be ignoring this and going for /home/vpopmail/.procmailrc An ideas or do I need to do something special list set an ENV_VAR and get procmail to use that ? Thanks Greg PLease forgive: a) me answering my own posts. b) asking a stupid question - procmail is using $HOME - doh ! So should I hardcode the .promailrc location with command line arguments within the .qmail file or is there an easier way ? Stupidly, Greg
Vpopmail and Procmail
Hi - Does anyone use procmail with vpopmail? If so, does anyone use it domain wide rather than on a per user basis? I recently submitted a patch against the vpopmail tree that makes vpopmail more friendly towards using procmail in front of the vdelivermail executable ie having a .qmail-default containing | preline procmail | vdelivermail.. More specifically it stopped it generating a bogus blank email with Delivered-to and Return-path headers when procmail has filtered the email off somewhere else (for instance quarantining it if it contains a virus). This allows the use of a procmail filter domain wide rather than having to implement the same script on a user by user basis (which works nicely but isnt what I want to do). Since the patch hasnt generated any response I was wondering if there is an easier way of solving this? Thanks Marcus -- Marcus Williams - http://www.onq2.com Quintic Ltd, 39 Newnham Rd, Cambridge, CB3 9EY
[PATCH] Vpopmail with procmail and non-delivering recipes
Hi - I've been using a combination of qmail/vpopmail/procmail and John Hardin's email security procmail recipes (see http://www.impsec.org/email-tools/procmail-security.html) recently with what seems to be good success. However, vpopmail in its vanilla form gets in the way of the procmail recipes due to the piping of procmail before the vdelivermail executable in a domains .qmail-default like: | preline procmail -m /path/to/rcfile | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox (Note this should all be one line and requires your procmail recipe to deliver to stdout by default - see http://mailman.rwth-aachen.de/pipermail/procmail/2000-May/74.html) The upshot of this is that if a procmail recipe quarantines an email with a non-delivering recipe (or at least one that delivers a security message to the domains postmaster and not one to the intended recipient), procmail pipes an empty message to vpopmail (of no length), but then vdelivermail tags the empty message with the Delivered-To and Return-Path headers (taken from the qmail process environment variables?) and delivers this to the users maildir. The following patch to vdelivermail.c checks to see if the incoming mail is of length0 and only delivers if this is true, thus allowing the procmail pipe. You may well be able to do this check earlier in the code (before the delivery goes as far as the tmp/ directory) but I couldnt get any other place to work reliably. caveat I'm not sure how useful this is for anyone else, but I haven't found any other way of using John's recipes with vpopmail so I thought I'd post it. I haven't lost any mail because of it but that doesn't mean you wont! If anyone has a better way of doing this, email me because I'd be interested how they did it. /caveat Hope its of use, Marcus -- Marcus Williams - http://www.onq2.com Quintic Ltd, 39 Newnham Rd, Cambridge, CB3 9EY diff -NabBur vpopmail-4.9.9.orig/vdelivermail.c vpopmail-4.9.9/vdelivermail.c --- vpopmail-4.9.9.orig/vdelivermail.c Fri Mar 16 17:51:22 2001 +++ vpopmail-4.9.9/vdelivermail.c Thu Mar 29 18:03:11 2001 @@ -671,6 +672,7 @@ int pid,i; int mailfile; size_t bytes; + size_t fbytes; #ifdef HARD_QUOTA FILE *fs; #endif @@ -748,7 +750,8 @@ failtemp (Failed to write RP DT (#4.3.2)\n); } - bytes=read(0,msgbuf,sizeof(msgbuf)); + fbytes=bytes=read(0,msgbuf,sizeof(msgbuf)); + while (bytes 0) { msg_size += bytes; if (write(mailfile,msgbuf,bytes) != bytes) { @@ -769,7 +772,10 @@ delete_tmp(); failtemp(Unable to close() tmp file (#4.3.6)\n); } - if (safe_rename(tmp_file,mailname) == -1) { + + if (fbytes==0) { + unlink(tmp_file); // throw away the file + } else if ((safe_rename(tmp_file,mailname) == -1)) { unlink(tmp_file); failtemp(Unable to rename tmp to new (#4.3.7)\n); }
Re: Vpopmail with procmail
* Chris Bunnell [EMAIL PROTECTED] [001119 15:08]: Ahh, the $1.98 question... That's exactly what I DON'T know how to do. There isn't a documented method of telling the Makefile to build to use Maildir rather than mbox... You don't need to do anything. It's just there. I am using 3.15. I've read in a few places that it "supports Maildir out of the box..." and yet when I set it up, it wanted to use /var/mail/spool ... etc. I read the INSTALL and everything else, and it appears that I need to edit the Makefile and possibly the src/authenticate.c file. I gave it the Nah, just make sure that your target mailboxes end in a slash. For instance, I filter all of my mail for this list into a separate mailbox: MAILDIR=/home/pcg/mail [...] :0 * ^Delivered-To: mailing list [EMAIL PROTECTED] lists/vpopmail/ Thus, all of this mailing list e-mail goes into a Maildir at /home/pcg/mail/lists/vpopmail/. I don't know if the trailing slash thing is actually documented... :( In any case, if you want to test it to just get all of your e-mail delivered to $HOME/Maildir/, set up the following .procmailrc file: # change for your Maildir/ path DEFAULT=/home/macgyver/Maildir/ That's it! /pg -- Peter Green : Gospel Communications Network, SysAdmin : [EMAIL PROTECTED] --- "By golly, I'm beginning to think Linux really *is* the best thing since sliced bread." (By Vance Petree, Virginia Power)
Re: Vpopmail with procmail
* Bill Shupp [EMAIL PROTECTED] [001119 01:37]: Did you compile procmail to use Maildir instead of mbox format? It's been a while since setting up procmail, but I'm pretty sure i had to do that procmail 3.15 supports Maildir out of the box. If he's using that version, he's okay. on 11/18/00 11:57 PM, Chris Bunnell at [EMAIL PROTECTED] wrote: Ok, I'll apologize in advance for this post. I HAVE however read, read, and READ FAQ's, mail list archives (in qmail, vpopmail, and procmail), how-to's etc. 'till my eye's are bleeding! :) I just can't seem to get procmail to work correctly. I got it set up as best as I could, and sent a message to myself. I watched the logs and could see that the .qmail had properly passed the msg onto procmail. Procmail apparently followed it's rules, and found the message to be ok to deliver. Then I saw in the log that it was trying to deliver to a /var/mail type directory! What does your .procmailrc and .qmail file look like? For vpopmail, you need to specify the location of the .procmailrc on the command line in the .qmail file. Otherwise, it will look in $HOME/.procmailrc, which is something like /home/vpopmail/.procmailrc, which is probably not what you want... /pg -- Peter Green : Gospel Communications Network, SysAdmin : [EMAIL PROTECTED] --- "MSDOS didn't get as bad as it is overnight -- it took over ten years of careful development." (By [EMAIL PROTECTED])
Re: Vpopmail with procmail
On Sat, Nov 18, 2000 at 09:57:09PM -0800, Chris Bunnell wrote: Ok, I'll apologize in advance for this post. I HAVE however read, read, and READ FAQ's, mail list archives (in qmail, vpopmail, and procmail), how-to's etc. 'till my eye's are bleeding! :) I just can't seem to get procmail to work correctly. I got it set up as best as I could, and sent a message to You could save yourself a lot of pain and use maildrop. I had never used either and had a simple filter up and running on our production qmail/vpop server in about 15 minutes. Ben -- Ben Beuchler [EMAIL PROTECTED] MAILER-DAEMON (612) 321-9290 x101 Bitstream Underground www.bitstream.net
Re: Vpopmail with procmail
That looks good, I like (and use) Sam's other works, but I need RBL filtering. I didn't see where maildrop supported it. - Original Message - From: "Ben Beuchler" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 19, 2000 7:33 AM Subject: Re: Vpopmail with procmail On Sat, Nov 18, 2000 at 09:57:09PM -0800, Chris Bunnell wrote: Ok, I'll apologize in advance for this post. I HAVE however read, read, and READ FAQ's, mail list archives (in qmail, vpopmail, and procmail), how-to's etc. 'till my eye's are bleeding! :) I just can't seem to get procmail to work correctly. I got it set up as best as I could, and sent a message to You could save yourself a lot of pain and use maildrop. I had never used either and had a simple filter up and running on our production qmail/vpop server in about 15 minutes. Ben -- Ben Beuchler [EMAIL PROTECTED] MAILER-DAEMON (612) 321-9290 x101 Bitstream Underground www.bitstream.net
Re: Vpopmail with procmail
- Original Message - Bill Shupp [EMAIL PROTECTED] [001119 01:37]: Did you compile procmail to use Maildir instead of mbox format? Ahh, the $1.98 question... That's exactly what I DON'T know how to do. There isn't a documented method of telling the Makefile to build to use Maildir rather than mbox... procmail 3.15 supports Maildir out of the box. If he's using that version, he's okay. I am using 3.15. I've read in a few places that it "supports Maildir out of the box..." and yet when I set it up, it wanted to use /var/mail/spool ... etc. I read the INSTALL and everything else, and it appears that I need to edit the Makefile and possibly the src/authenticate.c file. I gave it the 'ole college try but I didn't really know what to set the various variables in those files to. Once again, I understand that this is FREE software, but I do wish it had a Configure... It could have a simple Configure --enable-Maildir and I'd be rollin' by now. Oh well. I know it's my fault that this isn't working, I'm just stuck. Sometimes Solaris can prove to be a pain to install things on. Chris Bunnell
Re: Vpopmail with procmail
On Sun, Nov 19, 2000 at 12:07:51PM -0800, Chris Bunnell wrote: [procmail and vpopmail woes] I get these all the time but don't bother too much about them... qmail: 974668456.703587 delivery 4463: success: procmail:_Couldn't_create_"/var/spool/mail/johan"/did_0+0+1/ I have posted to this list earlier about my procmail and vpopmail setup, check the archives. (Also try the qmail list archives...) If you can't find it, get back to me. -Johan -- Johan Almqvist
Re: Vpopmail with procmail
On Sun, Nov 19, 2000 at 11:58:36AM -0800, Chris Bunnell wrote: That looks good, I like (and use) Sam's other works, but I need RBL filtering. I didn't see where maildrop supported it. In maildrop you can pipe to an external program. rblcheck is a spiffy little piece of code that will exit with a non-zero exit code if the requested IP is listed in any of the lists you ask it to use. That exitcode becomes available (I believe) in the variable $EXITCODE in your script. You could quite easily tag, reject, save to a different folder, etc based on the results. Use maildrop. It rules! Oh, and rblcheck is hosted at sourceforge: http://rblcheck.sourceforge.net/ Ben -- Ben Beuchler [EMAIL PROTECTED] MAILER-DAEMON (612) 321-9290 x101 Bitstream Underground www.bitstream.net
Re: Vpopmail with procmail
* Chris Bunnell [EMAIL PROTECTED] [001119 15:08]: Ahh, the $1.98 question... That's exactly what I DON'T know how to do. There isn't a documented method of telling the Makefile to build to use Maildir rather than mbox... You don't need to do anything. It's just there. I am using 3.15. I've read in a few places that it "supports Maildir out of the box..." and yet when I set it up, it wanted to use /var/mail/spool ... etc. I read the INSTALL and everything else, and it appears that I need to edit the Makefile and possibly the src/authenticate.c file. I gave it the Nah, just make sure that your target mailboxes end in a slash. For instance, I filter all of my mail for this list into a separate mailbox: MAILDIR=/home/pcg/mail [...] :0 * ^Delivered-To: mailing list [EMAIL PROTECTED] lists/vpopmail/ Thus, all of this mailing list e-mail goes into a Maildir at /home/pcg/mail/lists/vpopmail/. I don't know if the trailing slash thing is actually documented... :( In any case, if you want to test it to just get all of your e-mail delivered to $HOME/Maildir/, set up the following .procmailrc file: # change for your Maildir/ path DEFAULT=/home/macgyver/Maildir/ That's it! /pg -- Peter Green : Gospel Communications Network, SysAdmin : [EMAIL PROTECTED] --- "By golly, I'm beginning to think Linux really *is* the best thing since sliced bread." (By Vance Petree, Virginia Power)
Re: Vpopmail with procmail
Did you compile procmail to use Maildir instead of mbox format? It's been a while since setting up procmail, but I'm pretty sure i had to do that -Bill on 11/18/00 11:57 PM, Chris Bunnell at [EMAIL PROTECTED] wrote: Ok, I'll apologize in advance for this post. I HAVE however read, read, and READ FAQ's, mail list archives (in qmail, vpopmail, and procmail), how-to's etc. 'till my eye's are bleeding! :) I just can't seem to get procmail to work correctly. I got it set up as best as I could, and sent a message to myself. I watched the logs and could see that the .qmail had properly passed the msg onto procmail. Procmail apparently followed it's rules, and found the message to be ok to deliver. Then I saw in the log that it was trying to deliver to a /var/mail type directory! GAG!!! SENDMAIL back from the grave!!! No! Anyway, I read the heck out of the procmail INSTALL, README's etc. Pretty sparse compared to qmail and vpopmails information. I got those programs installed and they work fine. I just don't have enough examples of a qmail/procmail configuration to figure it out. Can someone supply me with a pretty-much step by step of how they set up qmail w/ vpopmail to work with procmail at a user by user level? Sorry for asking for such hand holding, but I've run out of directions to go. Thanks in advance! Chris Bunnell
vpopmail and procmail (was: Re: You can stop snickering now)
On Tue, Oct 17, 2000 at 10:42:50PM -0700, Myron Davis wrote: Hi Alec! I would like to get procmail to work on ~vpopmail, I've currently got RBL on everything. 1) Install recent procmail that handles Maildirs (even if in a funny way) 2) make users .qmail-user file (in the domain dir) look like this: | preline procmail -t ./user/Maildir/procmailrc 3) make users procmailrc (in dir as above) look like this: DEFAULT="./user/Maildir/" ORGMAIL="./user/Maildir/" LOGFILE="./user/Maildir/procmail-log" # and then whatever you like. "user" obviously replaced by the user's user name... -Johan -- Johan Almqvist