Guide On How To Add A Domain To Qmail Scanner

Guide On How To Add A Domain To Qmail Scanner 2017-08-04T09:36:35+01:00

A Step By Step Guide On How To Add A Domain To Qmail Scanner On FreeBSD
Changes are that you at some point will add another domain to your qmail server. Qmail-Scanner does not pick up on this. If you want Qmail-Scanner to act on Spamassassin score or Virus you need to inform Qmail-Scanner about this.

Adding A New Domain

cd /usr/ports/mail/qmail-scanner1/work/qmail-scanner-1.25

The file you need to edit in order to add a new domain is this one qms-config-cwrapper

Now add the new domain to this line.

--local-domains "domain1.com,domain2.com,domain3.com" \

Since we have already run the test installation earlier when we installed qmail-scanner we can run a real install (No need to test first) of the qms-config-cwrapper file like this.

./qms-config-cwrapper install

Hit “Y” twice and “Enter” when prompted.

We need to change how Perl is running the qmail-scanner-que “again” as it just got overwritten. The file we need to edit is this one /var/qmail/bin/qmail-scanner-queue.pl

Find the very first line.

#!/usr/local/bin/perl -T

Remove the “-T” so it looks like this.

#!/usr/local/bin/perl

Now set the right permissions on the qmail-scanner-queue.pl file.

chmod 0755 /var/qmail/bin/qmail-scanner-queue.pl

And finally.

setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -z
setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -g
qmailctl restart

And we are done here.

Spell checkers don’t – Grammar checkers don’t either.