[vchkpw] vpopmail & maildrop
Dear guys, I installed netqmail-1.06 , ucspi-tcp-0.88.tar.gz & daemontools-0.76.tar.gz. Then i installed vpopmail-5.5.0 & spamassassin ,qmail-scanner-2.08 & dovecot-1.2.11. when i see log qmail's log file, i prevent to "delivery 25: success: client_connect:_connect_failed:_111/did_0+0+1/" I had to run /home/vopmail/bin/vusaged When i installed spam guard & qmailscanner i changed .qmail-default same follow: 1. comment in following line: | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox 2.add following line: | maildrop ../maildroprc Notice: Already i implemented same system in old vpopmail.even i don't know task of vusaged. when i changed .qmail-default, even i don't receive gmail email.I had to to comment out following line : | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox i installed vpopmail same: ./configure --prefix=/home/vpopmail/ --enable-roaming-users --enable-logging=p --enable-clear-passwd --disable-domain-quotas --disable-passwd Please help me. !DSPAM:4bab7ee232713965318257!
Re: [vchkpw] vpopmail & maildrop
On 3/15/2010 4:50 PM, Matt Brookings wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arthur Kerpician wrote: Hi, I just installed vpopmail 5.5.0 especially for the domain quota function which seems to be working fine. If I deliver through vdelivermail, quota enforcement does it's job but if I switch to maildrop for some filtering, I must apply maildrop / courier quota enforcement. Is there a way to first check for quota (user and domain) using vusaged and then pass the message to maildrop? I guess I have to use the .qmail file for this but I don't know how to combine both (vdelivermail and maildrop). You can call the vusagec binary, which will return usage stats for a user or domain. Unfortunately, you'd need to also parse the response for the numbers you want. I didn't think of vusagec, you're right. I tried calling "vdominfo -q " to check quota usage for the domain but it's broken (returns the command help). I'll write the script using vusagec, thanks alot! !DSPAM:4b9ea9ab32718762210992!
Re: [vchkpw] vpopmail & maildrop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arthur Kerpician wrote: > Hi, > I just installed vpopmail 5.5.0 especially for the domain quota function > which seems to be working fine. If I deliver through vdelivermail, quota > enforcement does it's job but if I switch to maildrop for some > filtering, I must apply maildrop / courier quota enforcement. Is there a > way to first check for quota (user and domain) using vusaged and then > pass the message to maildrop? I guess I have to use the .qmail file for > this but I don't know how to combine both (vdelivermail and maildrop). You can call the vusagec binary, which will return usage stats for a user or domain. Unfortunately, you'd need to also parse the response for the numbers you want. - -- /* Matt BrookingsGnuPG 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 iEYEARECAAYFAkueSUoACgkQIwet2/rgZyy+ZgCfSuDQcLMlE/xlc5ZCNjgCbMCP j7gAn1Ae45NsZHKR1yWuajPSI8Io7JGs =z3s5 -END PGP SIGNATURE-
[vchkpw] vpopmail & maildrop
Hi, I just installed vpopmail 5.5.0 especially for the domain quota function which seems to be working fine. If I deliver through vdelivermail, quota enforcement does it's job but if I switch to maildrop for some filtering, I must apply maildrop / courier quota enforcement. Is there a way to first check for quota (user and domain) using vusaged and then pass the message to maildrop? I guess I have to use the .qmail file for this but I don't know how to combine both (vdelivermail and maildrop). Thanks for the help, Arthur !DSPAM:4b9defd532711438716412!
Re: [vchkpw] Vpopmail + maildrop
On Thursday 13 May 2004 05:20, Tan Han Khing wrote: > Hi All, > > I have problems configuring vpopmail and maildrop to work. > when i use maildrop, all mails to my local domain fails. > but mails that are sent from my domain to remote domain, is working > fine. meaning to says there is something wrong for my incoming > traffic. (qmail-lspawn) what are the error messages in your qmail-send log ? > How do I test maildrop if its working fine? > This is because when running "maildrop mailfilter" in my shell, it > just stop there. > > How do I check if $EXT and $HOST have been successfully passed in? you could try to put a line like `env > /tmp/maildroplog` in your maildropfilter file -- Mit internetten Grüßen / Best Regards --- Justin Heesemannionium Technologies [EMAIL PROTECTED]www.ionium.org
[vchkpw] Vpopmail + maildrop
Hi All, I have problems configuring vpopmail and maildrop to work. when i use maildrop, all mails to my local domain fails. but mails that are sent from my domain to remote domain, is working fine. meaning to says there is something wrong for my incoming traffic. (qmail-lspawn) my current .qmail-default look like this | maildrop mailfilter and my mailfilter VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]`if ( $SIZE < 262144 ){ exception { xfilter "/usr/bin/spamc -f -u [EMAIL PROTECTED]" }} if (/^X-Spam-Flag: *YES/){ # try filtering it using user-defined rules exception { include $VHOME/Maildir/.mailfilter } # then try delivering it to the Trash folder exception { # to "$VPOP" to "$VHOME/Maildir/.Trash/" } # or uncomment the following to send it to the .spam folder # exception { # # to "$VPOP" # to "$VHOME/Maildir/.spam/" # } # if not go on with delivery exception { to "$VPOP" }}else{ exception { include $VHOME/Maildir/.mailfilter } exception { to "$VPOP" }} my qmail is not running on service or supervise (i took over from other, so i cant do much) its using rc directly and my /var/qmail/rc look like this #!/bin/sh # Using splogger to send the log through syslog.# Using qmail-local to deliver messages to ~/Mailbox by default. #exec env - PATH="/var/qmail/bin:$PATH" \#qmail-start ./Maildir/ splogger qmail# when QMAILQUEUE is set, all mail will be sent to the nominated scriptQMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUEexec env - PATH="/var/qmail/bin:$PATH" qmail-start '| /usr/local/bin/deliverquota ./Maildir/ 3072000S | dot-forward .forward' splogger qmail I have tested my qmail-scanner with spamassassin with clamav and they are working fine. I have used the tests provided in qmail-scanner, contrib directory How do I test maildrop if its working fine? This is because when running "maildrop mailfilter" in my shell, it just stop there. How do I check if $EXT and $HOST have been successfully passed in? Thank you. Best Regards, Tan Han Khing[EMAIL PROTECTED]
Re: [vchkpw] vpopmail + maildrop + SQL valias delivery issue problem/kludge
Jeremy Kitchen wrote: On Sun, 2003-12-21 at 14:01, Gary - US wrote: Is there something wrong with the inter7.com site? I haven't been able to access it for days. Your question should have been started as a new thread, rather than a reply to a previous post, since it didn't have any relevance to the post you replied to. That being said, yes, the Inter7 website is currently down. The colocation provider hosting the machine is having massive network issues, and they are currently working on getting us access to it. I am not sure what Ken is planning to do, but I believe we'll be moving the site to our offices in Evanston, IL. We sincerely apologize for any inconvenience this may be causing anyone. -Jeremy Well excuse me. Did you give us any information about it? If so I must have missed it. By the way since I can't get to the site to do it, please remove me from this list. -- Semper Fi & God Bless America, Gary-US MCNGP #20 & retired Devil Dog http://www.mcngp.tk The MCNGP Team - We're here to help ** Kindly Do The Needful **
Re: [vchkpw] vpopmail + maildrop + SQL valias delivery issue problem/kludge
On Sun, 2003-12-21 at 14:01, Gary - US wrote: > Is there something wrong with the inter7.com site? I haven't been able to > access it for days. Your question should have been started as a new thread, rather than a reply to a previous post, since it didn't have any relevance to the post you replied to. That being said, yes, the Inter7 website is currently down. The colocation provider hosting the machine is having massive network issues, and they are currently working on getting us access to it. I am not sure what Ken is planning to do, but I believe we'll be moving the site to our offices in Evanston, IL. We sincerely apologize for any inconvenience this may be causing anyone. -Jeremy -- Jeremy Kitchen <[EMAIL PROTECTED]> Inter7 Internet Technologies, Inc.
Re: [vchkpw] vpopmail + maildrop + SQL valias delivery issue problem/kludge
Is there something wrong with the inter7.com site? I haven't been able to access it for days. - Original Message - From: "Chris Ess" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 21, 2003 1:58 PM Subject: [vchkpw] vpopmail + maildrop + SQL valias delivery issue problem/kludge > Applicable versions: > > vpopmail 5.2.1 and 5.2.2 > maildrop 1.6.3 > MySQL 4.0.16 > > I don't have a test server set up to use 5.4.0-pre1 but I may get around > to that sometime this next couple of weeks. (By which time we'll have a > new 5.4.0-pre# version probably.) > > The basic issue is one that had been reported before on this mailing > list... If I call vdelivermail in maildrop to handle aliases, it spawns > vdelivermail and says it handles an alias... But it just simply does not > forward the message. > > An example set of lines from my mail log is: > (I have changed the domain names for various reasons) > > Dec 8 17:33:15 devmail qmail: 1070922795.117969 new msg 49247 > Dec 8 17:33:15 devmail qmail: 1070922795.118076 info msg 49247: bytes 1073 from <[EMAIL PROTECTED]> qp 13756 uid 211 > Dec 8 17:33:15 devmail qmail: 1070922795.122280 starting delivery 222: msg 49247 to local [EMAIL PROTECTED] > Dec 8 17:33:15 devmail qmail: 1070922795.122377 status: local 1/100 remote 0/100 > Dec 8 17:33:15 devmail qmail: 1070922795.162617 delivery 222: success: vdelivermail:_valiases_processed/did_0+0+1/ > Dec 8 17:33:15 devmail qmail: 1070922795.162727 status: local 0/100 remote 0/100 > Dec 8 17:33:15 devmail qmail: 1070922795.162746 end msg 49247 > > At the time, [EMAIL PROTECTED] was supposed to forward back to > [EMAIL PROTECTED] > > After a bit of playing around (including changing vdelivermail to use a > Perl script rather than qmail-inject), I decided that the problem was > that, for whatever reason, qmail-inject was stopping before it had the > opportunity to finish. My guess is that a signal was being passed to it > that caused it to terminate. Unfortunately, I don't know what signal that > is since I didn't think to try to add signal handlers to my Perl script. > Also, unfortunately, I don't know if the signal is being issued by (or as > a result of) vdelivermail or maildrop. (I seem to recall reading > somewhere that a child process is passed a signal if the parent dies.) > > I came up with a fix, but it's rather a quick kludge and really should be > replaced with something better. My fix was to add a sleep(2) after > vdelivermail.c closes the write file descriptor to the qmail-inject child. > So the 'if (inject == 1)' block looks like this: > > if ( inject == 1 ) { > close(write_fd); > sleep(2); > return(0); > } > > > (In 5.2.2, the sleep(2) is line 599.) > > The theory is that after two seconds, qmail-inject should be done and then > vdelivermail returns. > > This works on both the development and production mailservers I run > without issue. > > As I said, it's a nasty kludge, but it may be useful for those of you who > experience this issue. > > If you have any better suggestions or think I'm chasing the wrong bug, do > let me know. > > Sincerely, > > > Chris Ess > System Administrator / CDTT (Certified Duct Tape Technician)
[vchkpw] vpopmail + maildrop + SQL valias delivery issue problem/kludge
Applicable versions: vpopmail 5.2.1 and 5.2.2 maildrop 1.6.3 MySQL 4.0.16 I don't have a test server set up to use 5.4.0-pre1 but I may get around to that sometime this next couple of weeks. (By which time we'll have a new 5.4.0-pre# version probably.) The basic issue is one that had been reported before on this mailing list... If I call vdelivermail in maildrop to handle aliases, it spawns vdelivermail and says it handles an alias... But it just simply does not forward the message. An example set of lines from my mail log is: (I have changed the domain names for various reasons) Dec 8 17:33:15 devmail qmail: 1070922795.117969 new msg 49247 Dec 8 17:33:15 devmail qmail: 1070922795.118076 info msg 49247: bytes 1073 from <[EMAIL PROTECTED]> qp 13756 uid 211 Dec 8 17:33:15 devmail qmail: 1070922795.122280 starting delivery 222: msg 49247 to local [EMAIL PROTECTED] Dec 8 17:33:15 devmail qmail: 1070922795.122377 status: local 1/100 remote 0/100 Dec 8 17:33:15 devmail qmail: 1070922795.162617 delivery 222: success: vdelivermail:_valiases_processed/did_0+0+1/ Dec 8 17:33:15 devmail qmail: 1070922795.162727 status: local 0/100 remote 0/100 Dec 8 17:33:15 devmail qmail: 1070922795.162746 end msg 49247 At the time, [EMAIL PROTECTED] was supposed to forward back to [EMAIL PROTECTED] After a bit of playing around (including changing vdelivermail to use a Perl script rather than qmail-inject), I decided that the problem was that, for whatever reason, qmail-inject was stopping before it had the opportunity to finish. My guess is that a signal was being passed to it that caused it to terminate. Unfortunately, I don't know what signal that is since I didn't think to try to add signal handlers to my Perl script. Also, unfortunately, I don't know if the signal is being issued by (or as a result of) vdelivermail or maildrop. (I seem to recall reading somewhere that a child process is passed a signal if the parent dies.) I came up with a fix, but it's rather a quick kludge and really should be replaced with something better. My fix was to add a sleep(2) after vdelivermail.c closes the write file descriptor to the qmail-inject child. So the 'if (inject == 1)' block looks like this: if ( inject == 1 ) { close(write_fd); sleep(2); return(0); } (In 5.2.2, the sleep(2) is line 599.) The theory is that after two seconds, qmail-inject should be done and then vdelivermail returns. This works on both the development and production mailservers I run without issue. As I said, it's a nasty kludge, but it may be useful for those of you who experience this issue. If you have any better suggestions or think I'm chasing the wrong bug, do let me know. Sincerely, Chris Ess System Administrator / CDTT (Certified Duct Tape Technician)
RE: [vchkpw] vpopmail, maildrop and spamassassin problem
Here's the filter I use. You need to change the $VMAILDIR variable in the last "to" line on yours to read just "./Maildir/" import EXT import HOST import HOME MAX = 99 if ($SIZE < 262144) { xfilter "/usr/bin/spamc -p 1783 -f -u [EMAIL PROTECTED]" } if ((/^X-Spam-Status: Yes, hits=![0-9]+\.[0-9]+!.*/:h && $MATCH2 > $MAX)) { exit } if ((/^X-Spam-Flag:.*YES/)) { `test -d ./Maildir/.SPAM` if( $RETURNCODE == 1 ) { `maildirmake ./Maildir/.SPAM;chown -R vpopmail.vchkpw ./Maildir/.SPAM` `/home/vpopmail/subImapSpam.sh ./` } to "./Maildir/.SPAM/" } to "./Maildir/" -Original Message- From: Rodney M [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 7:53 PM To: [EMAIL PROTECTED] Subject: [vchkpw] vpopmail, maildrop and spamassassin problem I'm trying to get maildrop and spamassassin up and running with vpopmail but am having some problems. Below is my server setup: freebsd 4.8-release vpopmail-5.3.30 maildrop-1.5.2 (installed from ports) spamassassin-2.60 (installed from ports) qmail-1.03_2 (installed from ports) I am trying to get this working for a single vpopmail user before I turn it loose on the whole domain. In the directory /home/vpopmail/domains/debaser.net/test I have created a .qmail file that contains: |preline /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter The contents of /home/vpopmail/etc/mailfilter are: ---start--- VMAILDIR="$PWD/Maildir/" USERNAME=`echo ${PWD##*/}` USERHOST=`PWDTMP=${PWD%/*}; echo ${PWDTMP##*/}` SPAMFOLDER=".Spam/" # run through SpamAssassin (if less than the specified size) if ( $SIZE < 262144 ) { exception { xfilter "/usr/local/bin/spamc -f -u [EMAIL PROTECTED]" } } if (/^X-Spam-Flag: *Yes/) { # try to deliver to the spam folder exception { to"$VMAILDIR$SPAMFOLDER" } } # process user's rules exception { include $VMAILDIR/.mailfilter } # if it falls through to here, just put it in their inbox to "$VMAILDIR" ---end--- When I try to send a message to [EMAIL PROTECTED], I see this in /var/log/maillog: Dec 12 22:30:27 gigantic qmail: 1071286227.908530 starting delivery 756: msg 321 to local [EMAIL PROTECTED] Dec 12 22:30:27 gigantic qmail: 1071286227.908975 status: local 1/10 remote 0/120 Dec 12 22:30:27 gigantic maildrop[68428]: Unable to open mailbox. Dec 12 22:30:27 gigantic qmail: 1071286227.927171 delivery 756: deferral:Unable_to_execute_/nonexistent/Unable_to_execute_/nonexistent/ Unable_to_execute_/nonexistent//usr/local/bin/maildrop:_Unable_to_open_m ailbox./ I noticed that when you install maildrop from the ports collection, it defaults to running as root:mail. I tried installing maildrop with --enable-maildrop-uid=vpopmail --enable-maildrop-gid=vchkpw but that didn't seem to fix anything. I don't have spamd running as I would like to just call spamassassin directly for now. Any ideas why maildrop is not working? I've looked thru the mailing list archives and google but no luck. Any help would be appreciated. Thanks. Rodney
[vchkpw] vpopmail, maildrop and spamassassin problem
I'm trying to get maildrop and spamassassin up and running with vpopmail but am having some problems. Below is my server setup: freebsd 4.8-release vpopmail-5.3.30 maildrop-1.5.2 (installed from ports) spamassassin-2.60 (installed from ports) qmail-1.03_2 (installed from ports) I am trying to get this working for a single vpopmail user before I turn it loose on the whole domain. In the directory /home/vpopmail/domains/debaser.net/test I have created a .qmail file that contains: |preline /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter The contents of /home/vpopmail/etc/mailfilter are: ---start--- VMAILDIR="$PWD/Maildir/" USERNAME=`echo ${PWD##*/}` USERHOST=`PWDTMP=${PWD%/*}; echo ${PWDTMP##*/}` SPAMFOLDER=".Spam/" # run through SpamAssassin (if less than the specified size) if ( $SIZE < 262144 ) { exception { xfilter "/usr/local/bin/spamc -f -u [EMAIL PROTECTED]" } } if (/^X-Spam-Flag: *Yes/) { # try to deliver to the spam folder exception { to"$VMAILDIR$SPAMFOLDER" } } # process user's rules exception { include $VMAILDIR/.mailfilter } # if it falls through to here, just put it in their inbox to "$VMAILDIR" ---end--- When I try to send a message to [EMAIL PROTECTED], I see this in /var/log/maillog: Dec 12 22:30:27 gigantic qmail: 1071286227.908530 starting delivery 756: msg 321 to local [EMAIL PROTECTED] Dec 12 22:30:27 gigantic qmail: 1071286227.908975 status: local 1/10 remote 0/120 Dec 12 22:30:27 gigantic maildrop[68428]: Unable to open mailbox. Dec 12 22:30:27 gigantic qmail: 1071286227.927171 delivery 756: deferral:Unable_to_execute_/nonexistent/Unable_to_execute_/nonexistent/ Unable_to_execute_/nonexistent//usr/local/bin/maildrop:_Unable_to_open_mailbox./ I noticed that when you install maildrop from the ports collection, it defaults to running as root:mail. I tried installing maildrop with --enable-maildrop-uid=vpopmail --enable-maildrop-gid=vchkpw but that didn't seem to fix anything. I don't have spamd running as I would like to just call spamassassin directly for now. Any ideas why maildrop is not working? I've looked thru the mailing list archives and google but no luck. Any help would be appreciated. Thanks. Rodney
Re: [vchkpw] vpopmail+maildrop, sql valias loses mails
Look in syslog (/var/log/messages) when that problem happens. Look for vdelivermail. Do you see any vdelivermail coredumps? If yes, then this is the same problem I had, which is most likely related to vdelivermail not handling certain maildrop exit codes (I dont recall them off hand) So as a workaround, try this: SHELL="/bin/sh" import EXT import HOST VHOME=`~vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] `test -d $VHOME/Maildir` if ( $RETURNCODE == 1 ) { echo "Sorry, no mailbox here by that name. (#5.1.1)" EXITCODE=100 exit } # Default delivery exception { to "$VHOME/Maildir/" } Quoting Leto Tokarev <[EMAIL PROTECTED]>: > Hi! > > > vpopmail 5.2.1+seekable > maildrop 1.5.1 > (same results with mdrop1.6, 1.6.1, vpop5.3.27) > > .qmail-default: > | preline /usr/local/bin/maildrop mailfilter > > > very simple mailfilter: > logfile x > import EXT > import HOST > VPOP="| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox" > to "$VPOP" > > > > [EMAIL PROTECTED] is a Maildir. > > valias [EMAIL PROTECTED] -> [EMAIL PROTECTED] comes from mysql table. > > Out of 10 mails sent to "[EMAIL PROTECTED]" usually 4 lose, 6 gets > delivered. > > What should I look for? > > I debugged what's happening with vdelivermail: > > It always gets the mail, and looks up the valias. > When things okay, it runs a second delivery, but this time to the final > Maildir. > Sometimes this step missing. > > More strange: 100% success when an alias comes from dot-qmail file, or > when the valias points to a different domain (no matter if local or > remote). > > > > Leto > > > Respectfully, Tim Hasson
[vchkpw] vpopmail+maildrop, sql valias loses mails
Hi! vpopmail 5.2.1+seekable maildrop 1.5.1 (same results with mdrop1.6, 1.6.1, vpop5.3.27) .qmail-default: | preline /usr/local/bin/maildrop mailfilter very simple mailfilter: logfile x import EXT import HOST VPOP="| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox" to "$VPOP" [EMAIL PROTECTED] is a Maildir. valias [EMAIL PROTECTED] -> [EMAIL PROTECTED] comes from mysql table. Out of 10 mails sent to "[EMAIL PROTECTED]" usually 4 lose, 6 gets delivered. What should I look for? I debugged what's happening with vdelivermail: It always gets the mail, and looks up the valias. When things okay, it runs a second delivery, but this time to the final Maildir. Sometimes this step missing. More strange: 100% success when an alias comes from dot-qmail file, or when the valias points to a different domain (no matter if local or remote). Leto
Re: [vchkpw] vpopmail & maildrop
Hi, On Sat, 2003-09-27 at 01:29, til wrote: > Hi, > > after fiddling around with my mailserver configuration, everything seems to > work now except for one thing. I'd like to Catch-All non existent accounts > to postmaster, so i tried to change the delivery instruction in .qmail / > .qmail-default to filter messages to postmaster. the problem is, that once i > change the delivery instructions, i catch ALL mail, even to other existing > accounts. anyone got a clue (although this may be a little offtopic on this > list) ? In your maildrop filter you could have something like... # Get maildir to deliver to VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] # If it wasn't a valid user... set user to postmaster if ($RETURNCODE != 0) { EXT="postmaster" } That would probably do what you are after. Cheers, Jonathan
[vchkpw] vpopmail & maildrop
Hi, after fiddling around with my mailserver configuration, everything seems to work now except for one thing. I'd like to Catch-All non existent accounts to postmaster, so i tried to change the delivery instruction in .qmail / .qmail-default to filter messages to postmaster. the problem is, that once i change the delivery instructions, i catch ALL mail, even to other existing accounts. anyone got a clue (although this may be a little offtopic on this list) ? Thanks, till
[vchkpw] vpopmail-maildrop
Whatever I do I am not able to get maildrop to process the files which sqwebmail create, my eyes are hurting because of reading documents. I must be missing something somewhere... I have this in qmail-send run file #!/bin/sh env env - PATH="/var/qmail/bin:/usr/local/bin" \ qmail-start '| /var/qmail/bin/preline /usr/local/bin/maildrop' The mails are delivered to users always. I couldnt even break the system I tried to put after maildrop -M location_of_file ./Maildir/.mailfilter ../.mailfilter ./mailfilter and none has any effect. any suggestions? #MFMAILDROP=2 # # DO NOT EDIT THIS FILE. This is an automatically generated filter. FROM='[EMAIL PROTECTED]' import SENDER if ($SENDER eq "") { SENDER=$FROM } ##Op:hasrecipient ##Header: ##Value:[EMAIL PROTECTED] ##Folder:.Trash ##From: ##PlainString ##Name:test if ((hasaddr("[EMAIL PROTECTED]"))) { to "./.Trash/." } to "./." Evren
[vchkpw] vpopmail, maildrop, and exitcodes
I'm having a strange issue with vpopmail and maildrop. I'm running a spam scanner called spamprobe. Attached is the maildrop filter itself, and my qmail-default file looks like this (all one line): | /var/qmail/bin/preline /usr/local/bin/maildrop /var/vpopmail/etc/maildroprc-spamprobe The problem I'm running into happens after a message has been marked as spam. Basically, the jist of the filter is that if the message is larger than 262144 bytes it is scanned. If a message is scanned and marked as spam, it's delivered to a .SPAM folder inside their Maildir which is then readable via IMAP. But, the problem I'm encountering is when a message is marked as spam and to an invalid recipient, it goes to deliver to the .SPAM directory of a user that doesn't exist. When maildrop has a problem delivering it exits with a EX_TEMPFAIL, which puts the message back in queue for delivery later. The message just sits in queue until finally qmail bounces back saying it's been in queue too long. To try and combat this problem, I had maildrop run a test to make sure that the ~vpopmail/domains/iswest.net/user/Maildir existed, and if it didn't to pipe the message to vdelivermail and exit. This is where the weirdness comes in. Sometimes, and I can't figure out how to reproduce it, vpopmail exits back to maildrop with a 0 error code so maildrop considers the message delivered and it bounces back to the sender with the "no mailbox here by that name" error. Other times though, I get this in my log files: @40003ee220592b6202ac status: local 6/10 remote 1/120 @40003ee220592b6788bc delivery 1708886: deferral: Sorry,_no_mailbox_here_by_that_name._vpopmail_(#5.1.1)/maildrop:_error_writi ng_to_mailbox.//usr/local/bin/maildrop:_Unable_to_deliver_to_mailbox./ @40003ee220592c32432c status: local 5/10 remote 1/120 @40003ee220592c3275f4 delivery 170: deferral: Sorry,_no_mailbox_here_by_that_name._vpopmail_(#5.1.1)/maildrop:_error_writi ng_to_mailbox.//usr/local/bin/maildrop:_Unable_to_deliver_to_mailbox./ @40003ee220592c32bc44 status: local 4/10 remote 1/120 @40003ee220592c32df6c delivery 1708889: deferral: Sorry,_no_mailbox_here_by_that_name._vpopmail_(#5.1.1)/maildrop:_error_writi ng_to_mailbox.//usr/local/bin/maildrop:_Unable_to_deliver_to_mailbox./ I've had this same problem with vpopmail 5.3.8 and I just tried upgrading to 5.3.20 this morning but I still see the same things in the log files. I am not able to reproduce this myself, so I have no idea exactly why it happens, but any input on this would be greatly appreciated. ## mailfilter ## import EXT import HOST import HOME VHOME=`/var/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] VPOP="| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox" # messages larger than X bytes are not scanned if ($SIZE < 262144) { # message is scored and automatically added to the filter #SCORE=`/usr/local/bin/spamprobe -d /var/spool/spamprobe -s 500 receive` # message is scored but not added to the filter SCORE=`/usr/local/bin/spamprobe -d /var/spool/spamprobe -s 500 score` # header added to the email based defining it's score xfilter "/usr/local/bin/reformail -i 'X-SpamProbe: $SCORE'" } # if the score is marked as "SPAM" it is delivered to a .SPAM dir if ((/^X-SpamProbe: SPAM/:h)) { # check to see if user even exists, if not, send to vpopmail to boucne it `test -d $VHOME/Maildir/` if( $RETURNCODE == 1) { to "$VPOP" } # make sure the Maildir/.SPAM dir exists, if not, create it USER="vpopmail" GROUP="vchkpw" `test -d $VHOME/Maildir/.SPAM` if( $RETURNCODE == 1 ) { `/usr/local/bin/maildirmake $VHOME/Maildir/.SPAM ; /usr/sbin/chown -R $USER:$GROUP $VHOME/Maildir/.SPAM` } # deliver spam to Maildir/.SPAM dir to "$VHOME/Maildir/.SPAM/" # find old spams and delete them `find $VHOME/Maildir/.SPAM -type f -mtime +7 -delete` } # everything else delivered normally to "$VPOP"