dot/muttrc: New configuration files for Mutt.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 3 Mar 2014 22:17:17 +0000 (22:17 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 3 Mar 2014 22:18:54 +0000 (22:18 +0000)
The configuration is split into common stuff suitable for all
environments, configuration specific to distorted.org.uk, and
authentication secrets which aren't distributed here.

dot/muttrc [new file with mode: 0644]
dot/muttrc.local.distorted [new file with mode: 0644]
setup

diff --git a/dot/muttrc b/dot/muttrc
new file mode 100644 (file)
index 0000000..04949c4
--- /dev/null
@@ -0,0 +1,43 @@
+### -*-muttrc-*-
+###
+### Configuration for Mutt.
+
+###--------------------------------------------------------------------------
+### Local configuration stuff.
+
+source ~/.muttrc.auth
+source ~/.muttrc.local
+
+###--------------------------------------------------------------------------
+### System things.
+
+## Debian Mutt sets this from /etc/mailname, but it gets used (a) in
+## message-ids and (b) as the SMTP `HELO' name, both of which are obviously
+## wrong.  Set it from the proper hostname.
+set hostname=`hostname -f`
+
+###--------------------------------------------------------------------------
+### Mail fetching.
+
+## General IMAP hacking.
+set imap_delim_chars=/
+set imap_idle=yes
+
+###--------------------------------------------------------------------------
+### Mail submission.
+
+## Composition.
+set autoedit=yes
+set edit_headers=yes
+set use_domain=no
+set record=+mail.sent
+
+## Replies.
+set attribution="%n <%a> wrote:\n"
+set include=yes
+
+## Postponed messages.
+set postpone=ask-no
+set postponed=+Drafts
+
+###----- That's all, folks --------------------------------------------------
diff --git a/dot/muttrc.local.distorted b/dot/muttrc.local.distorted
new file mode 100644 (file)
index 0000000..eab2f08
--- /dev/null
@@ -0,0 +1,39 @@
+### -*-muttrc-*-
+###
+### Configuration for Mutt specific to distorted.org.uk
+
+###--------------------------------------------------------------------------
+### IMAP configuration.
+
+## Local mail.
+account-hook ^imap://mail\.distorted\.org\.uk \
+       'set imap_user=mdw; set imap_pass=$my_distorted_mail_passwd'
+set my_distorted_imap=imap://mail.distorted.org.uk/
+set spoolfile=$my_distorted_imap
+set folder=$my_distorted_imap
+mailboxes $my_distorted_imap
+
+## Google mail.
+account-hook ^imaps://imap\.gmail\.com \
+       'set imap_user=distorted.mdw@gmail.com; set imap_pass=$my_gmail_passwd'
+mailboxes imaps://imap.gmail.com/
+
+###--------------------------------------------------------------------------
+### SMTP configuration.
+
+## Submit to the main mail server.
+set smtp_url=smtp://mdw@mail.distorted.org.uk:587/
+set smtp_pass=$my_distorted_mail_passwd
+
+###--------------------------------------------------------------------------
+### Other issues.
+
+alternates -group me \
+       ^mdw([-+][^@]*|)@distorted\.org\.uk$ \
+       ^(markw|mdw)([-+][^@]*|)@odin\.gg$ \
+       ^distorted\.mdw@(google|g)mail\.com$
+
+alternates -group admin \
+       ^(root|postmaster|abuse)@distorted\.org\.uk$
+
+###----- That's all, folks --------------------------------------------------
diff --git a/setup b/setup
index d1393df..c15f062 100755 (executable)
--- a/setup
+++ b/setup
@@ -135,7 +135,7 @@ dotfiles="
   emacs emacs-calc vm gnus.el ercrc.el
   vimrc mg zile lesskey
   ditz-config
-  mailrc signature
+  mailrc signature muttrc
   cgrc tigrc
   gdbinit
   guile