Re: [Exim] post processing possible?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Wayne Sheppard
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] post processing possible?
This is a cryptographically signed message in MIME format.
--
Thanks for the response, but let me be more clear. Our goal is this:
1. Only mail that passes a user's .forward filter rules is saved.
2. All other mail is blackholed.
3. Since we only save mail that the user actually wants, we have
developed notification mechanisms that should be triggered when a new
mail arrives.

Currently in user's .forward file we may have:

# Exim filter
if $header_subject: contains "keepme" then unseen save
/var/spool/mail/$local_part endif
if $header_subject: contains "keepme" then pipe "/usr/bin/client
$local_part" endif
# Message Subject Contains: keepme
seen finish

So what I thought would happen is:
1. save mail ('save /var/spool/mail/$local_part')
2. alert external process that this user has mail waiting (pipe
/usr/bin/client/$local_part)

I now understand that this isn't the case, and I can say what I want in
the .forward file, the mail doesn't get saved to disk until further
downstream. This means that certain email (with large attachments for
instance) aren't there when the "client" program tries to retrieve them.

So I'm trying to figure out exactly where in the Exim flow we should
pipe/exec the client program that a mail is waiting for user 'X'. Given
that I'm as thick as two short planks, examples are a beautiful thing.

Maybe this isn't even a good idea to try to do with Exim, in which case
any feedback on simple alternatives would be welcome.

I don't want to resort to a polling sort of thing unless there is no
other way to reliably accomplish this goal.

Thanks again, I appreciate the assistance.
Wayne

Philip Hazel wrote:

>On Mon, 18 Nov 2002, Wayne Sheppard wrote:
>
>
>
>>I want to execute a progam and pass the username as an argument *after*
>>the email has been accepted (i.e. after passing filter rules) and
>>written to disk. How would this be accomplished, or is it even possible
>>in Exim 4.x?
>>
>>
>
>If by "filter rules" you are talking about the system filter, you should
>note that this is run at the start of delivery, not during message
>reception.
>
>If the action you want is
>
> accept message, write to disk
> run special program
> do delivery
>
>then you can either run the program from a system filter (run once per
>message per delivery attempt), or you could probably do something with a
>router and a condition (run once per recipient per delivery attempt). In
>both cases, you could limit it to the first delivery attempt.
>
>But it depends on what you mean by "username". If you are talking about
>the recipient of a message, note that a single message may have more
>than one recipient.
>
>
>


--
Cheers,

Wayne Sheppard
720-849-9980
CTO
Corybant, Inc.
www.corybant.com
"Go for a hike, and stay in the loop!"
..Iveena
www.Iveena.com


--
Content-Description: S/MIME Cryptographic Signature

[ smime.p7s of type application/x-pkcs7-signature deleted ]
--