[Mimedefang] still struggling with syntax erro in mimedefang-filter

Scott Nelson sbnelson at thermeon.com
Wed Jun 16 12:32:10 EDT 2010


On Jun 16, 2010, at 9:52 AM, tonj wrote:

> further to my previous post I still can't get rid of the syntax error in my mimedefang-filter for rejecting html email.  If you can see the error could you please clarify what it is and what the correct syntax would be. Thanks for any help and my md filter contains this:
> 
> ...
>   if ($FoundHTML  && {
>       action_bounce("HTML mail not allowed here.");
>       return;
>   }
> ...
> the syntax error says:
> syntax error at /etc/mail/mimedefang-filter line 8, near "return"
> syntax error at /etc/mail/mimedefang-filter line 10, near "}"
> Compilation failed in require at /usr/bin/mimedefang.pl line 5257.

It is (what I consider to be) an obvious perl error -- the if statement does not have a closing parentheses, and has an extra "&&" on the line.

Did you perhaps mean something like this?
 
>   if ($FoundHTML) {
>       action_bounce("HTML mail not allowed here.");
>       return;
>   }




--
Scott






More information about the MIMEDefang mailing list