Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th May 2011
qmemo's Avatar
qmemo qmemo is offline
Shell Scout
Join Date: Jul 2008
Location: Egypt
Posts: 133
Thanked 0 Times in 0 Posts
Post small guide on mutt & fdm


## .fdm.conf
## Accounts and rules for:
#> mail1
#> mail2
## Last edit 05-16-2011

# Catch-all action (mbox):  //if you use something other than mutt
# action "inbox" mbox "%h/mail/INBOX"  
# Catch-all action (maildir):
# mutt prefers capital letters for folder names
 action "mail1-deliver" maildir "%h/Mail/Mail1"
 action "mail2-deliver" maildir "%h/Mail/Mail2"
account "mail2" imaps server "imap.someserver.com"
        user "mail1" pass "secret"

account "mail2" imaps server "imap.someserver.com"
        user "mail2" pass "secret"

# Match all mail and deliver using the 'inbox' action.
match account "mail1" action "mail1-deliver"
match account "mail2" action "mail2-deliver"
match all action "inbox"
one line to create them all

chmod ~/.fdm.conf 600; mkdir -p Mail/Mail1/INBOX/{new,cur,tmp}; mkdir -p Mail/Mail2/INBOX/{new,cur,tmp}; chmod -R 700 ~/Mail/*
now you can test using fdm -kv fetch, if it's working as it should; then add that action to your crontap

$ crontab -e
*/15 * * * * fdm fetch >> ~/Mail/fdm.log
I relayed heavily on this guide

And now for mutt, my setup is two accounts


 ## my default identity   //this will be your default
set realname = "User 1"
set from = "mail1"
set hostname = `hostname`
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates

set spoolfile = "$HOME/Mail/Mail1/"
set postponed ="$HOME/Mail/Mail1/postponed"
set record = "$HOME/Mail/Mail1/sent"

set smtp_url= smtp://mail1@smtp.someserver.com:587/
set smtp_pass = "secret"

save-hook . =mail1.`date +%Y`

## when I change into my work folder, become my work ident.
## when I leave it, become my home ident
## I add this to give hints if you have more than one account,
##if more use the '.' to make one of the folder-hooks the default
#folder-hook . 'source ~/.mutt/ident-mail1'  
folder-hook Mail2 'source ~/.mutt/ident-mail2'

# This is the key bindings I use to switch between accounts
bind editor <space> noop
macro index ga "<change-folder>=Mail2<enter>" "Go to M2 inbox"
macro index gs "<change-folder>=Mail1<enter>" "Go to Mail1 inbox"

# Header stuff
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc

ignore *
unignore from: date subject to cc
unignore x-mailing-list: posted-to:
unignore x-mailer:

# For better looks
set markers=no # don't put '+' at the beginning of wrapped lines
set pager_index_lines= 5 # how large is the index window?
set sort = 'threads'
set sort_aux = 'last-date-received'

# My Editor
set editor='vim + -c "set textwidth=72" -c "set wrap" -c "set nocp" -c "?^$"'

## my identity
set realname = "mail2"
set from = "mail2@somemail.com"
set hostname = `hostname`
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates

set spoolfile = "$HOME/Mail/Mail2/"
set postponed ="$HOME/Mail/Mail2"
set record = "$HOME/Mail/Mail2/sent"

set smtp_url= smtp://mail2@smtp.someserver.com:587/
set smtp_pass = "secret"

save-hook . =mail2.`date +%Y`
final step

mkdir -p .mutt/cache; chmod .muttrc 700
fire up mutt and enjoy


Last edited by qmemo; 18th May 2011 at 12:23 AM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mutt & fdm qmemo General software and network 25 16th May 2011 07:23 AM
Mutt and SASL divadgnol67 OpenBSD Packages and Ports 3 11th March 2011 04:48 PM
Release of Linenoise, a small BSD licensed alternative for GNU readline J65nko News 1 22nd March 2010 10:41 PM
One small question about portupgrade (and yes I HAVE read the man-pages!) wubrgamer FreeBSD Ports and Packages 7 20th September 2008 12:45 AM
help with mutt cssgalactic FreeBSD General 3 2nd August 2008 07:25 AM

All times are GMT. The time now is 02:28 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick