[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [vps-mail] procmailrc and includerc question



Thanks Scott. Now the million dollar question...

Any idea whether I can put the formail command in the INCLUDERC file? In
other words, so the include file looks like this:

--------------
:0:
* 1^0 ^Subject: .*\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
* 1^0 ^Subject: .*A better option than bankruptcy
* 1^0 ^Subject: .*all computer uses need this
...other rules....

#Tag header with spam notice
{
    :0 hfi
    |formail -I "X-Spam-Reason: Spam in email subject"
} 
--------------


Currently that include file looks like this:
--------------
:0:
* 1^0 ^Subject: .*\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.
* 1^0 ^Subject: .*A better option than bankruptcy
* 1^0 ^Subject: .*all computer uses need this
...other rules....
$HOME/spam
----------------

Thanks,

Jim Smith


> -----Original Message-----
> From: owner-vps-mail@xxxxxxxxxxxxx 
> [mailto:owner-vps-mail@xxxxxxxxxxxxx] On Behalf Of Scott Wiersdorf
> Sent: Wednesday, March 07, 2007 10:56 AM
> To: vps-mail@xxxxxxxxxxxxx
> Subject: Re: [vps-mail] procmailrc and includerc question
> 
> On Wed, Mar 07, 2007 at 09:26:27AM -0500, Jim Smith wrote:
> > For that longwinded reason <grin>, I'd prefer to use 
> procmail rather than SA
> > (plus it uses a lot less resources for that). That is also 
> the reason I'd
> > rather have it in the header of the email rather than using Scott's
> > suggestion of looking through a variety of log files 
> (verbose ones at
> > that!). 
> 
> Then you were on the right track. Perhaps something like this:
> 
>   ## remove any pre-existing headers of this kind for safety
>   :0 hfi
>   | formail -I "X-Spam-Reason:"
> 
>   :0
>   * some condition
>   * other condtion
>   {
>     :0 hfi
>     |formail -I "X-Spam-Reason: some condition"
>   }
> 
>   :0
>   * another condition
>   {
>     :0 hfi
>     |formail -I "X-Spam-Reason: another condition"
>   }
> 
>   ## any emails with our spam header get canned
>   :0:
>   * 1^0 H ?? ^X-Spam-Reason:
>   $HOME/Spam
> 
> This hasn't been tested, btw, but should be pretty close.
> 
> Scott
> -- 
> Scott Wiersdorf
> <scott@xxxxxxxxxxxx>
> ==============================================================
> ==========
> This is <vps-mail@xxxxxxxxxxxxx>  
> <http://groupmail.org/lists/vps-mail/>
> Before posting a question, please search the archives (see above URL).
> 

========================================================================
This is <vps-mail@xxxxxxxxxxxxx>  <http://groupmail.org/lists/vps-mail/>
Before posting a question, please search the archives (see above URL).


Main Index | Thread Index
Match: Format: Sort by:
Search: