Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Running Mutt w/Maildirs (not IMAP) on TxD servers via ssh (See related posts)

I modified Pteron's muttrc file to use my local Maildir rather than login via IMAP.

This is A) Faster/better since it cuts out the bother of an imap connection to localhost and accesses your mail directly, B) It actually works (the imap method always failed on a segfault for me at least), C) You gotta like not having to store your username/password in the clear since there's no imap login to perform D) More responsive than webmail for quick email checks, and works even when webmail doesn't.

To use, change the realname line and save with filename ".muttrc"; upload this to your home directory, then login via ssh and type "mutt".

# For TextDrive accounts (running mutt on the server)

set mbox_type=Maildir
set folder="~/Maildir/"
set spoolfile="~/Maildir/"
set mask="!^\\.[^.]"
set record="+.Sent"
set postponed="+.Drafts"

set realname="Yourname"

mailboxes `\
echo -n "+ "; \
for file in ~/Maildir/.*; do \
  box=$(basename $file); \
  if [ ! $box = '.' -a ! $box = '..' -a ! $box = '.customflags' \
      -a ! $box = '.subscriptions' ]; then \
    echo -n "+$box "; \
  fi; \
done`

macro index c "?" "open a different folder"
macro pager c "?" "open a different folder"

set allow_8bit  # Don't do any Quoted-Printable encoding on 8-bit data!
set copy=yes    # Ask me if I want to save a copy of my outgoing messages.
set delete=yes
set noaskcc
set nomark_old
set reverse_alias
set reverse_name
set reply_to
set attribution="On %d, %n wrote:"
set envelope_from
set noconfirmappend
set print=ask-no
set print_cmd="echo Nix printi printi!"
set nosave_empty
set sort=threads
set read_inc=10
set write_inc=10
set noprompt_after
set status_format="%r %v [%?M?%M/?%m] %?n?%n new, ?%?p?%p postponed, ?%?t?%t +tagged, ?%?d?%d delet ed, ?(%h:%f) %?b?%b more to go.?%> %r"

#set alias_file="~/.aliases"
set quote_regexp="^([A-Za-z ]+>|[]>:|}-][]>:|}-]*)"
set include
set hdr_format="%4C %Z %{%b %d} %-15.15n (%4l) %s"
set nomove
set tilde
set noautoedit
set pager_context=1
set pager_stop
set pipe_decode
set postponed="+postponed"
set to_chars="b .c>"

set fast_reply

color header brightcyan black .
color header yellow black Subject:
color body brightyellow black [_a-z\.\$A-Z0-9-]+@[a-zA-Z0-9\./\-]+
color body yellow black (http|ftp)://[_a-zA-Z0-9\./~\-]+
color quoted green black
color signature brightblue black
color attachment yellow black
color tree red black
color indicator black cyan
color status yellow blue
color tilde blue black

bind pager 'w' previous-page
bind pager 'j' next-line
bind pager 'k' previous-line
bind index '#' tag-entry
bind index '{' previous-thread
bind index '}' next-thread

# Headers to ignore
ignore *
unignore date from to cc subject x-mailer resent-from reply-to

Comments on this post

odinsdream posts on May 09, 2006 at 02:03
Any idea how this can be used to read mail for accounts other than the main login? Since I cannot log in via SSH with the sub-accounts, and cannot switch to them with su, what can I do?

You need to create an account or log in to post comments to this site.


Related Posts