Thanks, I've installed Courier::Filter (upgraded perl to 5.8.3 too) made test configuration:
#-------------------
use Courier::Filter::Module::MIMEParts;
use Courier::Filter::Logger::Syslog;
use Courier::Filter::Logger::File;

my $logfile = Courier::Filter::Logger::File->new(
ÂÂ file_name => "/etc/courier/filters/pureperlfilter.log"
);

my $syslog = Courier::Filter::Logger::Syslog->new();

my $file_ext = Courier::Filter::Module::MIMEParts->new(
ÂÂ max_sizeÂÂÂ => 100000,
 signatures => [
ÂÂÂÂÂ {
ÂÂÂÂÂÂÂÂ file_nameÂÂ => qr/\.(exe|com|pif|lnk|scr)$/,
ÂÂÂÂÂÂÂÂ # responseÂÂÂ => $response_text
ÂÂÂÂÂ },
ÂÂ ],

ÂÂ loggerÂÂÂÂÂ => $logfile,
ÂÂ inverseÂÂÂÂ => 0,
ÂÂ trustingÂÂÂ => 0,
ÂÂ testingÂÂÂÂ => 0,
ÂÂ debuggingÂÂ => 0
);

my $filter = Courier::Filter->new(
ÂÂ logger => $syslog,
ÂÂ modules => [ $file_ext ],
);
#-------------------
but syslog shows:

courierfilter: Starting pureperlfilter.conf
courierfilter: exec: Permission denied

Tried to use only syslog, in case there's problem with log file permissions, but was the same thing.
Where can be the problem?
Thanks :)

Julian Mehnle wrote:
Moshe Gurvich [[EMAIL PROTECTED]] wrote:
  
Apparently our mail server running courier 0.44 letting thru emails
which should be stopped  by maildrop.
The configuration is:
[...]
But still test emails with .PIF files are going thru.
Interesting that other rules in maildroprc and .mailfilter are done ok..
    

I'm not sure how this should be fixed within a maildrop script, but I think it's unreliable to use simple a regular _expression_ check for detecting bad attachment types.  Such a simple check is doomed to also match *this* message, if I simply write "foo.exe" in the message body.

Besides, you could very well reject unwanted messages right in the SMTP transaction phase instead of silently dropping them in the delivery phase.

To solve your problem properly, you could use Courier::Filter[1]'s MIMEParts filter module to reject messages with unwanted attachment types or file names.

[1] http://search.cpan.org/~jmehnle/Courier-Filter-0.12/



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
  

Reply via email to