Difference between pages "Package:Mutt" and "Gentoo Ecosystem"

(Difference between pages)
m (account_hooks: removed unnecessary line)
 
m
 
Line 1: Line 1:
Mutt is a popular mail reader for Linux systems. This page is being created as a good place for people to place their mutt configurations to share with others. These configuration settings go in the user's <tt>~/.muttrc</tt> file.
+
This page is intended to describe the Gentoo Ecosystem -- everything Gentoo-related, including Gentoo Linux.
  
== Essential Mutt ==
+
== Gentoo ==
  
<pre>
+
See [[Gentoo Linux]].
set pager_stop
+
</pre>
+
  
This turns off the default behavior of mutt where hitting space to scroll will automatically move to the next message when the end of the current message is reached. This is very annoying when scrolling in long emails like cron jobs, and the line above sets this behavior to off.
+
== Funtoo ==
  
== angry_vincent's .muttrc: ==
+
See [[History]].
  
 +
== Calculate ==
  
<pre>
+
http://distrowatch.com/table.php?distribution=calculate
# General config
+
# ---------------
+
  
set folder=~/Mail   # mail folder
+
== Pentoo ==
set alias_file=~/.mail_aliases    # alises file
+
set arrow_cursor   # cursor is '->'
+
set attribution="%d, %n wrote:"    # beginning of mail answer
+
set copy=yes   # save mail copies
+
set edit_headers   # edit mail header
+
set editor="vim"                               # editor
+
set folder_format="%t%N %-30.30f %8s"                        # folder list look
+
set index_format="%4C %Z %{%b %d} %-31.31F %N (%4c) %s"      # mail list look
+
set mailcap_path="~/.mailcap"                               # path to .mailcap
+
set menu_scroll # scroll list by one line
+
set mail_check=5 # mail check interval
+
set pager_stop # at the end of mail do not move to next message
+
set postponed=+drafts # postponed mails
+
set print=ask-yes # ask before print
+
set print_command=lpr # print command
+
set record=+sent # where to save sent mails
+
set signature="~/.signature" # signature file
+
set visual=vim                  # editor caled by  ~v
+
  
# mail sort
+
http://distrowatch.com/table.php?distribution=pentoo
set sort=threads
+
set sort_aux=reverse-date-received
+
set sort_browser=reverse-date
+
ignore *    # ignore headers so the mail body is not overloaded
+
unignore        from: subject to cc mail-followup-to \
+
                date x-mailer x-url user-agent reply-to  # fieids i like to see in mail body
+
  
# Colors
+
== UTUTO ==
color index brightcyan black ~N
+
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.
+
http://distrowatch.com/table.php?distribution=ututo
  
# URLs
+
== Toorox ==
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
+
http://distrowatch.com/table.php?distribution=toorox
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
+
== Litrix ==
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:
+
http://distrowatch.com/table.php?distribution=litrix
color quoted cyan black
+
color quoted1 yellow black
+
</pre>
+
  
== Interesting Color Options ==
+
== Sabayon ==
  
* http://github.com/altercation/mutt-colors-solarized
+
http://distrowatch.com/table.php?distribution=sabayon
  
== golodhrim's mutt config ==
+
== Liberté ==
  
First I split up my muttconfig in several subfiles under <tt>~/.mutt</tt>. The resulting files are:
+
http://distrowatch.com/table.php?distribution=liberte
  
* <code>~/.mutt/account_hooks</code>
+
== Planet Larry ==
* <code>~/.mutt/colors</code>
+
* <code>~/.mutt/folder_hooks</code>
+
* <code>~/.mutt/gpg</code>
+
* <code>~/.mutt/lists</code>
+
* <code>~/.mutt/macros</code>
+
* <code>~/.mutt/mutt-alias</code>
+
* <code>~/.mutt/muttrc</code>
+
* <code>~/.mutt/sidebar</code>
+
* <code>~/.secret/.passwd.gpg</code>
+
  
=== account_hooks ===
+
== sysrescuecd ==
Edit <code>~/.mutt/account_hooks</code>:
+
  
 +
See [http://www.sysresccd.org].
  
<pre>
+
== Google Chrome OS ==
#-------------------------------------------------------------------------
+
# Account Hooks
+
#-------------------------------------------------------------------------
+
account-hook . 'unset imap_user imap_pass'
+
account-hook 'imap://user@imaphost/' "set imap_user=user imap_pass=$my_pass1 "
+
</pre>
+
  
=== colors ===
+
http://www.internetnews.com/skerner/2010/02/google-goes-with-gentoo-portag.html
Edit the file <tt>~/.mutt/colors</tt>:
+
  
  
<pre>
+
Note: The Google Chrome OS Wikipedia Page needs updating to reflect that they are now using Gentoo Linux: [[wikipedia:Google_Chrome_OS]]
#-------------------------------------------------------------------------     
+
# Set colors
+
#-------------------------------------------------------------------------
+
color  attachment  brightmagenta      default
+
color  error      brightred          default
+
color  hdrdefault  red                default
+
color  indicator  brightyellow        red
+
color  markers    brightcyan          default
+
color  message    brightcyan          default
+
color  normal      default            default
+
color  quoted      brightblue          default
+
color  search      default            green
+
color  signature  red                default
+
color  status      yellow              blue
+
color  tilde      magenta            default
+
color  tree        magenta            default
+
</pre>
+
  
=== folder_hooks ===
+
[[Category:Featured]]
 
+
<pre>
+
#--------------------------------------------------------------------------   
+
#
+
# Folders, mailboxes and folder hooks
+
#--------------------------------------------------------------------------
+
# Setup for imap-user in account_hooks
+
set folder="imap://user@imaphost/"
+
mailboxes =INBOX =INBOX/Archives =INBOX/Drafts =INBOX/Sent =INBOX/Trash
+
folder-hook 'imap://user@imaphost/' " \
+
    set folder=imap://user@imaphost/ \
+
        postponed=+INBOX/Drafts \
+
        record=+INBOX/Sent \
+
        smtp_url=smtp://user@smtphost \
+
        smtp_pass=$my_pass1 \
+
        #signature=~/.sig/pr.txt \
+
        from='Name Familyname <name@host> ' \
+
        realname='Realname' \
+
        pgp_sign_as='PGP-signature' \
+
        spoolfile='imap://user@imaphost/' "
+
</pre>
+
 
+
=== ~/.mutt/gpg ===
+
 
+
 
+
<pre>
+
# vim:syn=muttrc                                                               
+
##
+
 
+
set smime_decrypt_use_default_key=yes
+
 
+
# Decode application/pgp attachments like so:
+
set pgp_decode_command="/usr/bin/gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
+
 
+
# And use this to verify pgp signatures:
+
set pgp_verify_command="/usr/bin/gpg --no-verbose --batch --output - --verify %s %f"
+
 
+
# How to decrypt pgp encrypted messages:
+
set pgp_decrypt_command="/usr/bin/gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
+
 
+
# How to pgp sign a message:
+
set pgp_sign_command="/usr/bin/gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
+
 
+
# How to pgp clearsign a message:
+
set pgp_clearsign_command="/usr/bin/gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
+
 
+
# Import a pgp key from a message into my public keyring as follows:
+
set pgp_import_command="/usr/bin/gpg --no-verbose --import -v %f"
+
 
+
# Use this to export a key from my public keyring:
+
set pgp_export_command="/usr/bin/gpg --no-verbose --export --armor %r"
+
 
+
# Verify key information (from the key selection menu):
+
set pgp_verify_key_command="/usr/bin/gpg --verbose --batch --fingerprint --check-sigs %r"
+
 
+
# List my public keyring like so:
+
set pgp_list_pubring_command="/usr/bin/gpg --no-verbose --batch --with-colons --list-keys %r"
+
 
+
# List my private keyring like so:
+
set pgp_list_secring_command="/usr/bin/gpg --no-verbose --batch --with-colons --list-secret-keys %r"
+
 
+
# Automatically sign outgoing messages
+
set pgp_autosign=yes
+
 
+
# Timeout (in seconds) for cached passphrases:
+
set pgp_timeout=1800
+
 
+
# Text to show before a good signature:
+
set pgp_good_sign="^gpg: Good signature from"
+
</pre>
+
 
+
=== ~/.mutt/lists ===
+
 
+
 
+
<pre>
+
#-------------------------------------------------------------------------     
+
# Mailinglist Subscriptions
+
#-------------------------------------------------------------------------
+
# Syntax:
+
# subscribe mailinglist@domain.com
+
</pre>
+
 
+
=== ~/.mutt/macros ===
+
 
+
 
+
<pre>
+
# Macros to toggle the sidebar visibility                                     
+
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
+
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'
+
 
+
# abook query
+
macro index,pager A "<pipe-message>abook --add-email-quiet<return>" "add the sender address to abook"
+
macro generic,index,pager \Cb "abook" "launch abook"
+
</pre>
+
 
+
=== ~/.mutt/alias ===
+
 
+
 
+
<pre>
+
alias nick Realname <email@host.tld>
+
</pre>
+
 
+
=== ~/.mutt/muttrc ===
+
 
+
 
+
<pre>
+
# Some minimal Mutt settings, Gentoo-style.  These reflect the Gentoo
+
# predilection for maildir folders.
+
#
+
# Please don't add settings to this file to change other user
+
# preferences (such as colors), since those can be hard for a user to
+
# undo if their preference doesn't match yours!  For example, it is
+
# *impossible* currently in mutt to remove color settings from objects
+
# other than the index.
+
 
+
#-------------------------------------------------------------------------
+
# Process the password file first
+
#-------------------------------------------------------------------------
+
set my_tmp=`gpg -o ~/.secret/.tmp -d ~/.secret/.passwd.gpg`                   
+
set my_pass1=`awk '/user:/ {print $2}' ~/.secret/.tmp`
+
set my_del=`rm -f ~/.secret/.tmp`
+
+
#-------------------------------------------------------------------------
+
# Further customisations
+
#-------------------------------------------------------------------------
+
set smart_wrap = yes
+
set sort = 'threads'
+
set sort_aux = 'last-date-received'
+
set imap_check_subscribed
+
 
+
ignore "Authentication-Results:"
+
ignore "DoaminKey-Signature:"
+
ignore "DKIM-Signature:"
+
hdr_order Date From To Cc
+
 
+
#-------------------------------------------------------------------------
+
# Configuration variables
+
#-------------------------------------------------------------------------
+
set abort_nosubject=yes
+
set abort_unmodified=yes
+
set query_command="abook --mutt-query '%s'"
+
set alias_file="~/.mutt/mutt-alias"
+
set alias_format="%4n %t %a %r"
+
source $alias_file
+
set assumed_charset="utf-8"
+
set attach_charset="utf-8"
+
set charset="utf-8"
+
set date_format=""
+
set edit_headers=yes
+
set editor='vim + -c "set textwidth=72" -c "set wrap" -c "set nocp" -c "?^$"        '
+
set folder="~/.offlineimap"
+
set forward_quote=yes
+
set header_cache=~/.mutt/cache/headers
+
set message_cachedir=~/.mutt/cache/bodies
+
set certificate_file=~/.mutt/certificates
+
set help=yes
+
set imap_idle=yes
+
set imap_peek=yes
+
set imap_servernoise=no
+
set include=yes
+
set mail_check=60
+
set mbox_type=Maildir
+
set menu_move_off=no
+
set menu_scroll=no
+
set mime_forward=ask-no
+
set pager_context=2
+
set pager_stop=yes
+
set postponed="~/.mutt/mail/postponed"
+
set realname="Martin 'golodhrim' Scholz"
+
set record="~/.mutt/mail/sent"
+
set reply_regexp="^(re([\[0-9\]+])*|betr):[ \t]*"
+
#set reply_to=yes
+
set tilde=yes
+
 
+
#--------------------------------------------------------------------------
+
# muttprint for printing
+
#--------------------------------------------------------------------------
+
set print_command="muttprint"
+
 
+
#--------------------------------------------------------------------------
+
# Automatically process html mails
+
#--------------------------------------------------------------------------
+
auto_view text/html
+
 
+
#--------------------------------------------------------------------------
+
# Other configuration files
+
#--------------------------------------------------------------------------
+
source ~/.mutt/account_hooks
+
source ~/.mutt/folder_hooks
+
source ~/.mutt/colors
+
source ~/.mutt/sidebar
+
source ~/.mutt/gpg
+
source ~/.mutt/macros
+
source ~/.mutt/lists
+
</pre>}}
+
 
+
=== ~/.mutt/sidebar ===
+
{{File
+
|~/.mutt/sidebar|<pre>
+
#--------------------------------------------------------------------------   
+
# Sidebar configuration
+
#--------------------------------------------------------------------------
+
set sidebar_width=30
+
set sidebar_visible=yes
+
set sidebar_delim='|'
+
color sidebar_new yellow default
+
 
+
#--------------------------------------------------------------------------
+
# Sidebar keys
+
#--------------------------------------------------------------------------
+
bind index \CP sidebar-prev
+
bind index \CN sidebar-next
+
bind index \CO sidebar-open
+
bind pager \CP sidebar-prev
+
bind pager \CN sidebar-next
+
bind pager \CO sidebar-open
+
</pre>
+
 
+
=== ~/.secret/.passwd.gpg ===
+
For this file follow the next steps:
+
* Step 1:
+
Create a folder <tt>~/.secret</tt> and inside that directory, create a file called <tt>.passwd</tt>. Enter the following into it:
+
 
+
 
+
<pre>
+
user1:    passwd1
+
user2:    passwd2
+
</pre>
+
 
+
where "user1" and "user2" are identifiers for the accounts you added in the account_hooks and folder_hooks files, as well as at the start of the muttrc.
+
* Step 2:
+
Now, encrypt the file with your <tt>gpg-key</tt>. If you don't have one, execute <tt>gpg --gen-key</tt> and create one. After that, don't forget to delete your unencrypted password storage:
+
<console>
+
$ ##bl##gpg -r 0x<Your-ID-fingerprint> -o .passwd.gpg --encrypt .passwd
+
$ ##bl##rm -f .passwd
+
</console>
+
 
+
=== Mutt postfix setup ===
+
Postfix is another popular and powerful mail transfer agent which is easier to configure than sendmail. Let's start a quick postfix mail transfer setup that will work with mutt. Set the <tt>sasl,berkdb</tt> USE flags to <tt>mail-mta/potsfix</tt> and <tt>mail-client/mutt</tt> in <tt>/etc/portage/package.use/</tt>:
+
<console>
+
# ##i##echo "mail-mta/postfix berkdb sasl" >> /etc/portage/package.use/mail
+
# ##i##echo "mail-client/mutt berkdb sasl" >> /etc/portage/package.use/mail
+
# ##i##emerge -uN1 mutt postfix
+
</console>
+
Edit <tt>/etc/postfix/main.cf</tt> and add the following lines:
+
 
+
 
+
<pre>
+
relayhost = smtp.gmail.com:587
+
smtp_use_tls = yes
+
smtp_sasl_auth_enable = yes
+
smtp_sasl_password_maps = hash:/etc/postfix/gmail_passwd
+
smtp_sasl_security_options = noanonymous
+
</pre>
+
 
+
Create and edit the aforementioned authorization file: <tt>gmail_passwd</tt>:
+
<console>
+
# ##i##touch /etc/postfix/gmail_passwd
+
# ##i##echo "smtp.gmail.com:587 my.name@gmail.com:password" >> /etc/postfix/gmail_passwd
+
</console>
+
Where <my.name> is a gmail account and passwd is the account password.
+
Convert <tt>gmail_passwd</tt> into Berkeley DB format, secure the file, and restart the postfix daemon:
+
<console>
+
# ##i##postmap /etc/postfix/gmail_passwd
+
# ##i##chown root:postfix /etc/postfix/gmail_passwd*
+
# ##i##chmod 0640 /etc/postfix/gmail_passwd*
+
# ##i##/etc/init.d/postfix restart
+
</console>
+
 
+
[[Category:HOWTO]]
+
[[Category:First Steps]]
+

Latest revision as of 18:58, 15 September 2013

This page is intended to describe the Gentoo Ecosystem -- everything Gentoo-related, including Gentoo Linux.

Gentoo

See Gentoo Linux.

Funtoo

See History.

Calculate

http://distrowatch.com/table.php?distribution=calculate

Pentoo

http://distrowatch.com/table.php?distribution=pentoo

UTUTO

http://distrowatch.com/table.php?distribution=ututo

Toorox

http://distrowatch.com/table.php?distribution=toorox

Litrix

http://distrowatch.com/table.php?distribution=litrix

Sabayon

http://distrowatch.com/table.php?distribution=sabayon

Liberté

http://distrowatch.com/table.php?distribution=liberte

Planet Larry

sysrescuecd

See [1].

Google Chrome OS

http://www.internetnews.com/skerner/2010/02/google-goes-with-gentoo-portag.html


Note: The Google Chrome OS Wikipedia Page needs updating to reflect that they are now using Gentoo Linux: wikipedia:Google_Chrome_OS