From 94acb5229fe750aa9d91baf087859417ade102aa Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Wed, 31 Jul 2013 16:03:11 +0200 Subject: [PATCH] mutt config files --- bashrc | 1 + install.sh | 11 +++++- mutt/colors.test1 | 80 +++++++++++++++++++++++++++++++++++++++++ mutt/colors.test2 | 88 ++++++++++++++++++++++++++++++++++++++++++++++ mutt/crypto | 41 +++++++++++++++++++++ mutt/killsig | 22 ++++++++++++ mutt/muttrc | 81 ++++++++++++++++++++++++++++++++++++++++++ mutt/passwords.gpg | 2 ++ 8 files changed, 325 insertions(+), 1 deletion(-) create mode 100644 mutt/colors.test1 create mode 100644 mutt/colors.test2 create mode 100644 mutt/crypto create mode 100755 mutt/killsig create mode 100644 mutt/muttrc create mode 100644 mutt/passwords.gpg diff --git a/bashrc b/bashrc index e788dc9..59239a0 100644 --- a/bashrc +++ b/bashrc @@ -8,6 +8,7 @@ export EDITOR="vim" GPG_TTY=`tty` export GPG_TTY +export GPGKEY=6F36914A #####ON DEFINIT LES COULEURS red='\033[31m' diff --git a/install.sh b/install.sh index 3ac9f82..7dc44be 100755 --- a/install.sh +++ b/install.sh @@ -13,7 +13,6 @@ ln -s $WAI/screenrc ./.screenrc ln -s $WAI/octaverc ./.octaverc ln -s $WAI/mailcap ./.mailcap - ln -s $WAI/chooseWP.sh ~/Pictures/wallpapers/chooseWP.sh #SSH @@ -21,6 +20,16 @@ if [ ! -d "~/.ssh" ]; then mkdir .ssh/; fi; cd ~/.ssh ln -s $WAI/ssh/config ./ +#MUTT +if [ ! -d "~/.mutt" ]; then mkdir .mutt/; fi; +cd ~/.mutt +ln -s $WAI/mutt/muttrc ./ +ln -s $WAI/mutt/killsig ./ +ln -s $WAI/mutt/passwords.gpg ./ +ln -s $WAI/mutt/crypto ./ +ln -s $WAI/mutt/colors.test1 ./ +ln -s $WAI/mutt/colors.test2 ./ + #VIM if [ ! -d "~/.vim" ]; then mkdir ~/.vim/; fi; diff --git a/mutt/colors.test1 b/mutt/colors.test1 new file mode 100644 index 0000000..b0997b5 --- /dev/null +++ b/mutt/colors.test1 @@ -0,0 +1,80 @@ +# vim: filetype=muttrc + +############## COLORS ############## +# Colours for items in the index +color index brightcyan black ~N +# Hmm, don't like this. +#color index brightgreen black "~N (~x byers.world)|(~x byers.x)|(~x langly.levallois123.axialys.net)|(~x the.earth.li)" +color index brightyellow black ~F +color index black green ~T +color index brightred black ~D +mono index bold ~N +mono index bold ~F +mono index bold ~T +mono index bold ~D + +# Highlights inside the body of a message. + +# URLs +color body brightgreen black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body brightgreen black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" + +# email addresses +color body brightgreen black "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" +#mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +# header +color header green black "^from:" +color header green black "^to:" +color header green black "^cc:" +color header green black "^date:" +color header yellow black "^newsgroups:" +color header yellow black "^reply-to:" +color header brightcyan black "^subject:" +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" +color header yellow black "^X-Message-Flag:" +color header yellow black "^X-Spam-Status:" +color header yellow black "^X-SpamProbe:" +color header red black "^X-SpamProbe: SPAM" + + +# Coloring quoted text - coloring the first 7 levels: +color quoted cyan black +color quoted1 yellow black +color quoted2 red black +color quoted3 green black +color quoted4 cyan black +color quoted5 yellow black +color quoted6 red black +color quoted7 green black + + +# Default color definitions +#color hdrdefault white green +color signature brightmagenta black +color indicator black cyan +color attachment black green +color error red black +color message white black +color search brightwhite magenta +color status brightyellow blue +color tree brightblue black +color normal white black +color tilde green black +color bold brightyellow black +#color underline magenta black +color markers brightcyan black +# Colour definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse diff --git a/mutt/colors.test2 b/mutt/colors.test2 new file mode 100644 index 0000000..1379317 --- /dev/null +++ b/mutt/colors.test2 @@ -0,0 +1,88 @@ +## Theme kindly inspired from +## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html + +## Colours for items in the index +color index brightcyan black ~N +color index brightred black ~O +color index brightyellow black ~F +color index black green ~T +color index brightred black ~D +mono index bold ~N +mono index bold ~F +mono index bold ~T +mono index bold ~D + +## Highlights inside the body of a message. + +## URLs +color body brightgreen black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body brightgreen black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" + +## Email addresses. +color body brightgreen black "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +## Header +color header green black "^from:" +color header green black "^to:" +color header green black "^cc:" +color header green black "^date:" +color header yellow black "^newsgroups:" +color header yellow black "^reply-to:" +color header brightcyan black "^subject:" +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" + +color header red black "^x-spam-rule:" +color header green black "^x-mailer:" +color header yellow black "^message-id:" +color header yellow black "^Organization:" +color header yellow black "^Organisation:" +color header yellow black "^User-Agent:" +color header yellow black "^message-id: .*pine" +color header yellow black "^X-Fnord:" +color header yellow black "^X-WebTV-Stationery:" +color header yellow black "^X-Message-Flag:" +color header yellow black "^X-Spam-Status:" +color header yellow black "^X-SpamProbe:" +color header red black "^X-SpamProbe: SPAM" + +## Coloring quoted text - coloring the first 7 levels: +color quoted cyan black +color quoted1 yellow black +color quoted2 red black +color quoted3 green black +color quoted4 cyan black +color quoted5 yellow black +color quoted6 red black +color quoted7 green black + +## Default color definitions +#color hdrdefault white green +color signature brightmagenta black +color indicator black cyan +color attachment black green +color error red black +color message white black +color search brightwhite magenta +color status brightyellow blue +color tree brightblue black +color normal white black +color tilde green black +color bold brightyellow black +#color underline magenta black +color markers brightcyan black + +## Colour definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse + diff --git a/mutt/crypto b/mutt/crypto new file mode 100644 index 0000000..5956ce3 --- /dev/null +++ b/mutt/crypto @@ -0,0 +1,41 @@ +set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f" +set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" +set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f" +set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xC9C40C31 -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x6F36914A -- -r %r -- %f" +set pgp_import_command="gpg --no-verbose --import -v %f" +set pgp_export_command="gpg --no-verbose --export --armor %r" +set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" +set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" +set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" + +# specify the uid to use when encrypting/signing +set pgp_sign_as=0x6F36914A + +# this set the number of seconds to keep in memory the passpharse used to encrypt/sign +# the more the less secure it will be +set pgp_timeout=60 + +# it's a regexp used against the GPG output: if it matches some line of the output +# then mutt considers the message a good signed one (ignoring the GPG exit code) +set pgp_good_sign="^gpg: Good signature from" + +# mutt uses by default PGP/GPG to sign/encrypt messages +# if you want to use S-mime instead set the smime_is_default variable to yes + +# automatically sign all outgoing messages +set crypt_autosign +# sign only replies to signed messages +set crypt_replysign + +# automatically encrypt outgoing messages +set crypt_autoencrypt=yes +# encrypt only replies to signed messages +set crypt_replyencrypt=yes +# encrypt and sign replies to encrypted messages +set crypt_replysignencrypted=yes + +# automatically verify the sign of a message when opened +set crypt_verify_sig=yes diff --git a/mutt/killsig b/mutt/killsig new file mode 100755 index 0000000..4b7d4f6 --- /dev/null +++ b/mutt/killsig @@ -0,0 +1,22 @@ +#!/usr/bin/perl +# +# killsig: delete signature (also "oe-sigs") when quoting emails. +# known patterns: ">-- " , "> -- ", ">--", "> --". +# +# Michael Velten + +open(MAIL, "+<$ARGV[0]") || die "$0: Can't open $ARGV[0]: $!"; +while () { + unless (/^> ?-- ?$/) { + push(@purged, $_); + } + else { + while () { + push(@purged, $_) unless /^>.+/; + } + } +} +truncate(MAIL, 0); +seek(MAIL,0,0); +print MAIL @purged; +close(MAIL); diff --git a/mutt/muttrc b/mutt/muttrc new file mode 100644 index 0000000..582077a --- /dev/null +++ b/mutt/muttrc @@ -0,0 +1,81 @@ + + +############################ +##### ATTENTION - /!\ ###### +# Fichier sur git, # +# Accessible publiquement # +# Ne pas mettre de mdp en # +# clair ! # +############################ + + +set imap_user = "frank_mail" + +# Keep IMAP connection alive by polling intermittently (time in seconds). +set imap_keepalive = 300 +set smtp_url = "smtp://frank_mail@villaro-dixon.eu:587/" +set from = "Frank@Villaro-Dixon.eu" +set realname = "Frank Villaro-Dixon" + +##Passwords: +source "gpg -d ~/.mutt/passwords.gpg |" + +# Change the following line to a different editor you prefer. +#set editor = "vim" +set editor="$HOME/.mutt/killsig %s; /usr/bin/vim %s" + +# Basic config, you can leave this as is +set folder = "imaps://villaro-dixon.eu:993" +set spoolfile = "+INBOX" +mailboxes =INBOX =UNIGE =SPAM =BITFLIP + +#Bien ajouter le "+" devant !!! +set postponed = "+Drafts" +# Where to save sent messages ? + +set record = "+Sent" + +set imap_check_subscribed + +# Allow Mutt to open new imap connection automatically. +unset imap_passive +set hostname = villaro-dixon.eu +#how often to check +set mail_check = 120 +bind index "^" imap-fetch-mail +set beep_new + +set timeout = 300 +set header_cache=~/.mutt/cache/headers +set message_cachedir=~/.mutt/cache/bodies +set certificate_file=~/.mutt/certificates +set move = no +set include +set sort = 'threads' +set sort_aux = 'reverse-last-date-received' +set auto_tag = yes + +ignore "Authentication-Results:" +ignore "DomainKey-Signature:" +ignore "DKIM-Signature:" +hdr_order Date From To Cc +alternative_order text/plain text/html * +auto_view text/html +bind editor complete-query +bind editor ^T complete +bind editor noop + +# Gmail-style keyboard shortcuts +#macro index,pager y "unset trash\n " "Gmail archive message" +#macro index,pager d "set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n " "Gmail delete message" +#macro index,pager gi "=INBOX" "Go to inbox" +#macro index,pager ga "=[Gmail]/All Mail" "Go to all mail" +#macro index,pager gs "=[Gmail]/Starred" "Go to starred messages" +#macro index,pager gd "=[Gmail]/Drafts" "Go to drafts" + + +set certificate_file=~/.mutt/certificates/cert +set tmpdir=/dev/shm/ + +source ~/.mutt/colors.test1 +source ~/.mutt/crypto diff --git a/mutt/passwords.gpg b/mutt/passwords.gpg new file mode 100644 index 0000000..411d8b1 --- /dev/null +++ b/mutt/passwords.gpg @@ -0,0 +1,2 @@ + a YFVe#%%J oDFR`=>1|=GMmX.ƤB2mzb" R&B>)ޓT/AFτ0<}ӣ0KnHSǗ5=UIS[ʣe2o+PJ +] R#2u`M.JVWwbĢ0]ƈ.\A tɧ]M,tۏ}b2⻅\p.]X}]I\(˻a1xTuv_|#!% 㭭C