Page 1 of 1

Unable to block old doc files

Posted: 06 Nov 2019 15:41
by ItemsGmbH
Hi there

on my older eFa installation i used to block old .doc files
i edit /etc/MailScanner/filename.rules.conf by adding

Code: Select all

# Deny old .doc files
deny    \.doc$          Old .doc file   -
This dont block my test with an attached .doc file

I wanted to restart the MailScanner service, but

Code: Select all

[root@mailin3 MailScanner]# service MailScanner restart
Redirecting to /bin/systemctl restart MailScanner.service
Failed to restart MailScanner.service: Unit not found.
What is wrong? :lol:

Re: Unable to block old doc files

Posted: 07 Nov 2019 10:53
by kommunen
The systemd service is called mailscanner.service

So you have to run 'service mailscanner restart' or the more properly correct 'systemctl restart mailscanner'

Re: Unable to block old doc files

Posted: 07 Nov 2019 11:14
by ItemsGmbH
Thanks for that
Even after a restart the mailscanner won´t block .doc files
Any ideas?

Re: Unable to block old doc files

Posted: 07 Nov 2019 12:25
by kommunen
Make sure the rule blocks are separated by tabs and not spaces.
Your rule should be

Code: Select all

deny<tab>\.doc$<tab>Old .doc file<tab>- 
That worked for me, at lease.

Re: Unable to block old doc files

Posted: 07 Nov 2019 12:38
by ItemsGmbH
Oh my... very embarrassing :lol:
Thanks! This was exactly the problem :oops:


kommunen wrote: 07 Nov 2019 12:25 Make sure the rule blocks are separated by tabs and not spaces.
Your rule should be

Code: Select all

deny<tab>\.doc$<tab>Old .doc file<tab>- 
That worked for me, at lease.