Re: [exim] Automatically processing mail to a mailbox

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Nigel Wade
Date:  
À: exim-users
Sujet: Re: [exim] Automatically processing mail to a mailbox
Andrew.Stringer@??? wrote:
> Hi, although I don't have a pressing need at the moment, I was thinking
> this morning about how to send mail to an account and have a script run
> and take an action automatically. The trigger for this was that I get a
> mail from time to time which needs me to confirm a valid email address by
> following an html link.
> I would like to have this processed automatically, but I am unsure of the
> best way to proceed. I could have a script run periodically and look at
> the mail box designated for this and strip out the html link and follow it
> with wget, or maybe to try and set up a pipe which mail can be delivered
> to so a script would see the mail as input on std input.
>
> Are either of these a good approach or is there a better way? My methods
> are not exim specific I think, but maybe exim can handle things directly?
>
>
> Regards,
> Andrew.
>
> Windows, for life without walls.
> Linux, for life without Windows.
>
>


Just use a filter. For example, I used to use this in system_filter for
Sophos alerts/updates (when they were sent out individually):

if $h_from: contains "Sophos Alert System" and
$h_to: contains "notification@???" and
$h_subject: contains "Sophos Anti-Virus IDE alert" then
unseen noerror pipe "/etc/exim/sophos_update"
endif

/etc/exim/sophos_update was a script which parsed the email message and
downloaded a file from the URL contained in the message.

-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555