Re: [exim] Don't send certain emails

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Stanislaw Halik
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Don't send certain emails
On Fri, May 25, 2007, Anthony Honeyfield wrote:
> We currently use Exim because it allows us to filter emails to capture a
> 'job code' users must include in the first line of any email. We use this
> information to keep track of how many emails we send per job, and their size
> (in kB), to allow for billing. All this is achieved by using filtering to
> parse emails through a custom Python script.


Strange approach. I would account for their mail in acl_check_data by
using $authenticated_id.

> 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}}


HTH

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