Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the easiest way to block a certain email address from sending you messages in Gnus?

share|improve this question
up vote 2 down vote accepted

The easiest way without using external programs or writing dozens lines of elisp code is to use splitting.

Let's say your spammer is named John Smith after the well-known Time Lord, and you store your mail in a group called mail.misc. Just put this in load path:

(setq nnmail-split-methods
       '(("mail.spam" "^From:.*John Smith.*")
         ("mail.misc" "")))

The second string inside the alist item is a regular expression.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .