Re: [Exim] Perl filters

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Tony Byers
Kopio: exim-users
Aihe: Re: [Exim] Perl filters
On Thu, 15 Mar 2001, Tony Byers wrote:

> I am setting up a filter for the postmaster account and would like to
> do it in Perl. Based on the subject line I need to fail quite a few
> messages, but I just read in the archives that being able to fail a message
> from Perl is not possible. Is this correct still and if not how might
> I do this? I apologize if this is in the specs somewhere but I can't
> find anything.


In a system filter, you can write

if ${perl{subroutine}{$h_subject:}{arg2}...} is "fail" then fail endif

In a user filter, which it looks like you are talking about, you can't
in Exim 3 use the "fail" command. But you can achieve more or less the
same result by a combination of "mail" and "seen finish".

However, since you probably don't want to allow all users access to Perl
in their filters, it may be best to use a separate director for
postmaster, so that you can enable Perl only on that one. If you do
that, you can also set allow_system_actions, which will make "fail"
available.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.