Re: [exim] Intercept messages by Subject

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Heiko Schlittermann
日付:  
To: exim-users
題目: Re: [exim] Intercept messages by Subject
Andrew Radamis <rust710@???> (Mi 10 Nov 2010 22:33:11 CET):
> Hi,
>
> Is is possible to redirect messages from a certain host, user and including
> specific words in the subject? We have an automated system that generates
> email for our clients and one of it's messages is incorrect but it is not
> possible to fix the program so I was wondering if it was possible to
> intercept the message, pass it to another program to fix and then send it
> on, from the exim mail server, but only the messages with the right words in
> the subject.
>
> I've been using exim for a while and know how to use the pipe transport so
> I'm really just looking for how to make exim detect a message based on
> subject.
>
> Thanks for your help,


You can use some rule in your data acl to set an acl variable.
But I'd say you can even use some condition in the transport.
Probably even a condition in some router might be a solution.

ACL:

    warn    condition = ${if match{$h_subject:}{bad word}}
            set acl_m_fixme = 1



Later on in your routers or transports you can use $acl_m_fixme in some
condition.

Alternativly

    # smtp transport
    smtp:
        driver = smtp
        transport_filter = ${if match{$h_subject}{bad word} {/usr/local/sbin/fixer} {}}



Nothing is tested or proven to be correct. Please just consider it as
hints ☺

--
Heiko :: dresden : linux : SCHLITTERMAN.de
GPG Key 48D0359B : 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B