Mutt
Mutt rocks.
So I can really go into this, but quickly here is a configuration file you can alter. Remember if you don't save it as .muttrc you can still just use another method to invoke it.
Example:
$ LOCAL_CONFIG="NAME" mutt
This is if you have more than one e-mail account. So in our actual ~/.mutt/muttrc file we have:
source ~/.mutt/muttrc.local.$LOCAL_CONFIG
Yup, that's all we have. The LOCAL_CONFIG environment variable determines what we actually are working with, but needless to say, that file needs to exist. Now, let's pretend we have a Gmail account and want to use IMAPS and SMTPS. Here's an example config files contents (you can use this, just put in your e-mail address and your password):
# Set from e-mail address. (doesn't have to be caps, I did that to get your attention) set from="USERNAME@GMAIL.COM" ########################################### # IMAP settings set imap_user=USERNAME@GMAIL.COM # Notice lack of quotes for password... don't ask, I don't know, it works. set imap_pass=PASSWORD set my_imap_server=imap.gmail.com ########################################### # SMTP # NOTE: to get this to work, I had to install the libsasl2-modules package set smtp_pass='PASSWORD' set smtp_url="smtps://USERNAME@GMAIL.COM:$smtp_pass@smtp.gmail.com:465/" ########################################### # Mailboxes set spoolfile=imaps://$my_imap_server/INBOX # Default inbox set folder=imaps://$my_imap_server/ # Default location of mailboxes set postponed="imaps://$my_imap_server/[Gmail]/Drafts" set record="imaps://$my_imap_server/[Gmail]/Sent Mail" ########################################### # Miscellaneous set mail_check=300 # How often to check in seconds set header_cache=~/.mutt/hcache/fastmail # Header caching directory mailboxes imaps://$my_imap_server/INBOX
Save that file as ~/.mutt/muttrc.local.USERNAME@GMAIL.COM
Actually, you can save it as whatever you want, but just do it.
Then use an alias or something like..
alias mygmail="LOCAL_CONFIG='USERNAME@GMAIL.COM' mutt"