Part 2 of 2, continuing where I reached in the Part 1. I would like to post my current maildrop configuration that consists of the main .mailfilter with includes. So even if it doesn't, strictly speaking, belong here, I'll post it here, else I won't post it at all.
-----%<---------------------------------------------------------------------- # ~/.mailfilter # based on: # http://www.wonkity.com/~wblock/docs/html/maildrop.html # and heavily reworked TYPE="maildir" logfile "$HOME/.mailfilter.log" ECHO="/bin/echo" MAIL="/usr/bin/mail" MAILDIRMAKE="/usr/bin/maildirmake" REFORMAIL="/usr/bin/reformail" MBOX=($TYPE =~ /mbox/) MAILDIR=($TYPE =~ /maildir/) # use mbox by default DEFAULT="$HOME/mail" FOLDERS="$DEFAULT/" if ( $MAILDIR ) { DEFAULT="$HOME/Maildir" FOLDERS="$DEFAULT/." if ( $DEFAULT ) { `${MAILDIRMAKE} "$DEFAULT"` if ( $RETURNCODE == 0 ) { # notify the user when new folders are created NEWFOLDERMSG="${FOLDERS} folder created" `${ECHO} "$NEWFOLDERMSG" | ${MAIL} -s "$NEWFOLDERMSG" $LOGNAME` } } } # filter out duplicate messages `${REFORMAIL} -D 8192 $HOME/.duplicate.cache` if ( $RETURNCODE == 0 ) { log "File: (duplicate) ($SIZE)\n" exit } if ( /^(To|Cc|Envelope-To|Delivered-To):.*(miro\.rovis@croatiafidelis\.hr)/ ) { MYFOLDERDOT="$MATCH2" MYFOLDER=`echo $MYFOLDERDOT|sed 's/\.//g'` F2MKlevel1="$MYFOLDER" include .maildirmake.incL1 # handle mailing list messages automatically if ( /^List-Id:.*<([0-9A-Za-z_\.\-]+)/ ) { LISTNAMEDOT="$MATCH1" LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'` F2MKlevel2="$LISTNAME" include .maildirmake.incL2 to ${FOLDERS}$MYFOLDER.$F2MKlevel2 } if ( /^(To|Cc):.*postfix-users@postfix\.org/ ) { LISTNAMEDOT="postfix-us...@postfix.org" LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'` F2MKlevel2="$LISTNAME" include .maildirmake.incL2 to ${FOLDERS}$MYFOLDER.$F2MKlevel2 } if ( /^(To|From):.*support@plus\.hr/ ) { LISTNAMEDOT="supp...@plus.hr" LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'` F2MKlevel2="$LISTNAME" include .maildirmake.incL2 to ${FOLDERS}$MYFOLDER.$F2MKlevel2 } if ( /^(To|From):.*@mutt.org/ ) { LISTNAMEDOT="@mutt.org" LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'` F2MKlevel2="$LISTNAME" include .maildirmake.incL2 to ${FOLDERS}$MYFOLDER.$F2MKlevel2 } to ${FOLDERS}$F2MKlevel1 } if ( /^(To|Cc|Envelope-To|Delivered-To):.*(m.rovis@inet\.hr)/ ) { MYFOLDERDOT="$MATCH2" MYFOLDER=`echo $MYFOLDERDOT|sed 's/\.//g'` F2MKlevel1="$MYFOLDER" include .maildirmake.incL1 if (/^Return-Path:.*@(facebookmail\.com)/) { MY2FOLDERDOT="$MATCH1" MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'` F2MKlevel2="$MY2FOLDER" include .maildirmake.incL2 # handle Facebook groups/lists messages automatically if ( /^List-Id:.*<([0-9A-Za-z_\-]+)\.+/ ) { LIST2NAME="$MATCH1" F2MKlevel3="$LIST2NAME" include .maildirmake.incL3 to ${FOLDERS}${MYFOLDER}.${MY2FOLDER}.$F2MKlevel3 } to ${FOLDERS}${MYFOLDER}.$F2MKlevel2 } if ( /^(To|From):.*(childrenofmedugorje@gmail\.com)/ ) { MY2FOLDERDOT="$MATCH2" MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'` F2MKlevel2="$MY2FOLDER" include .maildirmake.incL2 to ${FOLDERS}${MYFOLDER}.$F2MKlevel2 } if ( /^(To|From):.*(djeca.medjugo...@gmail.com)/ ) { MY2FOLDERDOT="$MATCH2" MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'` F2MKlevel2="$MY2FOLDER" include .maildirmake.incL2 to ${FOLDERS}${MYFOLDER}.$F2MKlevel2 } if ( /^(To|From):.*(una...@cometacom.it)/ ) { MY2FOLDERDOT="$MATCH2" MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'` F2MKlevel2="$MY2FOLDER" include .maildirmake.incL2 to ${FOLDERS}${MYFOLDER}.$F2MKlevel2 } if ( /^From:\s*EWTN\s*<(wi...@ewtn.com)>/ ) { MY2FOLDERDOT="$MATCH1" MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'` F2MKlevel2="$MY2FOLDER" include .maildirmake.incL2 to ${FOLDERS}${MYFOLDER}.$F2MKlevel2 } # handle mailing list messages automatically if ( /^List-Id:.*<([0-9A-Za-z_\.\-]+)/ ) { LISTNAMEDOT="$MATCH1" LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'` F2MKlevel2="$LISTNAME" include .maildirmake.incL2 to ${FOLDERS}${MYFOLDER}.$F2MKlevel2 } to ${FOLDERS}$F2MKlevel1 } -----%<---------------------------------------------------------------------- The include file .maildirmake.incL1 (in the same directory): -----%<---------------------------------------------------------------------- if ( $MAILDIR ) { DEFAULT="$HOME/Maildir" FOLDERS="$DEFAULT/." if ( $F2MKlevel1 ) { `${MAILDIRMAKE} -f "$F2MKlevel1" "$DEFAULT"` if ( $RETURNCODE == 0 ) { # notify the user when new folders are created NEWFOLDERMSG="${FOLDERS}$F2MKlevel1 list folder created" `${ECHO} "$NEWFOLDERMSG" | ${MAIL} -s "$NEWFOLDERMSG" $LOGNAME` } } } } -----%<---------------------------------------------------------------------- The include file .maildirmake.incL2 (in the same directory): -----%<---------------------------------------------------------------------- if ( $MAILDIR ) { DEFAULT="$HOME/Maildir" FOLDERS="$DEFAULT/." if ( F2MKlevel2 ) { `${MAILDIRMAKE} -f "${MYFOLDER}.${F2MKlevel2}" "$DEFAULT"` if ( $RETURNCODE == 0 ) { # notify the user when new folders are created NEWFOLDERMSG="${FOLDERS}${MYFOLDER}.${F2MKlevel2} list folder created" `${ECHO} "$NEWFOLDERMSG" | ${MAIL} -s "$NEWFOLDERMSG" $LOGNAME` } } } } -----%<---------------------------------------------------------------------- The include file .maildirmake.incL3 (in the same directory): -----%<---------------------------------------------------------------------- if ( $MAILDIR ) { DEFAULT="$HOME/Maildir" FOLDERS="$DEFAULT/." if ( $F2MKlevel3 ) { `${MAILDIRMAKE} -f "${MYFOLDER}.$MY2FOLDER.$F2MKlevel3" "$DEFAULT"` if ( $RETURNCODE == 0 ) { # notify the user when new folders are created NEWFOLDERMSG="${FOLDERS}${MYFOLDER}.$MY2FOLDER.$F2MKlevel3 list folder created" `${ECHO} "$NEWFOLDERMSG" | ${MAIL} -s "$NEWFOLDERMSG" $LOGNAME` } } } } -----%<---------------------------------------------------------------------- Why I named those variables MYFOLDER, MY2FOLDER, F2MKlevel1, F2MKlevel2, F2MKlevel3? MYFOLDER is just underneath Maildir. MY2FOLDER is one more level underneath, and F2MK is for Folder to (2 means 'to' here) MaKe. Aweful lot of benign errors thown out as maildrop churns the mails given it by getmail... I tried, wrapping the maildirmakes in conditional clause like this: if ( ! `${DEFAULT}.${MYFOLDER}.$MY2FOLDER.$F2MKlevel3` ) { ... } but it didn't help. There is lots of output of "File exists" and "No such file or directory" errors... But its' benign errors. I don't know if I missed something. Oh yes I did, but can I expand the issue now here? I'm tired, but if I don't do it now, it'll be even harder later... So... It's the issues with namespace/imaps, the interaction of Mutt and Dovecot. I already posted my dovecot configuration, it is still as there. It might be: http://www.dovecot.org/list/dovecot/2013-October/092810.html or around there (remember that I'm, as usual, and for the reasons explained already, preparing this text offline). This is the only way how I can get into, say: ~me/Maildir/.mirorovis@croatiafidelishr/cur/ I mean there is just no way to get it other than via file browsing, there is no way to find it, to open it and view it browsing the Dovecot server provided imaps://me@myboxA/this/or/that ... If I start here, which I already posted on the Dovecot mailing list (the link above): y:Exit c:Chdir m:Mask ?:Help 1 IMAP + INBOX/ 2 IMAP + mirorovis@croatiafidelishr/ 3 IMAP + mirovis@inethr/ 4 IMAP + mrovis@inethr/ /\ /\ /\ /\ /\ /\ /\ / / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \/ \/ \/ \/ \/ \/ \/ -- Mutt: Directory [imaps://me@mybox2/], File mask: !^\.[^.] and if I simply hit enter on line: 2 IMAP + mirorovis@croatiafidelishr/ what opens is: y:Exit c:Chdir m:Mask ?:Help 1 IMAP ../ 2 IMAP dovecotdovecotorg 3 IMAP @muttorg 4 IMAP postfix-users@postfixorg 5 IMAP support@plushr /\ /\ /\ /\ /\ /\ /\ / / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \/ \/ \/ \/ \/ \/ \/ -- Mutt: Directory [=mirorovis@croatiafidelishr/], File mask: !^\.[^.] but there is no way in the imaps:// browser to view the main folder =mirorovis@croatiafidelishr/, I can only vew just those subfolders... So I have to type c, then ?, and wipe with backspace firmly pressed for a while the entire: Chdir to: imaps://me@myboxX/mirorovis@croatiafidelishr/ that has opened all the way to the (and including) the initial i of imaps, and type instead: Chdir to: /home/mr/Maildir/.mirorovis@croatiafidelishr/ (helped myself in completing these with tabs, sure), then Enter, and I have: y:Exit c:Chdir m:Mask ?:Help 1 drwx------ 68 mr mr 4.0K Oct 14 12:03 ../ 2 drwx------ 2 mr mr 4.0K Oct 14 11:58 cur/ 3 -rw------- 1 mr mr 0K Oct 14 11:58 maildirfolder 4 drwx------ 2 mr mr 4.0K Oct 14 11:58 new/ 5 drwx------ 2 mr mr 4.0K Oct 14 11:58 tmp/ /\ /\ /\ /\ /\ /\ /\ / / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \/ \/ \/ \/ \/ \/ \/ -- Mutt: Directory [~/Maildir/.mirorovis@croatiafidelishr], File mask: !^\.[^.] and here I type Enter on cur/ and what opens is: y:Exit c:Chdir m:Mask ?:Help 1 drwx------ 5 mr mr 4.0K Oct 14 11:58 ../ 2 -rw------- 1 mr mail 2.9K Oct 14 11:58 1381751901.M518312P18283V0000 3 -rw------- 1 mr mail 2.8K Oct 14 11:58 1381751901.M690682P18295V0000 4 -rw------- 1 mr mail 3.3K Oct 14 11:58 1381751901.M878512P18303V0000 5 -rw------- 1 mr mail 4.9K Oct 14 11:58 1381751902.M229985P18319V0000 6 -rw------- 1 mr mail 3.4K Oct 14 11:58 1381751902.M401754P18327V0000 7 -rw------- 1 mr mail 3.3K Oct 14 11:58 1381751902.M52304P18311V00000 8 -rw------- 1 mr mail 3.1K Oct 14 11:58 1381751902.M577522P18335V0000 9 -rw------- 1 mr mail 2.4K Oct 14 11:58 1381751902.M750080P18343V0000 10 -rw------- 1 mr mail 3.3K Oct 14 11:58 1381751902.M929263P18351V0000 11 -rw------- 1 mr mail 6.6K Oct 14 11:58 1381751903.M105857P18359V0000 12 -rw------- 1 mr mail 10K Oct 14 11:58 1381751903.M296991P18367V0000 13 -rw------- 1 mr mail 6.8K Oct 14 11:58 1381751903.M480962P18375V0000 14 -rw------- 1 mr mail 5.3K Oct 14 11:58 1381751903.M655771P18383V0000 15 -rw------- 1 mr mail 1.9K Oct 14 11:58 1381751905.M725449P18445V0000 16 -rw------- 1 mr mail 9.7K Oct 14 11:58 1381751905.M916358P18453V0000 17 -rw------- 1 mr mail 2.3K Oct 14 11:58 1381751906.M285237P18469V0000 18 -rw------- 1 mr mail 2.3K Oct 14 11:58 1381751906.M459920P18477V0000 19 -rw------- 1 mr mail 2.3K Oct 14 11:58 1381751906.M634355P18485V0000 20 -rw------- 1 mr mail 2.3K Oct 14 11:58 1381751906.M93911P18461V00000 /\ /\ /\ /\ /\ /\ /\ / \/ \/ \/ \/ \/ \/ \/ -- Mutt: Directory [~/Maildir/.mirorovis@croatiafidelishr/cur], File mask: !^\.[^.] and the right choice to Enter on here is the first line: 1 drwx------ 5 mr mr 4.0K Oct 14 11:58 ../ So I hit Enter on it. And there now I have what I couldn't get, yet, with the aid of Dovecot's imaps:// Here: y:Exit c:Chdir m:Mask ?:Help 1 drwx------ 5 mr mr 4.0K Oct 14 11:58 ../ q:Quit d:Del u:Undel s:Save m:Mail r:Reply g:Group ?:Help 1 N F Dec 29 To miro.rovis@c (3.8K) Fwd: moja cenzurirana poruka 2 N + Sep 20 Mail Delivery S (1.3K) Mail delivery failed: returning message to sender 3 N F Sep 26 To miro.rovis@c (1.5K) Test, fwd: [mutt-users-ow...@mutt.org: 4EDF-4AAE-5F 4 N F Sep 26 To miro.rovis@c (2.1K) More testing, fwd: [owner-mutt-us...@mutt.org: Welc 5 N F Sep 27 To miro.rovis@c (2.1K) Test 130927_21, fwd: [owner-mutt-us...@mutt.org: We 6 N + Sep 27 Majordomo@cloud (1.1K) Majordomo results: (no subject) 7 N + Sep 27 Majordomo@cloud (0.8K) Confirmation for subscribe postfix-users 8 N + Sep 27 Majordomo@cloud (0.1K) Majordomo results: Re: Confirmation for subscribe p 9 N + Sep 27 Majordomo@cloud (1.0K) Welcome to postfix-users 10 N + Oct 02 getmail-help@li (3.7K) confirm subscribe to getm...@lists.pyropus.ca 11 N + Oct 02 getmail-help@li (7.7K) WELCOME to getm...@lists.pyropus.ca 12 N Oct 02 Tim Legg (2.8K) Does my configuration reflect the current best prac 13 N Oct 02 Tim Legg (1.3K) └*> 14 N F Oct 13 To miro.rovis@c (0.4K) test 15 N T Oct 14 John Niendorf (7.0K) Re: Namespace with/without on dovecot server on/off 16 N + Oct 14 Mail Delivery S (1.4K) Mail delivery failed: returning message to sender 17 N + Oct 14 Mail Delivery S (1.4K) Mail delivery failed: returning message to sender 18 N + Oct 14 Mail Delivery S (1.4K) Mail delivery failed: returning message to sender 19 N + Oct 14 Mail Delivery S (1.4K) Mail delivery failed: returning message to sender /\ /\ /\ /\ /\ /\ /\ / / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \/ \/ \/ \/ \/ \/ \/ ---Mutt: ~/Maildir/.mirorovis@croatiafidelishr [Msgs:19 New:19 79K]---(threads/date)-(all) More work for me, because as can be seen the maildrop .mailfilter or the includes must have some errors since the 15 N T Oct 14 John Niendorf (7.0K) Re: Namespace with/without on dovecot server on/off should have come up in the @muttorg folder above... [[ Another note upon proofreading: The error is the missing Cc. Instead of: if ( /^(To|From):.*@mutt.org/ ) there needs to be: if ( /^(To|From|Cc):.*@mutt.org/ ) ]] But I leave this in case some newbie mistakes me for expert which I am certainly not, so that they have this as warning to beware of other possible mistakes of mine... Just as the "Mail delivery failed..." lines are there due to my mistakes... So my question is how do I solve this, how do I get all that is in my folders through imaps:// ? Besides the question of what to change to get John Niendorf's mail in proper place [[ note: which has been solved ]]... Aargh.. I know, it's because he addressed it to me, not only to the list!... No big deal, but it's not urgent anymore... That was one issue, and there is the other issue, and it is with folders when browsed with imaps:// often being readonly and showing this error on the command line in bottom: Mailbox is read-only What did I configure wrong, or what am I missing? Is is the Dovecot's fault, the read-only thing? I'm now really tired. I'll try and proofread the entire text (note: I just did), but if I miss something (note: I sure did, but I must be forgiven because I just died in the process ;-), pls. look up the follow-ups to this mail, because I am exhausted and can't wait to see the end of this message. Miroslav Rovis, Zagreb, Croatia [[ The note concerning the last correction. This mail wasn't sent a few hours ago upon the first attempt. It seems to me now that this line in the /etc/ssmtp/ssmtp.conf, which was: root=miro.ro...@croatiafidelis.hr caused my local mail to be sent to there, which cause the server, the mail hub to not accept any further mail, and there were many, because every time the maildirmake creates a dir it sends a notification. So I hope this messaga will now be sent, with that line being: root= Because this sSMTP is a real stripdown program, really no local mail handling whatsoever. Anything that gets to it will be sent the same way... ]]