| From | Sent On | Attachments |
|---|---|---|
| Matt Pavlovich | Aug 25, 2003 9:48 pm |
| Subject: | [courier-users] Odd Perlfilter behavior | |
|---|---|---|
| From: | Matt Pavlovich (mp...@algx.net) | |
| Date: | Aug 25, 2003 9:48:59 pm | |
| List: | net.sourceforge.lists.courier-users | |
I have a simple script based on perlfilter-example.pl that looks for msgs w/ attachments named *.scr, or *.pif (guess what for).
My differences (quotes and no-quotes around name of file):
return "500 Invalid attachment." if $line =~ /filename=".*\.(pif|scr)"$/i;
return "500 Invalid attachment." if $line =~ /filename=.*\.(pif|scr)/i;
It doesn't work, as I am able to pass messages w/ pif attachments w/o a problem. 'enablefiltering' contaings: esmtp local
It works when I bolt up to port 25 using telnet and manually try to send a SoBIG msg too it.. ie:
rcpt to:<us...@somedomain.com> 250 Ok. data 354 Ok. From: Pamh...@web30a.com To: us...@domain.com Subject: Your details Date: Tue, 26 Aug 2003 0:19:13 --0500 Importance: Normal MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_NextPart_000_07498D55"
This is a multipart message in MIME format
--_NextPart_000_07498D55 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit
Please see the attached file for details. --_NextPart_000_07498D55 Content-Type: application/octet-stream; name="thank_you.pif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="thank_you.pif"
TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAA4AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJAAAAAAAAADToEjPl8EmnJfBJpyXwSacFN0onI3BJpx/3iyc7cEmnMHeNZyawSacl8E . 500 Invalid attachment.
^--- from my filter.
-- Matt Pavlovich <mp...@algx.net> Allegiance Telecom, Inc.





