Re: [Exim] Loop over Header data in system filter

Startseite
Nachricht löschen
Nachricht beantworten
Autor: exim list subscriber
Datum:  
To: Andreas Edler
Betreff: Re: [Exim] Loop over Header data in system filter
In message <20010819131518.B14250@???>
Andreas Edler writes:

> in a system filter is it possible to write a loop over
> addresses in To: and Cc: headers?
>
> Like:
>
> for any address in $h_to:,$h_cc:
> do
> add 1 to n1
> done


I haven't tried this, as I don't have the embedded Perl stuff built
into the Exim stuff running here (yet).

On thinking about the problem some, would this work?

In the Exim filter:

   if ${perl {countaddrs} } 
   then
        # something
   endif


and in the embedded Perl file:

sub countaddrs {

      my $addrlist = Exim::expand_string('$h_to:,$h_cc:,$h_resent-to:,$h_resent-cc)


      @addrlist = split /,/,$addrlist;


      return $#addrlist;


}

--
Randall Raemon
shikahrsoho.com, email to eximlist