From it at festa.bg Tue Sep 7 10:58:39 2021 From: it at festa.bg (Valentin Laskov) Date: Tue, 7 Sep 2021 13:58:39 +0300 Subject: filetype checking Message-ID: <0bc0251f-55c3-7c94-8f78-029b837052a3@festa.bg> Hi, I have two identical servers. The same version (5.3.1) of MailScanner and same config and rules files. One makes filename/filetype checks but the other doesn't. Rights and owners of the folders are the same. How can I debug the problem? MailScanner doesn't starts file command too. I have File Command = /usr/local/bin/file-wrapper ?The content of /usr/local/bin/file-wrapper? is #!/bin/bash # /usr/bin/file --mime-type "$1" | tee -a /var/spool/MailScanner/file-wrapper.log One logs file type checks but the other doesn't. Thanks for any help V. Laskov From Antony.Stone at mailscanner.open.source.it Tue Sep 7 11:04:44 2021 From: Antony.Stone at mailscanner.open.source.it (Antony Stone) Date: Tue, 7 Sep 2021 13:04:44 +0200 Subject: filetype checking In-Reply-To: <0bc0251f-55c3-7c94-8f78-029b837052a3@festa.bg> References: <0bc0251f-55c3-7c94-8f78-029b837052a3@festa.bg> Message-ID: <202109071304.44658.Antony.Stone@mailscanner.open.source.it> On Tuesday 07 September 2021 at 12:58:39, Valentin Laskov wrote: > File Command = /usr/local/bin/file-wrapper > > The content of /usr/local/bin/file-wrapper is > > #!/bin/bash > # > /usr/bin/file --mime-type "$1" | tee -a > /var/spool/MailScanner/file-wrapper.log > > One logs file type checks but the other doesn't. Have you checked a couple of basic things: 1. Does /usr/bin/file exist and does it work as expected if you simply try for example "/usr/bin/file /usr/bin/file"? 2. Is the above script executable by the user MailScanner runs under? Antony. -- Python is executable pseudocode. Perl is executable line noise. Please reply to the list; please *don't* CC me. From it at festa.bg Tue Sep 7 11:16:25 2021 From: it at festa.bg (Valentin Laskov) Date: Tue, 7 Sep 2021 14:16:25 +0300 Subject: filetype checking In-Reply-To: <202109071304.44658.Antony.Stone@mailscanner.open.source.it> References: <0bc0251f-55c3-7c94-8f78-029b837052a3@festa.bg> <202109071304.44658.Antony.Stone@mailscanner.open.source.it> Message-ID: Hello, ?? 07.09.2021 ? 14:04, Antony Stone ??????: > Have you checked a couple of basic things: > 1. Does /usr/bin/file exist and does it work as expected if you simply try for > example "/usr/bin/file /usr/bin/file"? > > 2. Is the above script executable by the user MailScanner runs under? > Yes for both. Regards, V. From it at festa.bg Wed Sep 8 06:55:51 2021 From: it at festa.bg (Valentin Laskov) Date: Wed, 8 Sep 2021 09:55:51 +0300 Subject: filetype checking In-Reply-To: <0bc0251f-55c3-7c94-8f78-029b837052a3@festa.bg> References: <0bc0251f-55c3-7c94-8f78-029b837052a3@festa.bg> Message-ID: Hello, This server experienced several accidental power outages and possibly a file system repair. A lot of old source files from spamassassin dependencies turned out to be in / directory. I'm trying to decide whether to fix it with targeted actions or with a partial or complete reinstall. Regards! V. Laskov ?? 07.09.2021 ? 13:58, Valentin Laskov ??????: > Hi, > > I have two identical servers. The same version (5.3.1) of MailScanner > and same config and rules files. One makes filename/filetype checks > but the other doesn't. Rights and owners of the folders are the same. > > How can I debug the problem? > > MailScanner doesn't starts file command too. I have > > File Command = /usr/local/bin/file-wrapper > > ?The content of /usr/local/bin/file-wrapper? is > > #!/bin/bash > # > /usr/bin/file --mime-type "$1" | tee -a > /var/spool/MailScanner/file-wrapper.log > > One logs file type checks but the other doesn't. > > Thanks for any help > > V. Laskov > > -------------- next part -------------- An HTML attachment was scrubbed... URL: