Cliente de correo electronico en modo texto: mutt

Por Paco Aldarias Raya

Impreso: 19 de enero 2006

Email: pacolinux arroba inicia punto es

Web: http://aldarias.es/pacodebian

Con Linux Debian. En Valencia (España)

El documento tiene version .html, y .pdf, cambiando en el navegador la parte final podrás acceder a ambos.

Este documento es de libre reproducción siempre que se cite su fuente.

Realizado con: LATEX

Índice General

1 Introducción

Mutt es un lector de correo electronico en modo texto.

Para configurarlo simplemente hay q crear el fichero .muttrc

2 Instalación

apt-get install mutt

3 Fichero de configuración

El fichero de configuración debe ir en la carpeta home del usuario

 /.muttrc debe llamarse el fichero.

# Por Paco Aldarias
# 25.08.2005
# .muttrc
# http://www.sromero.org/linux/mutt-tut.html
# http://www.ferdyx.org/geek_imap_mutt.en.html
# http://www.lsi.upc.es/lclsi/FAQ/HTMLs/UNIX/SP/correo/mutt.html

##
# IMAP
##
#
set spoolfile=imap://username@aldarias.dyndns.org/  # Acceso vía IMAP cambiad el username
set folder=imap://username@aldarias.dyndns.org/inbox    # OJO: cambiad el username
set imap_pass = "micontraseña" # Cambiarla
set timeout = 10
set record = imap://paco@aldarias.dyndns.org/INBOX.enviados

folder-hook . 'unset from; unset imap_pass;'
folder-hook imap://paco@aldarias.dyndns.org 'set imap_pass=mipassword;
			set from="Paco Aldarias Raya <faldarias526v@cv.gva.es>";
			set sort=date'
# Cabeceras
set autoedit=yes
set edit_headers
my_hdr From: "Paco Aldarias Raya <faldarias526v@cult.gva.es>"
my_hdr Reply-To: "Paco Aldarias Raya <faldarias526v@cult.gva.es>"
#my:hdr X-Face: "lc(^UA!tr_&wKed'uG\u%`2o7&tR2x^'E[2vhBGII3+l<&R@-ffwi-BEy{hS~kmO4'>D_C q<&Q,=P\<vcNT2P^DSrW<c"A_9q4,T2+)SLnyn^X!*6hF0;suU>V2V&tA(>Tfb(CLz.Fdc_n?}vK@E MBJ!yx<@q$X"0&F|iHc|+(QxUX-,0/

# Firma. 
#http://es.tldp.org/COMO-INSFLUG/COMOs/Mutt-GnuPG-PGP-Como/Mutt-GnuPG-PGP-Como-6.html
#http://www.ferdyx.org/geek_imap_mutt.en.html

set pgp_sign_as="0x118B7CED"

# Mailing lists
#
# unsubscribe *
subscribe lliurex_anuncios@llistes.cult.gva.es # faldarias526v@cv.gva.es
subscribe lliurex_modeloaula@llistes.cult.gva.es #  faldarias526v@cv.gva.es
subscribe lliurex_general@llistes.cult.gva.es  #  faldarias526v@cv.gva.es
subscribe docbook-ayuda@es.tldp.org 
subscribe ES-TEX@LISTSERV.REDIRIS.ES
subscribe debian-security-announce.lists.debian.org
subscribe sptex.ls.cica.es
subscribe ltsp-es.listas.hispalinux.es
subscribe apicv-digest-ayuda@eListas.net
subscribe stepv-intersindical@mail.intersindical.org


##
# Carpetas
##
#
mailboxes =
mailboxes =.enviados
mailboxes =.paco
mailboxes =.ados
mailboxes =.apicv
mailboxes =.root
mailboxes =.diarios
mailboxes =.security
mailboxes =.ceed
mailboxes =.spam
mailboxes =.sptex
mailboxes =.Sl-educacion
mailboxes =.lliurex
mailboxes =.security

##
# Impresión
##
#
set print_command = "muttprint"

##
# Colores
##
#

# [generic]
color normal     white          black
color error      red            white
color message    blue           white
color search     red            white
color indicator  brightyellow   brightred
color status     white          blue

# [index]
color index      magenta        black   "~A"            # all
color index      cyan           black   "~l"            # lists
color index      green          black   "~p"            # to me
color index      yellow         black   "~P"            # by me
color index      red            black   "~D"            # deleted
color index      white          black   "~T"            # tagged
color tree       white          black

# [pager]
color hdrdefault cyan           blue
color header     brightgreen    blue    "^from: "
color header     magenta        blue    "^date: "
color header     brightyellow   blue    "^subject: "
color body       red            black   "(((ht|f)tp)|news|telnet|finger|mailto):(//)?[^ \)>\"\t\r\n]+"
color body       red            black   "(www|ftp)\\.[-a-z0-9\\.]+"
color body       red            black   "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
color body       brightwhite    black   "(^|[[:space:]])_[[:alpha:]]+_([[:space:]]|$)"
color body       brightwhite    black   "(^|[[:space:]])\\*[[:alpha:]]+\\*([[:space:]]|$)"
color bold       brightyellow   black
color underline  brightcyan     black
color markers    brightred      black
color quoted     cyan           black
color quoted1    green          black
color attachment magenta        black 
color signature  red            black
color tilde      blue           black

#
# Pitido.
# http://www-users.cs.umn.edu/~jaideepc/misc/.muttrc
#

set beep_new     # set: makes Mutt beep when new mail arrives
set fast_reply
set arrow_cursor

# Para ver mensajes con contenido HTML
auto_view text/html

# Add this to your ~/.muttrc to integrate spamassassin and mutt
# spamassassin report and classify as spam
macro index S "|/usr/bin/spamassassin -r"
# spamassassin classify as ham
macro index H "|/usr/bin/sa-learn --ham  --no-sync"
# rebuild the spamassassin bayes filter db
macro index R "!/usr/bin/sa-learn --sync"


#
# Editor
#

set   editor="nano %s"


#
# Idioma
#

#set send_charset="us-ascii:iso-8859-1:iso-8859-15:utf-8" 




##########################

macro pager "y" "<sync-mailbox><change-folder>?<toggle-mailboxes>"
macro index "y" "<sync-mailbox><change-folder>?<toggle-mailboxes>"
set folder_format="%2C %t%N %f %> %8s %d "


set print_command="lpr -P lp0"


####################################3
# .muttrc file - Suresh Ramasubramanian
# Don't display certain headers
# http://www.hserus.net/muttrc.html

ignore *
unignore From To Cc Subject Date Reply-To Organization X-Mailer User-Agent

# Order to display the headers in
hdr_order From: Date: To: Cc: Subject:

# Default From: line for when mailing in batch mode
#my_hdr From: foo@bar.com (Foo Bar)
#set imap_user="username@my.imap.server"
#set imap_pass="my_imap_password"
#set certificate_file=mutt.crt
#set ssl_starttls=no


#what the date format looks like
#set date_format="!%a, %b %d, %Y a %I:%M:mutt_datos%p %Z"
set date_format="!%a,  %d %b %Y  %I:%M"


################
# Index format #
################

# Type: string
# Default: "%4C %Z %{%b %d} %-15.15L (%4l) %s"
# This variable allows you to customize the message index display to your personal taste.
# %a address of the author
# %b filename of the original message folder (think mailBox)
# %B the list to which the letter was sent, or else the folder name (%b).
# %c number of characters (bytes) in the message
# %C current message number
# %d date and time of the message in the format specified by ``date_format''
# converted to sender's time zone
# %D date and time of the message in the format specified by ``date_format''
# converted to the local time zone
# %e current message number in thread
# %E number of messages in current thread
# %f entire From: line (address + real name)
# %F author name, or recipient name if the message is from you
# %i message-id of the current message
# %l number of lines in the message
# %L list-from function
# %m total number of message in the mailbox
# %M number of hidden messages if the thread is collapsed.
# %N message score
# %n author's real name (or address if missing)
# %O (_O_riginal save folder) Where mutt would formerly have stashed the message:
# list name or recipient name if no list
# %s subject of the message
# mutt_datos status of the message (N/D/d/!/r/*)
# %t `to:' field (recipients)
# %T the appropriate character from the $to_chars string
# %u user (login) name of the author
# %v first name of the author, or the recipient if the message is from you
# %y `x-label:' field, if present
# %Y `x-label' field, if present, and (1) not at part of a thread tree, (2) at the top of a thread,
# or (3) `x-label' is different from preceding message's `x-label'.
# %Z message status flags
# %{fmt} the date and time of the message is converted to sender's time zone,
# and ``fmt'' is expanded by the library function ``strftime''; a leading bang disables locales
# %[fmt] the date and time of the message is converted to the local time zone,
# and ``fmt'' is expanded by the library function ``strftime''; a leading bang disables locales
#%(fmt) the local date and time when the message was received.
# ``fmt'' is expanded by the library function ``strftime''; a leading bang disables locales
#% the current local time. ``fmt'' is expanded by the library function ``strftime'';
# a leading bang disables locales.
#%>X right justify the rest of the string and pad with character "X"
#%|X pad to the end of the line with character "X"

###########
#Examples #
###########

#set index_format="%C %Z %-15.15t %-40.40s %e %D "
#set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s %e %?M?(#%03M)&(%4l)? %L"
#set index_format="%4C %Z %-21.21F (%3l) %s"
#set index_format="%4C %Z %{%b %D} %-15.15L (%4l) %e %E %s"
#set folder_format="%2C %t - %a %N %F %2l %-8.8u %-8.8g %8s %d %f"
#set index_format="%4C %-11.11D mutt_datos %-21.21n (%3l) %s
#set index_format="%4C %-11.11d mutt_datos %-21.21n (%3l) %s
#set index_format  "%4C %Z %{%b %d} %-15.15F (%4l) %s"
set index_format="%4C %11d [mutt_datos] %n %s

# Macros
macro index Q "|/usr/bin/spamassassin -r" "Envia reporte"
macro index S "|/usr/bin/sa-learn --spam" "Clasifica como spam"
macro index H "|/usr/bin/sa-learn --ham --sync --single" "Clasifica como ham"
macro index X |~/bin/spam.sh\n 
macro pager X |~/bin/spam.sh\n 
bind pager <up> previous-line
bind pager <down> next-line


# Listas
subscribe debian-user-spanish
subscribe Lliurex_general
subscribe EX-TEX

# default folder hooks
folder-hook . set sort=threads
folder-hook . set signature=~/firmagva.txt
folder-hook . 'set attribution="%n [%d]:"'
folder-hook . my_hdr From: "Paco Aldarias Raya <faldarias526v@cv.gva.es>"
folder-hook . my_hdr Reply-To:  "Paco Aldarias Raya <faldarias526v@cv.gva.es>"
folder-hook . my_hdr Organization: Casa
folder-hook . my_hdr X-Operating-System: `uname -mnrs`
# ignore irritating mesg generated by cclient (uw-imapd / pine)
# folder-hook . "push \"l!(~s 'FOLDER INTERNAL DATA')\n*\""

# default folder hooks
folder-hook lliurex set sort=threads
folder-hook lliurex set signature=~/firma.txt
folder-hook lliurex 'set attribution="%n [%d]:"'
folder-hook lliurex my_hdr From: "Paco Aldarias Raya <faldarias526v@cv.gva.es>"
folder-hook lliurex my_hdr Reply-To:  "Paco Aldarias Raya <faldarias526v@cv.gva.es>"
folder-hook lliurex my_hdr Organization: Casa
folder-hook lliurex my_hdr X-Operating-System: `uname -mnrs`


# default folder spetex
folder-hook spetex set sort=threads
folder-hook spetex set signature=~/firmalinux.txt
folder-hook spetex 'set attribution="%n [%d]:"'
folder-hook spetex my_hdr From: "Paco Aldarias Raya <faldarias526v@cv.gva.es>"
folder-hook spetex my_hdr Reply-To:  "Paco Aldarias Raya <faldarias526v@cv.gva.es>"
folder-hook spetex my_hdr Organization: Casa
folder-hook spetex my_hdr X-Operating-System: `uname -mnrs`

##
# Firma
##
#
set signature = ~/firmagva.txt

##
# Libreta de direcciones
##
#
set alias_file = ~/.mutt/aliases # Pulsa a


# View html mails using lynx
set implicit_autoview
auto_view text/html  application/x-pgp-message
set mailcap_path="~/.mailcap"
set mailcap_sanitize=yes

# Teclas
macro generic <f1> "!nano /usr/doc/mutt/manual.txt\n" "Show Mutt documentation"
macro index   <f1> "!nano /usr/doc/mutt/manual.txt\n" "Show Mutt documentation"
macro pager   <f1> "!nano /usr/doc/mutt/manual.txt\n" "Show Mutt documentation"

Índice de Materias

Sobre este documento...

Cliente de correo electronico en modo texto: mutt

This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html mutt -split 0 -local_icons 1 -show_section_numbers -no_auto_link -no_navigation

The translation was initiated by on 2006-01-19


2006-01-19