On Sat, 08 Jan 2011 09:14:55 -0800
pete <[email protected]> wrote:

> I would like to call a system command when a specific subject string
> is passed.

> if ($Subject =~ /\run ls\b/i) {
>     system("/bin/ls");
>     }

> This works the first time when I send a mail with "run ls" in the
> subject line but causes mimedefang to crash.

The problem is that your filter *must not* print anything to standard
output.  MIMEDefang uses standard output for communication between the
C milter and the Perl scanners; if you print anything to standard output,
MIMEDefang becomes completely confused.

Make sure you redirect standard output (and probably standard error, too)
for any commands you run from your filter.

Regards,

David.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to