Peter A. Cole wrote:
> I have added the following lines to my mimedefang-filter, between the
> two } curly brackets at the end, which I assume would include it in
> the "while (<HEADERS>) {" routine:  
> 
> if (/^X-Habeas-SWE) {
>   delete_recipient($_) foreach (@Recipients);
>   add_recipient('[EMAIL PROTECTED]');
>   last;
> }
[...]
> I thought that this would work, but when I run mimedefang.pl -test,
> it comes up with errors about bare text and missing curly brackets
> etc., so obviously it is not correct.

Your regex pattern isn't terminated.  You need a "/" at the end of it.

> Can anyone enlighten me as to what I have done wrong or tell me how I
> can add an "or" type statement into the first part Michael has
> provided?  

Here ya go:

  open(HEADERS, '< ./HEADERS');
  while (<HEADERS>) {
    if (/^X-Habeas-SWE/i 
        || (/^X-Telstra-AS-Scanner: .*?, (.*?)% /i 
            && $1 >= 90)) {

      delete_recipient($_) foreach (@Recipients);
      add_recipient('[EMAIL PROTECTED]');
      last;
    }
  }
  close(HEADERS);

___________________________________________
Michael Sims
Project Analyst - Information Technology
Crye-Leike Realtors
Office: (901)758-5648  Pager: (901)769-3722
___________________________________________

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to