Re: [exim] Don't send certain emails

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Stanislaw Halik
Date:  
À: exim-users
Sujet: Re: [exim] Don't send certain emails
On Mon, May 28, 2007, Anthony Honeyfield wrote:

>>> Is there a way to ensure that if no job code is included, the email
>>> will not be sent?


>> localpartlist jobcode = some-lookup


>> acl_check_data:


>> deny condition = ${if match_local_part{$authenticated_id}{+jobcode}}
>> !condition = ${if
> match{$message_body}{^${some-lookup-fetching-regexp-parsable-job-code}\n}}


> Thanks for your help. Currently we place the job code in the first line of
> the email. It is written as a 3 digit number, enclosed by a hash and dash
> ie. #000-


> I have written a regexp for this format as:


> /^#[0-9]{3}-$/


> I'm not sure from your email how I get exim to find just this expression in
> the content of the email, or if you are suggesting something else.


Try ${if match{$message_body}{(?s)^#[0-9]{3}-\n}}

> I'm also not sure what the $authenticated_id part is doing.


You probably don't want to require email from root et al to have job
codes, do you?

-- 
Whenever you find that you are on the side of the majority, it is time
to reform.
                -- Mark Twain