Jump to content

Mutt: Difference between revisions

2,764 bytes added ,  Yesterday at 12:51
no edit summary
No edit summary
 
(8 intermediate revisions by 6 users not shown)
Line 2: Line 2:


== Reading your mail ==
== Reading your mail ==
Mutt is the default mail program on RedBrick. To start it, simply type "email" into your terminal and hit return.
Mutt is the default mail program on RedBrick. To start it, simply type "mutt" into your terminal and hit return.
 
[[Image:mutt1.jpg]]


When you start mutt with its default settings you will taken to your default mailbox. Here you will see a list of all your email split into columns. The first column shows the status of the mail, "N" for new mail, "O" for unread and blank for previously read mail. The next columns contains the number of the mail in the list, the date the mail was received followed by the sender's name. The final column displays the subject of the mail. A highlight bar will show which mail is currently selected.
When you start mutt with its default settings you will taken to your default mailbox. Here you will see a list of all your email split into columns. The first column shows the status of the mail, "N" for new mail, "O" for unread and blank for previously read mail. The next columns contains the number of the mail in the list, the date the mail was received followed by the sender's name. The final column displays the subject of the mail. A highlight bar will show which mail is currently selected.
Line 30: Line 32:
While viewing the email list, highlight the desired mail, and press "d". The mail is now marked to be deleted. If you wish to delete it immediately, press the $ key (shift and 4). You will be prompted to confirm deletion, hit "y" to delete or "n" to cancel. Otherwise, you will be prompted to confirm deletion when you exit the program.
While viewing the email list, highlight the desired mail, and press "d". The mail is now marked to be deleted. If you wish to delete it immediately, press the $ key (shift and 4). You will be prompted to confirm deletion, hit "y" to delete or "n" to cancel. Otherwise, you will be prompted to confirm deletion when you exit the program.


If you wish to undelete a mail, highlight it and press "u"
If you wish to undelete a mail, highlight it and press "u".


Forwarding an email
== Forwarding an email ==
To send a mail you have received on to another person, highlight the mail and press "f".


To send a mail you have recieved on to another person, highlight the mail and press "f".
You'll have the same options as when you are sending a normal mail. When your editor opens, it will contain the mail you are forwarding and you may add extra text and change it if you wish, or simply leave it as it is. Save and send the message as before.


You will see the same options as when you are sending a mail
== Setting a signature ==
A signature is generally a piece of text, a quote, details or whatever that people add onto the end of their mail at the bottom. You can set this permanently by creating a .signature file that gets added on to every mail you send.


When your editor opens it will contain the mail you are forwardin
To create one, type:


You may add extra txt if you wish or simply leave it as it is
nano ~/.signature


Save and send the message in the usual way
Add in whatever you'd like to be in your signature and save it. Mutt will now add this to all outgoing mails from you.


== Setting a signature ==
== Exiting mutt ==
 
To quit mutt, just press the "q" key while in the mail list. If you're asked to confirm, then hit "y" or "n".
 
== Mailboxes ==
 
You can also sort all your incoming mail into categories, making things easier to find and read. There are a few steps involved in setting this up, but once they're done you don't have to worry about it anymore. The first step is to create new mailboxes, to do so all you have to do is type "nano ~/.muttrc" (or replace nano with your favourite text editor)
 
[[Image:mutt2.jpg]]
 
There won't be much here (well anything actually) but we can soon change that.
 
[[Image:mutt4.jpg]]
 
In the above, what we've done is created four different mailboxes (you can have more if you want) - inbox, spamtrap, gmail and sent. We've also set it so that every mail you send is copied and saved in an inbox called sent.
 
Once this is done, you will need to cd to ~/Maildir and type "mdmake <mailbox name>" to create it. You will have to do this separately for each one.
 
You should now start mutt by typing "mutt -y". This will give you a list of all your mailboxes when the program starts. Simply highlight a mailbox and hit return to view it's contents.
 
[[Image:mutt5.jpg]]


A signature file is a normal text file that gets added on to the bottom of every mail you send


To create one type
To switch to another mailbox hit "c" and enter = followed by the name of the name of the mailbox: =helpdesk. Alternatively, hit "c" and then hit "?" to see a list of all mailboxes. To return to the original mailboxes list hit the tab key.


nano ~/.signature


Add in whatever text you would like added to the bottom of your emails and save in the usual way
However none of your mails are currently being filtered, you've just created the mailboxes. To start the filter process you're going to have to use procmail. To do this you're going to have to type "nano ~/.procmailrc" at the termainl (as in the picture above).


Thats it,mutt will now add that text to the bottom of all sent mails
[[Image:procmailrc.jpg]]


== Exiting mutt ==
It may look like a lot at first, but most of it is the same type of thing again and again. It's basically checking for spam and putting it in the spam folder (Instead of deleting the "spam" mail, we are going to redirect it to a mail folder of its own so that you can occasionally check if it really is spam.) or checking the To/From/Subject fields and matching them to other inboxes. The bit at the very end sets inbox as the mailbox that all the mail that doesn't match any of the other criteria will go to. You may also want to set a more suitable USER= (perhaps your own account name)


To exit Mutt press the "q" key whilst in the main mail list
You can also type "man procmail" at the terminal for more information.


You may be asked a number of yes/no question


Answer them with "y" or "n" and then hit return


== Mailboxes ==
Another [http://www.redbrick.dcu.ie/help/tutorials/spam/procmailrc example] or [http://www.redbrick.dcu.ie/~receive/configfiles/procmailrc two] of procmailrc here


If you are using [[procmail]] and have a number of mailboxes you should start mutt by typing mutt -y
== Using mutt to read your gmail with IMAP ==


This will give you a list of all your mailboxes when the program starts
=== Proxy ===
Mutt will need to be launched with <tt>tsocks</tt> to get around the DCU proxy.
alias mutt='tsocks mutt'


Simply highlight a mailbox and hit return to view it's contents
=== muttrc ===
set from = "Your Name <your_email@gmail.com>"
set imap_user = "your_email@gmail.com"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "=INBOX"
set postponed = "=[Gmail]/Drafts"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set move = no
set pager_index_lines=10
set sort=threads
set markers=no
set timeout=300
macro index q '<change-folder>?<toggle-mailboxes>'
macro browser q '<exit><quit>'
bind index G imap-fetch-mail
bind browser G check-new
mailboxes =INBOX =Facefuck =rb


To switch to another mailbox hit "c" and enter = followed by the name of the name of the mailbox: =helpdesk


Alternatively hit "c" and then hit "?" to see a list of all mailboxes


To return to the original mailboxes list hit the tab key located just above Caps Lock
[[Category:Archive]]