Re: [exim] .procmailrc to move messages from folder

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Jonathan Vanasco
Data:  
Para: Jonathan Gonzalez
CC: exim-users
Asunto: Re: [exim] .procmailrc to move messages from folder

you can do a string expansion in the transport on the directory

hide directory = ${lookup ldap {QUERY HERE} {$value${if eq
{${substr_0_3:$header_X-Spam-Status:}}{Yes}{.spam-probable}{}}}

In that example:
    I pull the directory out of the ldap server
    Then I look at the X-Spam-Status header
        if spamassassin set it to Yes, then it goes to the .spam-probable 
subdirectory of inbox
        if not, it just goes to the inbox


In your example, you'd do something like
     {$value${if eq 
{${substr_0_5:$header_Subject:}}{[SPAM}{.spam-probable}{}}}
I think there might be a shortcut for $header_Subject , and you'd 
probably want to do a case insensitive check
I don't remember if [ needs to be escaped in substring checks


You'll have to consult the exim specification on string expansions to
learn more

that section covers some really powerful and useful things - there are
many ways to approach your problem with exim


On Jul 21, 2005, at 4:45 PM, Jonathan Gonzalez wrote:
> Jonathan Vanasco wrote:
>> If exim is tagging the [SPAM onto the message, then procmail is not
>> needed, you can just test the message header in exim and deliver to
>> the appropriate mailbox
>
> how can i achieve this???
>
> TIA,
>
> jonathan