| |
|
 |
Using Emacs for reading mail - Part 1
|
Configuring POP3
A lot of you probably use pop3 for reading mail, I'll explain how you can do this with Emacs.
The first thing you need to do is to make Gnus read the local mail box since it is used for storing the mail from the remote pop3 server.
You do this by setting the gnus-secondary-select-methods variable, we set it to:
(setq gnus-secondary-select-methods
'((nnml "private"))) | You can test this by sending a mail to yourself (replace myname with your local user name).
echo "testmail" | mail -s "testmail" myname | and rereading the .gnus file by pressing r. Then press g to refresh the groups.
You should then get a group called nnml+private:mail.misc with one mail in it, this means you're ready for step two.
You now need to supply where gnus should fetch the mail, this is done by setting the mail-sources variable, for instance:
(setq mail-sources
'((file)
(pop :server "pop3.mail.server"
:user "pop3.user"
:password "secret"))) | This will add the local file and a pop3 server as incoming mail. pop3.mail.server is the server where you fetch the mail, pop3.user is the user on the pop3 server and secret is the password for your user on the pop3 server. You can safely omit the :password if you don't want store the password in a text file, in this case you will be asked for a password on each Gnus session.
You can also supply more than one pop3 server if you wish, for instance:
(setq mail-sources
'((file)
(pop :server "pop3.mail.server"
:user "pop3.user"
:password "secret")
(pop :server "other.mail.server"
:user "other.user"))) |
The next thing you probably want to do is to filter your mails into various subgroups, luckily for you Gnus can do that too.
Filtering is controlled by the nnmial-split-methods variable, for instance to move all mail from a specific person to a junk group you would do:
(setq nnmail-split-methods
'(("junk" "^From:.*Bill Gates")
("other" ""))) | The filter variable consists of a list of filter rules, each rule consists of a mail group ("junk" in the example) and a Regular Expression("^From:.*Bill Gates" in the example). For more information on regular expressions I suggest you read this article.
In this example we move all mail which come from some guy called Bill Gates to the group junk and all other mail to the group other.
Comment List
There are no comments.
|
 |
|
|