MailScanner and Zip Attachments

Antencek antencek at volja.net
Wed Apr 16 18:53:25 IST 2008


Thank you for your reply, Julian.


I have tried what you suggested:

MailScanner --value=zipattachments --from user1 at domain1.com
Result is "0"
MailScanner --value=zipattachments --from user2 at domain1.com
Result is "0"
MailScanner --value=zipattachments --from user2 at domain2.com
Result is "1"

Content of my zip-attachments.rules:
FromOrTo: @domain1 no
FromOrTo: default yes


MailScanner --value=attachmentsmintotalsizetozip --from user1 at domain1.com
Result is "100000000"
MailScanner --value=attachmentsmintotalsizetozip --from user2 at domain1.com
Result is "100000000"
MailScanner --value=attachmentsmintotalsizetozip --from user2 at domain2.com
Result is "500000"

Content of my zip-attachments.size.rules:
FromOrTo: @domain1.com 100m
FromOrTo: default 500k


Attachment Extensions Not To Zip = .zip .rar .gz .tgz .jpg .jpeg .mpg 
.mpe .mpeg .mp3 .rpm .htm .html .eml .wmv .avi


Looks like MailScanner settings are OK, but my MailScanner is ignoring them.

I was testing with 2Mb .pps file sending it as an attachment from 
user3 at domain3.com to user1 at domain.com or user2 at domain2.com.
The result of sending it to user2 at domain2.com should be attached .zip 
file, not .pps.

Can you see what am I doing wrong?


Thank you.

Antencek






Julian Field wrote:
>
>
> Antencek wrote:
>> Hello all!
>>
>>
>> I am using MailScanner 4.66.5 with Zip Attachments setting = yes.
>> Works great.
>>
>> Now I want to set rules for particular e-mail address/domain not to 
>> zip attachments (FromOrTo).
>>
>> According to 
>> http://www.mailscanner.info/MailScanner.conf.index.html#Zip%20Attachments 
>>
>> I have made zip-attachments.rules with the content:
>>
>> FromOrTo: my.email at address.com no
>> FromOrTo: @domain1.com no
>> FromOrTo: default yes
>>
>> And set MailScanner.conf:
>> Zip Attachments = %rules-dir%/zip-attachments.rules
>>
>> Restarted MailScanner, but this does not seem to work.
>> The MailScanner is acting like Zip Attachments setting = no for 
>> everyone.
>>
>>
>> Please help me find what I am doing wrong?
> Make sure you aren't just giving it files that are too small to 
> trigger it:
> Attachments Min Total Size To Zip = 100k
> is the default setting.
>
> Also, remember that MailScanner uses the envelope sender and 
> recipient(s) and not the addresses that appear in the headers.
>
> Have you checked it with "MailScanner --lint"? Also, what happens when 
> you do a command like this:
> MailScanner --value=zipattachments --from user at domain1.com
> and then an opposite example:
> MailScanner --value=zipattachments --from user at domain2.com
> The first one should give you a "no" result while the 2nd one should 
> give you a "yes" result.
>
> If that works, then your ruleset is correct, and so you need to get 
> back to us so I can take a look and test it out myself.
>>
>>
>> I would also like to put in use other rules for zip and attachments 
>> based on FromOrTo.
> Don't quite understand your point here.
>
> Jules
>


More information about the MailScanner mailing list