Bernard Robbins <[EMAIL PROTECTED]> wrote:
> This is what I did:
> 
> I installed Courier::Filter::Module::MIMEParts with CPAN.
> I created /usr/local/courier/etc/filters/pureperlfilter.conf:
> 
> use utf8;
> 
> use Courier::Filter::Logger::File;
> use Courier::Filter::Module::MIMEParts;
> 
>      $options = {
>          logger      => Courier::Filter::Logger::File->new(
>              file_name   => '/var/log/courier-pureperlfilter.log',
>              timestamp   => 1
>          }
>      };

Up to here, you're doing everything right.

>      my $module = Courier::Filter::Module::MIMEParts->new( ... );
> 
>      my $filter = Courier::Filter->new(
>          modules     => [ $module ],
>      );

You need to include your module setup in the $options definition:

| $options = {
|     logger  => Courier::Filter::Logger::File->new( ... ) ,
|     modules => [
|         Courier::Filter::Module::MIMEParts->new( ... )
|     ]
| };

The "my $filter = Courier::Filter->new( ... )" part is handled
automatically by the "pureperlfilter" executable (which is started when
doing `courierfilter start`).

See the sample "pureperlfilter.conf" file that comes with Courier::Filter.

> ln -s /usr/local/courier/etc/filters/pureperlfilter.conf 
> /usr/local/courier/etc/filters/active/

No, the link you have to create must not point to "pureperlfilter.conf"
but to the "pureperlfilter" executable instead.

> /usr/local/courier/sbin/courierfilter start
> 
> /var/log/maillog:
> Aug 12 11:56:15 mail courierfilter: exec: Exec format error
> Aug 12 11:56:15 mail courierfilter: Starting pureperlfilter.conf
> 
> And of course its not working. Can you point me in the right direction?

To sum everything up, you have made two mistakes:
 1. Your symlink points to "pureperlfilter.conf" instead of
    "pureperlfilter".  This causes the "exec: Exec format error" message,
    because "pureperlfilter.conf" is not a valid executable.
 2. Your setup in "pureperlfilter.conf" is slightly wrong.  Move your
    module setup into the definition of the $options variable (see above).



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to