Re: My standalone maildrop configuration files

miro <[email protected]>
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
On Thu, Oct 31, 2013 at 07:19:32PM +0000, miro wrote:
> At long last I learned the last trick that I was badly lacking, and without which the configuration had some serious flaws.
> 
> Such as those that I asked for help here:
> http://article.gmane.org/gmane.mail.getmail.user/4958
> 
> I like maildrop and wish to contribute my configuration to the public.
> 
> Pls. find my configuration either on:
> 
> http://www.croatiafidelis.hr/gnu/maildrop/
> 
> or I'll try and send them to this courier mailing list as signed attachments.
> 
> Miroslav Rovis
> Zagreb, Croatia

> #
> # This is configuration file for standalone maildrop:
> # ~/.mailfilter
> #
> # based on:
> # http://www.wonkity.com/~wblock/docs/html/maildrop.html
> # and the missing trick found on:
> # http://www.debian.org/doc/manuals/debian-reference/ch06.en.html#_maildrop_configuration
> # (the ...test -d ...  if ( $RETURNCODE == 1 ) ... if clause trick)
> #
> # No warranties of any kind, but freely use as template
> # You certainly cannot simply reuse this, but replace with your data (email etc.)
> #
> # You can cite me, Miroslav Rovis, and www.CroatiaFidelis.hr as source if you wish.
> #
> # Feedback welcome, but I am lazy at replying to emails sometimes. I prefer public
> # correspondence, such as on respective mail-lists.
> # See my previous attempts at .mailfilter script
> # here: http://www.dovecot.org/list/dovecot/2013-October/092842.html
> # as well as here: http://marc.info/?l=mutt-users&m=138178696024182&w=2
> # for more info (and to avoid mistakes like mine)
> 
> 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 )
>  {
> `test -d $DEFAULT`
> if ( $RETURNCODE == 1 )
>   {
>     `${MAILDIRMAKE} "$DEFAULT"`
>     if ( $RETURNCODE == 0 )
>     {
>         # notify the user when new folders are created
>         NEWFOLDERMSG="${FOLDERS} folder created"
>         `${ECHO} "$NEWFOLDERMSG" | ${MAIL} -s "$NEWFOLDERMSG" $LOGNAME`
>     }
>   }
>  }
> }
> 
> xfilter "reformail -c -U'Received: from'" 
> 
> # filter out duplicate messages
> `${REFORMAIL} -D 131072 $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="[email protected]"
>     LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'`
>     F2MKlevel2="$LISTNAME"
> include .maildirmake.incL2
>     to ${FOLDERS}$MYFOLDER.$F2MKlevel2
>  }
> if ( /^(To|From):.*support@plus\.hr/ )
>  {
>     LISTNAMEDOT="[email protected]"
>     LISTNAME=`echo $LISTNAMEDOT|sed 's/\.//g'`
>     F2MKlevel2="$LISTNAME"
> include .maildirmake.incL2
>    to ${FOLDERS}$MYFOLDER.$F2MKlevel2
>  }
> if ( /^(To|From|Cc):.*@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):.*([email protected])/ )
>  {
>     MY2FOLDERDOT="$MATCH2"
>     MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'`
>     F2MKlevel2="$MY2FOLDER"
> include .maildirmake.incL2
>   to ${FOLDERS}${MYFOLDER}.$F2MKlevel2
>  }
>  if ( /^(To|From):.*([email protected])/ )
>  {
>     MY2FOLDERDOT="$MATCH2"
>     MY2FOLDER=`echo $MY2FOLDERDOT|sed 's/\.//g'`
>     F2MKlevel2="$MY2FOLDER"
> include .maildirmake.incL2
>   to ${FOLDERS}${MYFOLDER}.$F2MKlevel2
>  }
> if ( /^From:\s*EWTN\s*<([email protected])>/ )
>  {
>     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
> }
> 


> if ( $MAILDIR )
> {
>     DEFAULT="$HOME/Maildir"
>     FOLDERS="$DEFAULT/."
> 
>   if ( $F2MKlevel1 )
>   {
> `test -d ${FOLDERS}$F2MKlevel1`
> if ( $RETURNCODE == 1 )
>     {
>         `${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`
>         }
>     }
>   }
> }


> if ( $MAILDIR )
> {
>     DEFAULT="$HOME/Maildir"
>     FOLDERS="$DEFAULT/."
> 
>   if ( F2MKlevel2 )
>   {
> `test -d ${FOLDERS}${MYFOLDER}.${F2MKlevel2}`
> if ( $RETURNCODE == 1 )
>     {
>         `${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`
>         }
>     }
>   }
> }


> if ( $MAILDIR )
> {
>     DEFAULT="$HOME/Maildir"
>     FOLDERS="$DEFAULT/."
> 
>   if ( $F2MKlevel3 )
>   {
> `test -d ${FOLDERS}${MYFOLDER}.$MY2FOLDER.$F2MKlevel3`
> if ( $RETURNCODE == 1 )
>     {
>         `${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`
>         }
>     }
>   }
> }

I am glad that basically sufficient info has (probably) been served to the subscribers of this mailing list (I can only judge from what I received in the subscription feed), sufficient info meaning, at this time the http://www.croatiafidelis.hr/gnu/maildrop/ is there and those are PGP signed files, should suffice...

But this message that I am replying to, isn't complete, and also at this time, the message doesn't show other than the title and sender, on:

http://sourceforge.net/mailarchive/message.php?msg_id=31585709

So I decided to bounce the exact message from my sent folder to Mutt mailing list. Here:

http://marc.info/?l=mutt-users&m=138324790504223&w=2

where I checked it, and it is complete in the archives.

(However, the forwarded message that I sent later, only because I didn't receive the bounced message in my subscription feed from Mutt, for who knows which exact of the few possible reasons/subjects in between Mutt and mail delivery, didn't show correctly, so disregard the next in thread after the one above in the Mutt archives, pls.)

Thanks for the fine Maildrop program! For me it now works great, and I can do pretty much what I want it to do for me!

Miroslav Rovis
Zagreb, Croatia

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBCgAGBQJSc3w8AAoJEBi5AB8X1oH8lEcP/0EUeWtyg2Qb5p8129axP7gh
skXy8xx2IvUasQM9898XAicBTc/o4rUW93g1c1daZ2NP44o/V2gziMrVBNmeQuc/
uUuBZR92QjiT2VEwBButLNggy0GZA/nmX7jNA+BJ3ToFC1bD1iY+wCnm+pROzxxI
V3r//D8QUS4kAVGIPZOSWmzQkU04DXbAHTaoMPVU2i9i3xH0bnBhbLw9TKtlEkc3
h2p2bR7mqJF5/BB6YJ4Pn7B87Aq5mm8tLQLP1tHn+cdp489ZyjeIeq4RXJrhmdo+
TASeYIWExp+MUTqtsW+LF4euNbFcKlIofIScOL5rdpcMp947Vzw7EcoMIXqqa4lR
4Avyw6DNc1vWOMT1HbJ8EWt19sF2rW+1x5t98Xr2hJRsAaIkl2f81irqhEjIoO9h
GM9pUyut/MOdwO3CMrS79gEL5a3kqK7bfZCghuDXqxL2bz25lJ8pdFxcwrK4ckhO
aWY/O/xrhEOSe6kNbn5yo7QhQMI8O3t7dymjOR34xM+sw+WU19GuVs5tUDZLFovT
UeToIwxBfyeMfMVzrXcJuH0R3yxmsb2hSJiJuRZF1t0Qu38+Ntonw2QZP2ffa820
6mMzMR5Oyoar/sQNgidbZjHvIAmOPQ0LId+US9PTUIMIMCJ6y4DuS8ZAnorpu4Oy
JSl9mHyaMsjQZNNHhzFK
=ajHH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.