Skip to content

Instantly share code, notes, and snippets.

@iharsuvorau
Created December 22, 2015 14:16
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iharsuvorau/45a078ecb597eb916fdf to your computer and use it in GitHub Desktop.
Save iharsuvorau/45a078ecb597eb916fdf to your computer and use it in GitHub Desktop.
fetchmail + proc + msmtp + mutt configuration samples
# set chmod 0600 to the file
set daemon 60
poll imap.gmail.com
with proto IMAP
user "user@gmail.com"
there with password "pass"
is "localuser" here
mda "/usr/bin/procmail -d %T"
options
ssl
poll imap.zoho.com
with proto IMAP
user "user@zoho.com"
there with password "pass"
is "localuser" here
mda "/usr/bin/procmail -d %T"
options
ssl
poll mail.mydomain.com
with proto IMAP
user "inbox@mydomain.com"
there with password "pass"
is "pass" here
mda "/usr/bin/procmail -d %T"
options
ssl
# Example .msmtprc example
# Configure to suit your environment and place this file as ~/.msmtprc
#
# Make sure the file is secure. chmod 0600 ~/.msmtprc
#
# Commented example - wont work as msmtp will error out if parsing
# a line that has a comment at the end.
#
# account cookiesystems # The account name (can be anything to identify it)
# from jdt@cookiesystems.com # email address. msmtp will look at envelope_from
# host smtp.gmail.com # smtp host
# port 587 # port
# user jdt@cookiesystems.com # username
# password mytopsecretpassword # password
# auth on # Requires Authentication
# tls on # Use TLS
# tls_certcheck on # Check the TLS Cert
# tls_trust_file /etc/ssl/certs/ca-certificates.crt # Location of ca-certs
# If tls doesn't recognize the certificate use this:
#
# tls on
# tls_starttls on
# tls_certcheck off
# auth login
set use_from = yes
set envelope_from = "yes"
set mbox_type = "Maildir"
set spoolfile = "~/Mail/gmail"
set folder = "~/Mail"
set record = "+sent"
set postponed = "+postponed"
set sendmail = "/usr/local/bin/msmtp"
# set date_format="%y-%m-%d %T"
set date_format="%d %b %y %T"
set index_format="%2C %Z [%d] %-30.30F (%-4.4c) %s"
mailboxes ! +gmail +zoho +ot
set sort_browser = alpha
# sidebar
set move = no
macro index,pager G '<shell-escape> fetchmail -vk<enter>'
set realname = "Ihar Suvorau"
auto_view text/html
set sort = threads
set sort_aux = 'reverse-date-received'
# COLORS
color attachment brightmagenta black
color error brightwhite red # errors yell at you in red
color hdrdefault red black # headers
color indicator brightyellow magenta # currently selected message
color markers brightcyan black # the + for wrapped pager lines
color message brightcyan black # informational messages, not mail
color normal white black # plain text
color quoted green black # quoted text
color search brightgreen black # hilite search patterns in the pager
color signature red black # signature (after "-- ") is red
color status brightyellow blue # status bar is yellow *on blue*
color tilde blue black # ~'s after message body
color tree red black # thread tree in index menu is magenta
color signature brightred black
color underline yellow black
color header cyan black ^(From|Subject): # Important headers
color body magenta black "(ftp|http)://[^ ]+" # picks up URLs
color body magenta black [-a-z_0-9.]+@[-a-z_0-9.]+
# 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
# Colorize smileys: :-) ;-) :-/ :-(
color body yellow black "[;:]-[)/(|]"
color body yellow black "[;:][)/(|]"
color body green black "[[:alpha:]]\+://[^ ]*"
color index brightyellow black ~N # New
color index yellow black ~O # Old
color index magenta black ~F
color index blue black ~T
color index red black ~D
PMDIR=/Users/localuser/Mail/procmail
LOGFILE=$PMDIR/log
VERBOSE=on
MAILDIR=/Users/localuser/Mail
# Recipes
:0:
* ^TOuser@gmail.com
gmail/
:0:
* ^TOuser@zoho.com
zoho/
:0:
* ^TOuser@mydomain.com
mydomain/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment