WebFaction
Community site: login faq

Hi, I have been fruitlessly and frustratingly trying to set up a few simple procmail rules, to reject mail from specific addresses. sorry, but I have no time, nor wish to learn all the procmail syntax. Moreover, I fail to understand whether, how and where I could create a specific procmail file. I would be happy adding a few effective instructions for my mailbox, in the box that opens when I click edit next to my mailbox.

I have looked for some ready made recipes but haven't been able to find any quick and dirty way to just reject all mail coming from xx@yyy.zz

This question is marked "community wiki".

asked 04 Dec '11, 02:03

pieemme
111
accept rate: 0%


Procmail is very powerful, but at the cost of complexity. A minor syntax error can cause all e-mail to be bounced and lost and so unless you are familiar with it you should not use it for SPAM filtering and protection. Using SpamAssassin and filtering in your e-mail client works well, is much less complex, and is not as dangerous with losing e-mails. We provide a link to some good procmail recipes in our documentation. However useful documentation for procmail would not belong in the control panel as a popup, it is a tool that requires time to learn to not be dangerous.

permanent link

answered 04 Dec '11, 02:51

johns
5.4k412
accept rate: 23%

edited 04 Dec '11, 08:23

seanf
12.2k42136

I should also note, you can not create a procmail file since it requires access we do not grant to users. You would have to place the rules within the form in the control panel.

(04 Dec '11, 02:54) johns

If you want to discard all messages from xx@yyy.zz, the rule (placed in the "manual procmailrc" field for your mailbox in the control panel) would be:

:0:
* ^From:.*\<xx@yyy\.zz\>
/dev/null

This is a variation on our Filtering by Sender example, using ".*\<xx@yyy\.zz\>" as the regular expression (ie, the pattern) to match, and "/dev/null" as the location to which the message should be moved. We have some more examples here: Managing Email Automatically.

Note that if you choose to use manual procmailrc rules on your mailbox, this will override all of the spam-related settings on your mailbox. So, for example, if you have "enable spam protection" checked for your mailbox and are filtering spam to a folder named "Spam", you will need to re-implement that as a procmail rule, like this:

:0:
* ^X-Spam-Level: \*\*\*\*\*
.Spam/

Finally, as John mentioned in his answer, procmail is a powerful tool, and if you're not careful with the syntax, you might end up losing mail or moving it to the wrong location. The examples I've provided should work, but be sure to test them thoroughly.

Hope that helps!

permanent link
This answer is marked "community wiki".

answered 04 Dec '11, 08:53

seanf
12.2k42136
accept rate: 37%

wikified 04 Dec '11, 09:24

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×70
×1
×1

question asked: 04 Dec '11, 02:03

question was seen: 4,254 times

last updated: 04 Dec '11, 09:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM