[vchkpw] Maildrop and vpopmail
I've got my maildrop filtering and .qmail-default setup close to how I want it, but there's some strangeness I'd like to work out still. Most annoying is that when an incoming smtp connection references an account that does not exist I get the following in my maildrop log: BEGIN maildrop processing for [EMAIL PROTECTED] === VHOME is set to VPOP is set to | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox Date: Fri Feb 18 21:58:22 2005 From: Nikki Vogt <[EMAIL PROTECTED]> Subj: :SPAM: re[16] !Err: | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox (5232) === END === What is the !Err signifying? And is it going to the vdelivermail command on that error line as a result of $VPOP being the final exception in the mailfilter file? How can I keep the !Err from being thrown and handle it cleanly? Also, strangely, I *very* occasionally will get an error message like this in my qmail-send logs for a user that doesn't exist (the above message triggered one of the occasions). The distinguishing factor with these emails that I've seen so far is that they are usually to an address that is a real account on the system, only truncated (i.e., gie vs. maggie) Note, too, that I cannot recreate this intentionally, leading me to believe there is another factor involved besides the truncated account name: 2005-02-18 21:58:22.241245500 starting delivery 181: msg 3063895 to local [EMAIL PROTECTED] 2005-02-18 21:58:22.241250500 status: local 1/10 remote 0/255 2005-02-18 21:58:22.285783500 delivery 181: deferral: Sorry,_no_mailbox_here_by_that_name._vpopmail_(#5.1.1)/maildrop:_error_writing_to_mailbox./ The normal behavior is to show that !Err message in the maildrop logs, and then bounce the message according to $VPOP. Finally, what could cause a log entry like this in my maildrop logs. Note the BEGIN twice in a row, and also that info doesn't exist while account does: BEGIN maildrop processing for [EMAIL PROTECTED] === BEGIN maildrop processing for [EMAIL PROTECTED] === VHOME is set to VPOP is set to | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox Date: Fri Feb 18 22:51:23 2005 From: "elois fields" <[EMAIL PROTECTED]> Subj: Medical Facts: Announcement !Err: | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox To recap what I'm trying to figure out: 1. Why some accoungs seem to get stuck in the queue as undeliverable on rare occasion when the account does not exist, while other nonexistent accounts bounce as expected. 2. If the !Err in my logs is avoidable, and instead I can find a way to have the logs show "File: | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" as it does for accounts that do exist. 3. What might cause the double BEGIN lines in my mailfilter logs? Here be the relevant files: /home/vpopmail/mydomain.com/.qmail-default: | /home/vpopmail/qtrap/qtrap.sh #| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox | maildrop mailfilter /home/vpopmail/mydomain.com/mailfilter: #VERBOSE=5 logfile "/var/log/maildrop-filter.log" log " BEGIN maildrop processing for [EMAIL PROTECTED] ===" import EXT import HOST SHELL="/bin/sh" VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] log "VHOME is set to $VHOME" log "VPOP is set to $VPOP" #if ( $SIZE < 262144 ) #{ # exception { # xfilter "/usr/bin/spamc -f -u [EMAIL PROTECTED]" # } #} if (/^X-Spam-Status: *Yes/) { #try filtering it using user-defined rules exception { include $VHOME/Maildir/.mailfilter } #then try delivering it to a Spam Folder exception { # to "$VPOP" to "$VHOME/Maildir/.Junk/" } exception { to "$VPOP" } } else { exception { include $VHOME/Maildir/.mailfilter } exception { to "$VPOP" } } log "=== END ===" exit Matt Kern
[vchkpw] maildrop and vpopmail/spamassassin
I'm running vpopmail 5.3.8 with spamassassin 2.55 (mysql for prefs). I'm having problems with maildrop performing a mailfilter I found on the vpopmail mailling list. I am also using courier-imap in conjunction with qmail. [see http://bluedot.net/mail/archive/read.php?f=2&i=10377&t=10377] The .SPAM folder is not created, and I am left with the following error message: 2003-05-30 17:44:28.190244500 delivery 359: deferral: /usr/local/bin/maildrop:_Invalid_home_directory_permissions_-_world_writable./preline:_fatal:_unable_to_copy_input:_broken_pipe/ If I manually perform the maildirmake .SPAM, then chown -R vpopmail:vchkpw .SPAM, I get the same error. In my ~vpopmail/domains/realirc.org/.qmail-default I have: |preline /usr/local/bin/maildrop |/usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox I'm doing it like this so I can just test it on one domain right now, so I don't break the whole box, heh. I had to slightly modify the script to fit my proper paths. I renamed it to maildroprc and placed it in /usr/local/etc (on a FreeBSD 5.0 machine) so it reads it by default as stated by maildrop's man page. Below is my maildroprc file: import EXT import HOST import HOME VHOME=`/usr/local/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] if ((/^X-Spam-Flag:.*YES/)) { `test -d $VHOME/Maildir/.SPAM` if( $RETURNCODE == 1 ) { `maildirmake $VHOME/Maildir/.SPAM; chown -R vpopmail:vchkpw $VHOME/Maildir/.SPAM` } to "$VHOME/Maildir/.SPAM/" } The VPOP was omitted because of my previous statement of how vdelivermail is called. Below are the permissions for the files/dirs in question: -rwxr-xr-x 1 root mail 152696 May 29 00:44 /usr/local/bin/maildrop -rw-r--r-- 1 root wheel 388 May 30 17:42 /usr/local/etc/maildroprc In /usr/local/vpopmail/domains: drwx-- 9 vpopmail vchkpw 512 May 30 18:01 realirc.org In /usr/local/vpopmail/domains/realirc.org: -rw--- 1 vpopmail vchkpw 92 May 30 18:01 .qmail-default In /usr/local/vpopmail/domains/realirc.org/cyko: ./Maildir: total 22 drwx-- 8 vpopmail vchkpw 512 May 30 17:46 . drwx-- 4 vpopmail vchkpw 512 Apr 18 21:59 .. drwx-- 5 vpopmail vchkpw 512 May 30 17:46 .SPAM (**manually created**) drwx-- 5 vpopmail vchkpw 512 May 1 22:37 .Trash drwx-- 5 vpopmail vchkpw 512 May 30 17:30 .sent-mail -rw-r--r-- 1 vpopmail vchkpw 241 May 30 16:57 courierimapuiddb drwx-- 2 vpopmail vchkpw 1024 May 30 16:57 cur -rw--- 1 vpopmail vchkpw 3054 May 30 16:56 maildirsize drwx-- 2 vpopmail vchkpw 512 May 30 16:56 new drwx-- 2 vpopmail vchkpw 512 May 30 17:33 tmp ./Maildir/.SPAM: total 10 drwx-- 5 vpopmail vchkpw 512 May 30 17:46 . drwx-- 8 vpopmail vchkpw 512 May 30 17:46 .. drwx-- 2 vpopmail vchkpw 512 May 30 17:46 cur drwx-- 2 vpopmail vchkpw 512 May 30 17:46 new drwx-- 2 vpopmail vchkpw 512 May 30 17:46 tmp Any ideas are appreciated. Sorry for the immense amount of information. I just wanted to make sure I covered everything so I can resolve this quickly. Thanks, -Patrick Lahni [EMAIL PROTECTED] - This mail sent through IMP: http://horde.org/imp/
RE: [vchkpw] maildrop and vpopmail/spamassassin
Quoting Benjamin Tomhave <[EMAIL PROTECTED]>: > First, since the maildirmake is being called by vpopmail user in vchkpw > group, you don't need to do the chown. > Second, I don't think you need the preline command. > Third, how is maildrop getting your mailfilter file if you never tell it > where it is? Or did you set it up as /etc/maildroprc? > And so on... In FreeBSD, I have it stored as /usr/local/etc/mailprocrc as stated in the maildrop man page. > my .qmail-default looks like: > | maildrop ../mailfilter Took out the preline, now I get this error message: 2003-05-30 18:36:38.233728500 delivery 484: deferral: /usr/local/bin/maildrop:_Invalid_home_directory_permissions_-_world_writable./ > and my mailfilter looks like: > SHELL="/bin/bash" > import EXT > import HOST > VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox" > VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] > > DUMMY=`test -d $VHOME/Maildir` > if ( $RETURNCODE == 1 ) > { >echo "Sorry, no mailbox here by that name. (#5.1.1)" >EXITCODE=100 >exit > } > > DUMMY=`test -d $VHOME/Maildir/.Spam` > if ( $RETURNCODE == 1 ) > { >DUMMY=`/usr/bin/maildirmake -f Spam $VHOME/Maildir` >DUMMY=`echo Inbox.Spam >> $VHOME/Maildir/courierimapsubscribed` > } > > if ( $SIZE < 262144 ) > { > xfilter "/usr/bin/spamc -f -u [EMAIL PROTECTED]" > } > > if (/^X-Spam-Status: *YES/) > { > to "$VHOME/Maildir/.Spam" > echo "Message delivered to $VHOME/Maildir/.Spam" > > exit > } > else > { > to "$VPOP" > exit > } > > exit > > HTH, > > -ben My filter now looks like this: SHELL="/usr/local/bin/bash" import EXT import HOST import HOME VHOME=`/usr/local/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED] DUMMY=`test -d $VHOME/Maildir` if ( $RETURNCODE == 1 ) { echo "Sorry, no mailbox here by that name. (#5.1.1)" EXITCODE=100 exit } DUMMY=`test -d $VHOME/Maildir/.Spam` if ( $RETURNCODE == 1 ) { DUMMY=`/usr/local/bin/maildirmake -f Spam $VHOME/Maildir` DUMMY=`echo Inbox.Spam >> $VHOME/Maildir/courierimapsubscribed` } if (/^X-Spam-Status: *YES/) { to "$VHOME/Maildir/.Spam" echo "Message delivered to $VHOME/Maildir/.Spam" exit } if (/^X-Spam-Status: *NO/) { exit } I slightly modified the end because I have your $VPOP variable called like this in my .qmail-default file: |/usr/local/bin/maildrop |/usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox The reason I'm doing it like this for now is because eventually I'm going to append the maildrop to spamc using the -e trigger, that way the .qmail-default of all my vdomains can easily be modified by qmailadmin without having to patch anything. By doing it the way I'm doing it now, it should only effect realirc.org and not effect all the domains systemwide. Any more suggestions? -Patrick > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: Friday, May 30, 2003 4:07 PM > > To: vpopmail list > > Subject: [vchkpw] maildrop and vpopmail/spamassassin > > > > > > I'm running vpopmail 5.3.8 with spamassassin 2.55 (mysql for > > prefs). I'm having > > problems with maildrop performing a mailfilter I found on the > > vpopmail mailling > > list. I am also using courier-imap in conjunction with qmail. > > > > [see http://bluedot.net/mail/archive/read.php?f=2&i=10377&t=10377] > > > > The .SPAM folder is not created, and I am left with the following > > error message: > > > > 2003-05-30 17:44:28.190244500 delivery 359: deferral: > > /usr/local/bin/maildrop:_Invalid_home_directory_permissions_-_worl > d_writable./preline:_fatal:_unable_to_copy_input:> _broken_pipe/ > > > > If I manually perform the maildirmake .SPAM, then chown -R vpopmail:vchkpw > > .SPAM, I get the same error. > > > > In my ~vpopmail/domains/realirc.org/.qmail-default I have: > > > > |preline /usr/local/bin/maildrop > > |/usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox > > > > I'm doing it like this so I can just test it on one domain right > > now, so I don't > > break the whole box, heh. > > > > I had to slightly modify the script to fit my proper paths. I > > renamed it to > > maildroprc and placed it in /usr/local/etc (on a FreeBSD 5.0 > > machine) so it > > reads it by default as stated by maildrop's man page. > > > > Below is my maildroprc file: > > > >
[vchkpw] maildrop and vpopmail
Hi, I dont know if this is related with this list but... Today I have noticed that /var/spool/mail/vpopmail file has reached 12MB and modified recently. But qmail does not deliver mail to mbox in my server. All of my accounts are vpopmail accounts. When I look at that file and send some test mails I saw that : * if mail is send to domains which use maildrop * and if that e-mail does not exists a copy of that mail is written to /var/spool/mail/vpopmail. But this problem (or acction) does not occur if a mail is send to domain which use vdelivermail. do you have any experience? thanks for advance... Ertan Yusufoglu