procmail
[Top] [All Lists]

Re: All my mail ends up in this folder, is that correct?

1997-09-16 10:26:11
Andreas Sikkema asked,

| Why ends all my mail up in this folder?

| This is the recipe:
| # required headers
| :0:
| * ^From:
| * ^(Apparently-)?To:
| * ^Date:
| spam.headers

All mail goes into that folder because that recipe matches all legitimate
mail and most spam.

| I copied this from the spam recipes that were posted earlier this week,
| but I modified it slightly to save every email in a specified folder
| in stead of bouncing the message.

More likely the idea was to mark something as spam if it is missing any of
those headers, like this:

  # required headers
  :0
  * ^From:
  * ^(Apparently-)?To:
  * ^Date:
  { }
  :0E:
  spam.headers

That will put mail into $MAILDIR/spam.headers if it has no From: header OR
if it has no Date: header OR if it has neither a To: nor an Apparently-To:. 
Mail that has From:, Date:, and To: (or From:, Date:, and Apparently-To:)
will slip on past and procmail will go on reading later recipes to figure
out what to do with it.