[Mimedefang] MIMEdefang not executing mimedefang-filter?

Rolf E. Sonneveld R.E.Sonneveld at sonnection.nl
Fri Jan 25 18:21:17 EST 2013


Hi, Kees,

On 24-01-13 23:15, Kees Theunissen wrote:

> On Thu, 24 Jan 2013, Rolf E. Sonneveld wrote:
>
>> Hi, all,
>>
>> running MD 2.71 (but the same problems shows up in 2.73)
>>
>> I have a mimedefang-filter which has run fine for more than a year now
>> on an old Solaris 10 system. I have installed MD and the same
>> mimedefang-filter on a new system (both Solaris, old one sun4u
>> architecture, the new one sun4v architecture). On both systems Postfix
>> is talking to MD, with milter version = 6. The problem I see is, that
>> the mimedefang-filter does not convert the message on the new system,
>> while it does at the old system. All I see in the log file (when I
>> enable debugging) is:
> [snip]
>
>> MDLOG,91D573CA46,mail_in,,,<my.mailaddr at xy.companyx.nl>,<r.e.sonneveld at sonnection.nl>,New
>> Message
> [snip]
>
> The logs show than mimedefang is running and that a message has been
> processed.
>
>> Now, even if I add a simple log statement as begin of the filter_begin
>> routine, like:
>>
>> my $filename = '/tmp/report.txt';
>> open(my $fh, '>>', $filename) or die "Could not open file '$filename' $!";
>> print $fh "This is a test of mimedefang\n";
>> close $fh;
>>
>> and I send a message, the output file of these four lines is not
>> written. So for some reason, it seems that mimedefang is not executing
>> the mimedefang-filter script at all.
>>
>> I checked file ownerships, permissions, umask etc. and compared with the
>> old system and everything seems to be OK, except for the result of the
>> mimdefang pass.
>>
>> Any suggestions much appreciated!
> Mimedefang won't run without a filter and it doesn't seem to be using
> the file you think it's using. So it probably uses another
> filter file.
>
> 1) Examen mimedefang.pl to see the default filter file (build time
>     option): grep 'Filter =' `which mimedefang.pl`
> 2) Examen your startup scripts (and config) to see if a filter
>     is specified at run time.

You made my day! mimedefang.pl referred to /etc/mail/mimedefang-filter 
and on the old system there was a symlink to our filter 
(/opt/mimedefang/bin/mimedefang-filter) but on the new system this 
symlink was not present. A big Thank You!

This makes me wonder: when compiling mimedefang with:

./configure --prefix=/opt/mimedefang and --exec-prefix=/opt/mimedefang 
et cetera

should mimedefang.pl not search for a default filter under 
/opt/mimedefang/bin instead of /etc/mail?

/rolf




More information about the MIMEDefang mailing list