Thread: [maildropl] Help with /etc/maildroprc file
Brought to you by:
mrsam
From: Courier <Co...@li...> - 2005-12-30 01:46:47
|
With the following file, mail gets delivered to: /var/spool/mail/vhosts/domain-name/user-name/Maildir/new As soon as I uncomment the section to deliver to .Spam subdirectory, maildrop coughs up an error.... (yes directory exists) Dec 29 13:47:10 xxxxx postfix/pipe[19059]: 80B955A03D4: to=<use...@do...>, relay=maildrop, delay=0, status=deferred (temporary failure. Command output: /etc/maildroprc(32): Syntax error. ) The only other odd thing I have noticed is the debugging that appears in the maildrop.log file shows: HOME=/var/spool/mail/vhosts/domain-name/user-name/ DEFAULT=/var/spool/mail/vhosts/domain-name/user-name//Maildir (Double "//" in front of Maildir is the oddity) What is it I'm missing ? file follows: ## ## /etc/maildroprc ## ## Global maildrop filter file ## SHELL="/bin/bash" DEFAULT = "$HOME/Maildir" MAILDIR = "$HOME/Maildir" logfile "/var/log/maildrop.log" VERBOSE="4" `echo SHELL=$SHELL >> /var/log/maildrop.log` `echo HOME=$HOME >> /var/log/maildrop.log` `echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` `echo SIZE=$SIZE >> /var/log/maildrop.log` log "==========" if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin" } #if (/^X-Spam-Flag: *YES/) # { # exception { # to "$HOME/$DEFAULT/.Spam" # } #} #else { exception { to "$HOME/$DEFAULT" } } |
From: Sam V. <mr...@co...> - 2005-12-30 02:25:32
|
Courier writes: > With the following file, mail gets delivered to: > > /var/spool/mail/vhosts/domain-name/user-name/Maildir/new > > As soon as I uncomment the section to deliver to .Spam subdirectory, > maildrop coughs up an error.... (yes directory exists) Remove the spurious leading whitespace after the if. > > #if (/^X-Spam-Flag: *YES/) > # { > # exception { > # to "$HOME/$DEFAULT/.Spam" > # } > #} > #else > { > exception { > to "$HOME/$DEFAULT" > } > } > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Courier-maildrop mailing list > Cou...@li... > https://lists.sourceforge.net/lists/listinfo/courier-maildrop |
From: Courier <Co...@li...> - 2005-12-30 04:07:32
|
> > With the following file, mail gets delivered to: -snip- > Remove the spurious leading whitespace after the if. > > #if (/^X-Spam-Flag: *YES/) > > # { > > # exception { > > # to "$HOME/$DEFAULT/.Spam" > > # } > > #} > > #else > > { > > exception { > > to "$HOME/$DEFAULT" > > } > > } Thanks for the reply Sam... I get the same results... that section now reads: if (/^X-Spam-Flag: *YES/) { exception { to "$HOME/$DEFAULT/.Spam" } } else { exception { to "$HOME/$DEFAULT" } } Where is the "spurious leading whitespace" that you are pointing out ?? |
From: Truong T. S. <so...@fc...> - 2005-12-30 04:18:45
|
Now, simplify to test your /etc/maildroprc with only one command: to "/home/vmail/user/Maildir/" Does it work Ok ? Send to us log file. ----- Original Message ----- From: "Courier" <Co...@li...> To: <cou...@li...> Cc: "Sam Varshavchik" <mr...@co...> Sent: Friday, December 30, 2005 11:07 AM Subject: Re: [maildropl] Help with /etc/maildroprc file > > With the following file, mail gets delivered to: -snip- > Remove the spurious leading whitespace after the if. > > #if (/^X-Spam-Flag: *YES/) > > # { > > # exception { > > # to "$HOME/$DEFAULT/.Spam" > > # } > > #} > > #else > > { > > exception { > > to "$HOME/$DEFAULT" > > } > > } Thanks for the reply Sam... I get the same results... that section now reads: if (/^X-Spam-Flag: *YES/) { exception { to "$HOME/$DEFAULT/.Spam" } } else { exception { to "$HOME/$DEFAULT" } } Where is the "spurious leading whitespace" that you are pointing out ?? ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Courier-maildrop mailing list Cou...@li... https://lists.sourceforge.net/lists/listinfo/courier-maildrop |
From: Courier <Co...@li...> - 2005-12-30 04:50:04
|
> Now, simplify to test your /etc/maildroprc with only one command: > > to "/home/vmail/user/Maildir/" > > Does it work Ok ? > > Send to us log file. -snip- > > Remove the spurious leading whitespace after the if. > > > > #if (/^X-Spam-Flag: *YES/) > > > # { > > > # exception { > > > # to "$HOME/$DEFAULT/.Spam" > > > # } > > > #} > > > #else > > > { > > > exception { > > > to "$HOME/$DEFAULT" > > > } > > > } > > Thanks for the reply Sam... > > I get the same results... that section now reads: > > if (/^X-Spam-Flag: *YES/) > { > exception { > to "$HOME/$DEFAULT/.Spam" > } > } > else > { > exception { > to "$HOME/$DEFAULT" > } > } > > Where is the "spurious leading whitespace" that you are pointing > out > ?? Truong - Would you please quit top posting. I do NOT need a 1-line debug...This does NOT work: ## ## /etc/maildroprc ## ## Global maildrop filter file ## SHELL="/bin/bash" DEFAULT = "$HOME/Maildir" MAILDIR = "$HOME/Maildir" logfile "/var/log/maildrop.log" VERBOSE="4" `echo SHELL=$SHELL >> /var/log/maildrop.log` `echo HOME=$HOME >> /var/log/maildrop.log` `echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` `echo MAILDIR=$MAILDIR >> /var/log/maildrop.log` `echo SIZE=$SIZE >> /var/log/maildrop.log` log "==========" if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin" } } if (/^X-Spam-Flag: *YES/) { exception { to "$HOME/$DEFAULT/.Spam" } } else { exception { to "$HOME/$DEFAULT" } } AND...this DOES work ... ## ## /etc/maildroprc ## ## Global maildrop filter file ## SHELL="/bin/bash" DEFAULT = "$HOME/Maildir" MAILDIR = "$HOME/Maildir" logfile "/var/log/maildrop.log" VERBOSE="4" `echo SHELL=$SHELL >> /var/log/maildrop.log` `echo HOME=$HOME >> /var/log/maildrop.log` `echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` `echo MAILDIR=$MAILDIR >> /var/log/maildrop.log` `echo SIZE=$SIZE >> /var/log/maildrop.log` log "==========" if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin" } } #if (/^X-Spam-Flag: *YES/) #{ # exception { # to "$HOME/$DEFAULT/.Spam" # } #} #else { exception { to "$HOME/$DEFAULT" } } This is the log of the failure... Dec 29 20:32:19 xxxxx postfix/pipe[20076]: D7C575A03D2: to=<use...@do...>, relay=maildrop, delay=1, status=deferred (temporary failure. Command output: /etc/maildroprc(32): Syntax error. ) This is the log of it working.... Dec 29 20:35:30 xxxxx postfix/pipe[20105]: 695635A03D7: to=<use...@do...>, relay=maildrop, delay=2, status=sent (domain-name.com) Dec 29 20:35:30 xxxxx postfix/qmgr[20090]: 695635A03D7: removed As Sam said, the problem lies in the "IF statement" but I don't see it. I comment out 7 lines and it "works" albeit not the way I would like it to (I want to "dump" spam directly to the user's .Spam subdirectory), I think that sort of narrows it down... I am subscribed to the list...there is no need to reply separately. |
From: Thorsten H. <lis...@th...> - 2005-12-30 09:28:28
|
Hi, * Sam Varshavchik wrote (2005-12-30 03:25): >Courier writes: >>With the following file, mail gets delivered to: >> >>/var/spool/mail/vhosts/domain-name/user-name/Maildir/new >> >>As soon as I uncomment the section to deliver to .Spam subdirectory, >>maildrop coughs up an error.... (yes directory exists) > >Remove the spurious leading whitespace after the if. I have a lot of these, as they increase reasability, and usually I have no problems. Thorsten --=20 The privacy of correspondence, posts and telecommunications shall be inviol= able. - German Grundgesetz, Article 10, Sec. 1=20 |
From: Courier <Co...@li...> - 2005-12-30 17:08:59
|
> >>With the following file, mail gets delivered to: > >> > >>/var/spool/mail/vhosts/domain-name/user-name/Maildir/new > >> > >>As soon as I uncomment the section to deliver to .Spam > subdirectory, > >>maildrop coughs up an error.... (yes directory exists) > > > >Remove the spurious leading whitespace after the if. > > I have a lot of these, as they increase reasability, and usually I > have no problems. Thorsten - Do you have a working config that you would be willing to share ? I, too, keep staring at examples on the various websites, and fail to see what it is that I am missing. Sam didn't reply to the question of which "leading whitespace", and Truong is asking the wrong questions. I do notice several websites talk about how touchy maildrop syntax is, but that still leaves me out in the cold. Once working, I'd like to start adding things, like specific subdirectories for mailing lists, etc. But, I can't even get a spam test to work. I'm stuck. |
From: Thorsten H. <lis...@th...> - 2005-12-30 17:34:15
|
Hi, please send me every mail only once. * Courier wrote (2005-12-30 18:08): >> >Remove the spurious leading whitespace after the if. >>=20 >> I have a lot of these, as they increase reasability, and usually I >> have no problems. > >Do you have a working config that you would be willing to share ? Of course. I will outline my files (as I use more than one), please ask whatever I leave unclear and please suggest improvements. I start with main.md (linked from ~/.mailfilter), which is basically: - - - Schnipp - - - include "$HOME/.mutt/lists.md" include "$HOME/.mutt/spam.md" to $IN - - - Schnapp - - - Later more on mailing lists, spam.md is as follows: - - - Schnipp - - - if ($SIZE < 256000) { xfilter spamc } if (/^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/) { EXITCODE =3D 99 exit } if (/^X-Spam-Status: YES/) { to $spambox } - - - Schnapp - - - This drops all spam level 10 and above and moves anything from 5 to 10 to $spambox. >I, too, keep staring at examples on the various websites, and fail to >see what it is that I am missing. Sam didn't reply to the question >of which "leading whitespace", (...) My guess is that he meant the white space between if and the parenthesis. But give him more time to answer, it wasn't so long ago. >I do notice several websites talk about how touchy maildrop syntax is Never noticed something like that. Against Procmail, it's syntactic ointment. >Once working, I'd like to start adding things, like specific >subdirectories for mailing lists, etc. I store mailing lists in a simple database created by a Ruby program: - - - Schnipp - - - #! /usr/bin/ruby -w require 'gdbm' GDBM.open("/path/to/your/list.db") { |gdbm| gdbm['cou...@li...'] =3D 'Maildrop' } - - - Schnapp - - - For more lists, just add more lines like the one on Maildrop, then run the program. You need to re-run it if you add new lists. After that, it's a breeze thanks to Maildrop GDBM support: - - - Schnipp - - - gdbmopen("/path/to/your/list.db") foreach /^(To|Cc): .*/ { foreach (getaddr($MATCH)) =3D~ /.+/ { listbox =3D gdbmfetch(tolower($MATCH)) if ($listbox ne "") { to $MAILDIR/ML/$listbox } } } gdbmclose - - - Schnapp - - - I left a few details out, but that should basically work for you. Thorsten --=20 A witty saying proves nothing. - Voltair |
From: Courier <Co...@li...> - 2005-12-30 22:35:38
|
> > >>With the following file, mail gets delivered to: > > >> > > >>/var/spool/mail/vhosts/domain-name/user-name/Maildir/new > > >> > > >>As soon as I uncomment the section to deliver to .Spam > > subdirectory, > > >>maildrop coughs up an error.... (yes directory exists) > > > > > >Remove the spurious leading whitespace after the if. > > > > I have a lot of these, as they increase reasability, and usually I > > have no problems. > > Thorsten - > > Do you have a working config that you would be willing to share ? > I, > too, keep staring at examples on the various websites, and fail to > see > what it is that I am missing. Sam didn't reply to the question of > which "leading whitespace", and Truong is asking the wrong > questions. > > I do notice several websites talk about how touchy maildrop syntax > is, > but that still leaves me out in the cold. Once working, I'd like to > start adding things, like specific subdirectories for mailing lists, > etc. But, I can't even get a spam test to work. I'm stuck. ====================================== The "if" statement itself is suspect... The following "works" to deliver mail to: /var/spool/mail/vhosts/domain-name/user-name/Maildir/new and the intent was to go to ..../Maildir/.Spam/ if ( /^X-Spam-Status: *Yes/ ) { exception { to "$DEFAULT/.Spam" } } #else { exception { # to "$DEFAULT" to "$DEFAULT/.Spam" } } ..so the "top" part of maildroprc does what it supposed to do, but the if-else combo is not doing what I expected (nor is "to" for that matter). I've tried with "Status" at "No" as well as "*No" with the same results... Throwing away the entire file and using a direct "to /blah/blah/" syntax does not work (dot-lock error) and using: exception { to "/blah/blah" } always puts in into the user's Maildir/new directory, even if .Spam is specified...so exception does NOT seem to care... FWIW I can not find any file named .mailfilter on my system for ANY user. Sam's write up indicates xfilter needs this file. Did I miss an installation step ? |
From: Todd L. <tl...@iv...> - 2005-12-30 22:56:08
|
On Fri, Dec 30, 2005 at 02:35:37PM -0800, Courier wrote: >/var/spool/mail/vhosts/domain-name/user-name/Maildir/new >and the intent was to go to ..../Maildir/.Spam/ Just a hunch. Show us the result of: vdir -d /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam Seems like your subdirectories are not in maildir format. The above will disprove that supposition on my part. -- Regards... Todd Well, it's Karch... --frequently heard after every amazing move he does Linux kernel 2.6.12-12mdksmp 4 users, load average: 2.16, 2.20, 2.10 |
From: Courier <Co...@li...> - 2005-12-30 23:39:00
|
> >/var/spool/mail/vhosts/domain-name/user-name/Maildir/new > >and the intent was to go to ..../Maildir/.Spam/ > > Just a hunch. Show us the result of: > > vdir -d /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > > Seems like your subdirectories are not in maildir format. The above > will disprove that supposition on my part. > > Regards... Todd ============================================================ Here it is: #vdir -d /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam drwxr-xr-x 2 vmail vgroup 4096 Dec 29 13:39 /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam (above "wrapped" on me) #vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam total 0 # But question - Why would they even go to: /var/spool/mail/vhosts/domain-name/user-name/Maildir/new if they were not in maildir format? |
From: Todd L. <tl...@iv...> - 2006-01-02 21:21:51
|
On Fri, Dec 30, 2005 at 03:38:59PM -0800, Courier wrote: >#vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam >total 0 ># >But question - Why would they even go to: >/var/spool/mail/vhosts/domain-name/user-name/Maildir/new >if they were not in maildir format? new/ tmp/ and cur/ are the maildir format. If those directories are not there, then your MDA doesn't want to automatically make them. I think you'll find that things will start working once you run these three commands: rmdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam maildirmake /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam chown -R vmail:vgroup /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam The chown is superfluous if you are running the commands as user vmail. On our particular webmail system, the webmail creates and subscribes to the Spam folder when the user first signs in. It sounds like your provisioning system needs to do something similar. -- Regards... Todd Well, it's Karch... --frequently heard after every amazing move he does Linux kernel 2.6.12-12mdksmp 6 users, load average: 0.00, 0.01, 0.00 |
From: Courier <Co...@li...> - 2006-01-03 22:40:37
|
> >#vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > >total 0 > ># > >But question - Why would they even go to: > >/var/spool/mail/vhosts/domain-name/user-name/Maildir/new > >if they were not in maildir format? > > new/ tmp/ and cur/ are the maildir format. If those directories are > not > there, then your MDA doesn't want to automatically make them. I > think > you'll find that things will start working once you run these three > commands: > > rmdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > maildirmake > /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > chown -R vmail:vgroup > /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > > The chown is superfluous if you are running the commands as user > vmail. On our particular webmail system, the webmail creates and > subscribes to the Spam folder when the user first signs in. It > sounds like your provisioning system needs to do something similar. > -- > Regards... Todd ==================================== Thanks, Todd, I missed your reply yesterday - Same Results: (temporary failure. Command output: /etc/maildroprc(32): Syntax error. ) Those two commands now show: # vdir -d /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam drwx------ 5 vmail vgroup 4096 Jan 3 14:18 /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam # # vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam total 12 drwx------ 2 vmail vgroup 4096 Jan 3 14:18 cur drwx------ 2 vmail vgroup 4096 Jan 3 14:18 new drwx------ 2 vmail vgroup 4096 Jan 3 14:18 tmp # What would my "provisioning system" be ? I'm not familiar with a specific (sub)system I have that would be called as such... Also - I have NO .mailfilter file anywhere I can find, but I am using amavisd-new with spamassassin, so it wasn't obvious (to me) if I needed that file or not, and what it would look like. |
From: Devin R. <de...@th...> - 2006-01-04 15:03:58
|
On Mon, Jan 02, 2006 at 01:21:32PM -0800, Todd Lyons wrote: > On Fri, Dec 30, 2005 at 03:38:59PM -0800, Courier wrote: > > >#vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > >total 0 > ># > >But question - Why would they even go to: > >/var/spool/mail/vhosts/domain-name/user-name/Maildir/new > >if they were not in maildir format? > > new/ tmp/ and cur/ are the maildir format. If those directories are not > there, then your MDA doesn't want to automatically make them. I think > you'll find that things will start working once you run these three > commands: > > rmdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > maildirmake /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam Should be: maildirmake -f Spam /var/spool/mail/vhosts/domain-name/user-name/Maildir -- Devin |
From: Todd L. <tl...@iv...> - 2006-01-04 16:07:23
|
On Wed, Jan 04, 2006 at 11:33:31AM -0330, Devin Rubia wrote: >> maildirmake /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam >Should be: >maildirmake -f Spam /var/spool/mail/vhosts/domain-name/user-name/Maildir Oops, I had never read that section before and since our webmail system automatically creates the folders (meaning my provisioning system doesn't need to create it, so I hadn't come across the need for that option). -- Regards... Todd I've visited conferences where the wireless LAN was deemed "secure" by the organisation because they had outlawed sniffers. --Neils Bakker Linux kernel 2.6.12-12mdksmp 4 users, load average: 0.12, 0.29, 0.29 |
From: Courier <Co...@li...> - 2006-01-04 21:56:43
|
> > >#vdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > > >total 0 > > ># > > >But question - Why would they even go to: > > >/var/spool/mail/vhosts/domain-name/user-name/Maildir/new > > >if they were not in maildir format? > > > > new/ tmp/ and cur/ are the maildir format. If those directories > are not > > there, then your MDA doesn't want to automatically make them. I > think > > you'll find that things will start working once you run these > three > > commands: > > > > rmdir /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > > maildirmake > /var/spool/mail/vhosts/domain-name/user-name/Maildir/.Spam > > Should be: > > maildirmake -f Spam > /var/spool/mail/vhosts/domain-name/user-name/Maildir > > -- > Devin =========================================== Thanks Devin & Todd... Still the same symptoms: Jan 4 13:36:11 xxxxx postfix/pipe[1053]: E92305A03F8: to=<use...@do...>, relay=maildrop, delay=1, status=deferred (temporary failure. Command output: /etc/maildroprc(32): Syntax error. ) And the results of the two "vdir" commands... # vdir -d .Spam/ drwx------ 5 vmail vgroup 4096 Jan 4 13:34 .Spam/ # # vdir .Spam/ total 12 drwx------ 2 vmail vgroup 4096 Jan 4 13:34 cur -rw------- 1 vmail vgroup 0 Jan 4 13:34 maildirfolder drwx------ 2 vmail vgroup 4096 Jan 4 13:34 new drwx------ 2 vmail vgroup 4096 Jan 4 13:34 tmp # And, once again the /etc/maildroprc ## ## /etc/maildroprc ## ## Global maildrop filter file ## SHELL="/bin/bash" DEFAULT = "$HOME/Maildir" logfile "/var/log/maildrop.log" VERBOSE="8" log "===== Start =====" `echo SHELL=$SHELL >> /var/log/maildrop.log` `echo HOME=$HOME >> /var/log/maildrop.log` `echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` `echo MAILDIRQUOTA=$MAILDIRQUOTA >> /var/log/maildrop.log` `echo LOGNAME=$LOGNAME >> /var/log/maildrop.log` `echo SIZE=$SIZE >> /var/log/maildrop.log` if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin" } } if ( /^X-Spam-Status: *Yes/ ) { exception { to "$HOME/$DEFAULT/.Spam" } } else { exception { to "$HOME/$DEFAULT" } } If I comment out the "else" above - Mail (spam or otherwise) gets delivered to: /var/spool/mail/vhosts/domain-name/user-name/Maildir/new Should I just delete the directory structures and try again ?? From my last post: Also - I have NO .mailfilter file anywhere I can find, but I am using amavisd-new with spamassassin, so it wasn't obvious (to me) if I needed that file or not, and what it would look like. |
From: Todd L. <tl...@iv...> - 2006-01-04 22:54:24
|
On Wed, Jan 04, 2006 at 01:56:38PM -0800, Courier wrote: >Still the same symptoms: >Jan 4 13:36:11 xxxxx postfix/pipe[1053]: E92305A03F8: >to=<use...@do...>, relay=maildrop, delay=1, >status=deferred (temporary failure. Command output: >/etc/maildroprc(32): Syntax error. ) Ok, this is saying that it has nothing to do with the structure of the maildir. It's complaining about the /etc/maildroprc. It says something in there is invalid. >log "===== Start =====" >`echo SHELL=$SHELL >> /var/log/maildrop.log` >`echo HOME=$HOME >> /var/log/maildrop.log` >`echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` >`echo MAILDIRQUOTA=$MAILDIRQUOTA >> /var/log/maildrop.log` >`echo LOGNAME=$LOGNAME >> /var/log/maildrop.log` >`echo SIZE=$SIZE >> /var/log/maildrop.log` Can you show us the results in the maildrop.log of one of these messages as it is attempted to be delivered to the Spam folder? Mainly I'm interested in seeing what the HOME and DEFAULT settings are... > to "$HOME/$DEFAULT/.Spam" in order to see where the above is trying to be delivered. -- Regards... Todd They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. --Benjamin Franklin Linux kernel 2.6.12-12mdksmp 4 users, load average: 2.89, 2.08, 1.78 |
From: Courier <Co...@li...> - 2006-01-05 02:28:58
|
> >Still the same symptoms: > >Jan 4 13:36:11 xxxxx postfix/pipe[1053]: E92305A03F8: > >to=<use...@do...>, relay=maildrop, delay=1, > >status=deferred (temporary failure. Command output: > >/etc/maildroprc(32): Syntax error. ) > > Ok, this is saying that it has nothing to do with the structure of > the maildir. It's complaining about the /etc/maildroprc. It says > something in there is invalid. I agree...but what? Sort of back to Sam's original response about the "spurious leading whitespace" But, there are examples all over the Internet that (supposedly) work...And, I have meticulously stayed in "vi" and not touched this file with any windoze box. > >log "===== Start =====" > >`echo SHELL=$SHELL >> /var/log/maildrop.log` > >`echo HOME=$HOME >> /var/log/maildrop.log` > >`echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` > >`echo MAILDIRQUOTA=$MAILDIRQUOTA >> /var/log/maildrop.log` > >`echo LOGNAME=$LOGNAME >> /var/log/maildrop.log` > >`echo SIZE=$SIZE >> /var/log/maildrop.log` > > Can you show us the results in the maildrop.log of one of these > messages > as it is attempted to be delivered to the Spam folder? Mainly I'm > interested in seeing what the HOME and DEFAULT settings are... > > > to "$HOME/$DEFAULT/.Spam" > > in order to see where the above is trying to be delivered. Here's the last entry from /var/log/maildrop.log (When I uncomment the "else" NO entry is created - I was hoping to see the same thing for a non-working entry, that's why all the echo's...but it doesn't even log once I get the error) ===== Start ===== SHELL=/bin/bash HOME=/var/spool/mail/vhosts/domain-name.com/user-name DEFAULT=/var/spool/mail/vhosts/domain-name.com/user-name/Maildir MAILDIRQUOTA= LOGNAME=use...@do... SIZE=1645 Date: Wed Jan 4 13:52:37 2006 From: Other <ot...@ot...> Subj: Test File: /var/spool/mail/vhosts/domain-name.com/user-name/Maildir (1829) So obviously the syntax error stops the logging... One of my attempts to modify /etc/maildroprc yielded the same error with maildroprc(31), but I don't even recall which "version" caused it... |
From: Devin R. <de...@th...> - 2006-01-05 14:11:50
|
On Wed, Jan 04, 2006 at 06:28:53PM -0800, Courier wrote: > > >Still the same symptoms: > > >Jan 4 13:36:11 xxxxx postfix/pipe[1053]: E92305A03F8: > > >to=<use...@do...>, relay=maildrop, delay=1, > > >status=deferred (temporary failure. Command output: > > >/etc/maildroprc(32): Syntax error. ) > > > > Ok, this is saying that it has nothing to do with the structure of > > the maildir. It's complaining about the /etc/maildroprc. It says > > something in there is invalid. > > I agree...but what? Sort of back to Sam's original response about the > "spurious leading whitespace" But, there are examples all over the > Internet that (supposedly) work...And, I have meticulously stayed in > "vi" and not touched this file with any windoze box. > > > >log "===== Start =====" > > >`echo SHELL=$SHELL >> /var/log/maildrop.log` > > >`echo HOME=$HOME >> /var/log/maildrop.log` > > >`echo DEFAULT=$DEFAULT >> /var/log/maildrop.log` > > >`echo MAILDIRQUOTA=$MAILDIRQUOTA >> /var/log/maildrop.log` > > >`echo LOGNAME=$LOGNAME >> /var/log/maildrop.log` > > >`echo SIZE=$SIZE >> /var/log/maildrop.log` > > > > Can you show us the results in the maildrop.log of one of these > > messages > > as it is attempted to be delivered to the Spam folder? Mainly I'm > > interested in seeing what the HOME and DEFAULT settings are... > > > > > to "$HOME/$DEFAULT/.Spam" > > > > in order to see where the above is trying to be delivered. > > ===== Start ===== > HOME=/var/spool/mail/vhosts/domain-name.com/user-name > DEFAULT=/var/spool/mail/vhosts/domain-name.com/user-name/Maildir There's the error. -> to "$HOME/$DEFAULT/.Spam" == -> to /var/spool/mail/vhosts/domain-name.com/user-name//var/spool/mail/vhosts/domain-name.com/user-name/Maildir Try just: to "$DEFAULT/.Spam" -- Devin |
From: Courier <Co...@li...> - 2006-01-05 19:28:16
|
> Still the same symptoms: > > Jan 4 13:36:11 xxxxx postfix/pipe[1053]: E92305A03F8: > to=<use...@do...>, relay=maildrop, delay=1, > status=deferred (temporary failure. Command output: > /etc/maildroprc(32): Syntax error. ) - snip - > > ===== Start ===== > > HOME=/var/spool/mail/vhosts/domain-name.com/user-name > > DEFAULT=/var/spool/mail/vhosts/domain-name.com/user-name/Maildir > > There's the error. > > -> to "$HOME/$DEFAULT/.Spam" > > == > > -> to > /var/spool/mail/vhosts/domain-name.com/user-name//var/spool/mail/vhosts/domain-name.com/user-name/Maildir > > Try just: > > to "$DEFAULT/.Spam" > =========================== Good catch, Devin ! I experimented with the end of maildroprc and I can now deliver to blah.blah/Maildir/new OR (which is new) blah.blah/Maildir/.Spam/new BUT...as soon as I uncomment the "else" I get the syntax error... Also - the first exception after the if is always taken, i.e. as it reads right now (below) it delivers my non-spam to "$DEFAULT" which is the "if" for spam ?? spamassassin scored 0.0 with a subject and body of 'Test 3 (Reverse)' if ( /^X-Spam-Status: *Yes/ ) { exception { # to "$DEFAULT/.Spam" to "$DEFAULT" } } #else { exception { # to "$DEFAULT" to "$DEFAULT/.Spam" } } I'm not getting this...it's like I can't spell 'else' I keep staring at it, and I've been known to type 'esle' but this isn't the case... |
From: Devin R. <de...@th...> - 2006-01-05 19:46:57
|
On Thu, Jan 05, 2006 at 11:28:12AM -0800, Courier wrote: > Good catch, Devin ! > I experimented with the end of maildroprc and I can now deliver to > blah.blah/Maildir/new OR (which is new) blah.blah/Maildir/.Spam/new > > BUT...as soon as I uncomment the "else" I get the syntax error... > > Also - the first exception after the if is always taken, i.e. as it > reads right now (below) it delivers my non-spam to "$DEFAULT" which is > the "if" for spam ?? > > spamassassin scored 0.0 with a subject and body of 'Test 3 (Reverse)' > > if ( /^X-Spam-Status: *Yes/ ) > { > exception { > # to "$DEFAULT/.Spam" > to "$DEFAULT" > } > } > #else > { > exception { > # to "$DEFAULT" > to "$DEFAULT/.Spam" > } > } > > I'm not getting this...it's like I can't spell 'else' I keep staring > at it, and I've been known to type 'esle' but this isn't the case... $ man maildropfilter (/IF)[SNIP] Note: The grammar of this if statement is stricter than usual. If you get baffling syntax errors from mail- drop, make sure that the braces, and the if statement, appear on separate lines. Specifically: the closing parenthesis, the closing braces, and the else state- ment, must be at the end of the line (comments are allowed), and there may not be any blank lines in between (not even ones containing comments only). [SNIP] Try deleting the lines that are commented out. -- Devin |
From: Courier <Co...@li...> - 2006-01-05 21:01:11
|
> > Good catch, Devin ! > > I experimented with the end of maildroprc and I can now deliver to > > blah.blah/Maildir/new OR (which is new) > blah.blah/Maildir/.Spam/new > > > > BUT...as soon as I uncomment the "else" I get the syntax error... > > > > Also - the first exception after the if is always taken, i.e. as > it > > reads right now (below) it delivers my non-spam to "$DEFAULT" which > is > > the "if" for spam ?? > > > > spamassassin scored 0.0 with a subject and body of 'Test 3 > (Reverse)' > > > > if ( /^X-Spam-Status: *Yes/ ) > > { > > exception { > > # to "$DEFAULT/.Spam" > > to "$DEFAULT" > > } > > } > > #else > > { > > exception { > > # to "$DEFAULT" > > to "$DEFAULT/.Spam" > > } > > } > > > > I'm not getting this...it's like I can't spell 'else' I keep > staring > > at it, and I've been known to type 'esle' but this isn't the > case... > > $ man maildropfilter > (/IF)[SNIP] > Note: The grammar of this if statement is stricter than > usual. If you get baffling syntax errors from mail- > drop, make sure that the braces, and the if statement, > appear on separate lines. Specifically: the closing > parenthesis, the closing braces, and the else state- > ment, must be at the end of the line (comments are > allowed), and there may not be any blank lines in > between (not even ones containing comments only). > [SNIP] > > Try deleting the lines that are commented out. ============================== Thanks Devin - This is how it looks now: if ( /^X-Spam-Status: *Yes/ ) { exception { to "$DEFAULT/.Spam" } } else { exception { to "$DEFAULT" } } And I get the same "32" syntax error - comment out the "else" and it gets delivered to the blah.blah/.Spam/new folder... From the maildrop.log: ===== Start ===== SHELL=/bin/bash HOME=/var/spool/mail/vhosts/domain-name.com/user-name DEFAULT=/var/spool/mail/vhosts/domain-name.com/user-name/Maildir MAILDIRQUOTA= LOGNAME=use...@do... SIZE=1649 Date: Thu Jan 5 12:45:26 2006 From: Other <ot...@ot...> Subj: Test 5 File: /var/spool/mail/vhosts/domain-name.com/user-name/Maildir/.Spam (1833) And "Test 6" logged nothing - just gave the "32" syntax error again. |
From: Todd L. <tl...@iv...> - 2006-01-05 21:20:20
|
On Thu, Jan 05, 2006 at 01:01:01PM -0800, Courier wrote: >if ( /^X-Spam-Status: *Yes/ ) >{ > exception { > to "$DEFAULT/.Spam" > } >} >else >{ > exception { > to "$DEFAULT" > } I don't know everything there is to know about this, but what's your reasoning for wrapping your default delivery with an exception? Remove that exception and test it again. But I don't honestly expect that to fix it. >} > >And I get the same "32" syntax error - comment out the "else" and it >gets delivered to the blah.blah/.Spam/new folder... Sam's original suggestion was to check for extraneous whitespaces. Look for trailing whitespaces after the { and } symbols. -- Regards... Todd when you shoot yourself in the foot, just because you are so neurally broken that the signal takes years to register in your brain, it does not mean that your foot does not have a hole in it. --Randy Bush Linux kernel 2.6.12-12mdksmp 4 users, load average: 2.09, 1.89, 1.67 |
From: Devin R. <de...@th...> - 2006-01-05 21:21:17
|
On Thu, Jan 05, 2006 at 01:01:01PM -0800, Courier wrote: > Thanks Devin - > > This is how it looks now: > > if ( /^X-Spam-Status: *Yes/ ) > { > exception { > to "$DEFAULT/.Spam" > } > } > else > { > exception { > to "$DEFAULT" > } > } > > > And I get the same "32" syntax error - comment out the "else" and it > gets delivered to the blah.blah/.Spam/new folder... > > >From the maildrop.log: > > ===== Start ===== > SHELL=/bin/bash > HOME=/var/spool/mail/vhosts/domain-name.com/user-name > DEFAULT=/var/spool/mail/vhosts/domain-name.com/user-name/Maildir > MAILDIRQUOTA= > LOGNAME=use...@do... > SIZE=1649 > Date: Thu Jan 5 12:45:26 2006 > From: Other <ot...@ot...> > Subj: Test 5 > File: /var/spool/mail/vhosts/domain-name.com/user-name/Maildir/.Spam > (1833) > > And "Test 6" logged nothing - just gave the "32" syntax error again. OK. If that's all you have in your mailfilter (after the SA checks, etc) then this is all that I would have: ---------------- if ( /^X-Spam-Status: *Yes/ ) { to "$DEFAULT/.Spam" } to "$DEFAULT" ---------------- I don't like using exceptions unless I have a really good reason to do so and you don't really need the 'else' as the filtering will continue regardless if the first 'to' is not executed. You could even drop the final 'to "$DEFAULT"' as it is implied in maildrop. -- Devin |
From: Courier <Co...@li...> - 2006-01-05 23:06:29
|
> > This is how it looks now: > > > > if ( /^X-Spam-Status: *Yes/ ) > > { > > exception { > > to "$DEFAULT/.Spam" > > } > > } > > else > > { > > exception { > > to "$DEFAULT" > > } > > } > > > > > > And I get the same "32" syntax error - comment out the "else" and > it > > gets delivered to the blah.blah/.Spam/new folder... > > > > >From the maildrop.log: > > > > ===== Start ===== > > SHELL=/bin/bash > > HOME=/var/spool/mail/vhosts/domain-name.com/user-name > > DEFAULT=/var/spool/mail/vhosts/domain-name.com/user-name/Maildir > > MAILDIRQUOTA= > > LOGNAME=use...@do... > > SIZE=1649 > > Date: Thu Jan 5 12:45:26 2006 > > From: Other <ot...@ot...> > > Subj: Test 5 > > File: > /var/spool/mail/vhosts/domain-name.com/user-name/Maildir/.Spam > > (1833) > > > > And "Test 6" logged nothing - just gave the "32" syntax error > again. > > OK. If that's all you have in your mailfilter (after the SA checks, > etc) then this is all that I would have: > > ---------------- > if ( /^X-Spam-Status: *Yes/ ) > { > to "$DEFAULT/.Spam" > } > > to "$DEFAULT" > ---------------- > > I don't like using exceptions unless I have a really good reason to > do > so and you don't really need the 'else' as the filtering will > continue > regardless if the first 'to' is not executed. > > You could even drop the final 'to "$DEFAULT"' as it is implied in > maildrop. I implemented your suggestion and tried if ( /^X-Spam-Status: *Yes/ ) if ( /^X-Spam-Flag: *Yes/ ) if ( /^X-Spam-Status: *No/ ) if ( /^X-Spam-Flag: *No/ ) The line from the actual e-mail reads: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.4 and it always takes the first (.Spam/new) path regardless of the test... |