Created
August 22, 2013 15:36
-
-
Save norrs/6308803 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEFAULT=$HOME/Maildir | |
MAILDIR=$HOME/Maildir | |
logfile "$HOME/.getmail/.maildrop.log" | |
log "Markers: ---------------------------------------------" | |
log " (**) from config file, (II) informational, (WW) warning" | |
log "--------------------------------------------------------" | |
log "" | |
###################################################################### | |
# | |
# Adding missing headers for PGP/MIME | |
# | |
BPM="-----BEGIN PGP MESSAGE-----" | |
EPM="-----END PGP MESSAGE-----" | |
BPS="-----BEGIN PGP SIGNATURE-----" | |
EPS="-----END PGP SIGNATURE-----" | |
if (!/^Content-Type: message/ && !/^Content-Type: multipart/ \ | |
&& !/^Content-Type: application\/pgp/) | |
{ | |
if (/^$BPM/:b && /^$EPM/:b) | |
xfilter "reformail -A 'Content-Type: application/pgp; format=text; \ | |
x-action=encrypt'" | |
if (/^$BPS/:b && /^$EPS/:b) | |
xfilter "reformail -A 'Content-Type: application/pgp; format=text; \ | |
x-action=sign'" | |
} | |
##################################################################### | |
# | |
# Correcting wrong signature dashes | |
# | |
if (/^--($|[ ]{2,}^)/:b) | |
{ | |
xfilter "sed -r 's/^--($|[ ]{2,}^)/-- /'" | |
log "(II) Sig Dashes corrected" | |
} | |
#'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
# What we can find in the header | |
if ( /^X-Advertisement:.*/ \ | |
|| /^X-Mailer:.*(Advanced Mass)/ \ | |
|| /^X-Spam-Status: YES / \ | |
|| /^Message-ID:*<>/:h ) | |
{ | |
exception { | |
to $DEFAULT/.spam/ | |
} | |
} | |
# gathering | |
if (/^From: mailman-bounces@gathering\.org$/) | |
{ | |
log "(II) [tg-drift] Mailman bounce" | |
to $DEFAULT/.tg.drift/ | |
} | |
exception { | |
log "(II) default mailbox." | |
to $DEFAULT/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment