chown root /usr/bin/suidperl chmod 4711 /usr/bin/suidperlor if /usr/bin/suidperl and /usr/bin/sperl5.* both exists and are of different sizes:
chown root /usr/bin/sperl5* /usr/bin/suidperl chmod 0111 /usr/bin/suidperl chmod 4711 /usr/bin/sperl5.*
chmod 0755 /var/qmail/bin/qmail-scanner-queue.plas the binary does that bit instead, and stop running perl as suidperl (i.e. "
#!/usr/bin/perl
" instead of "#!/usr/bin/suidperl
")./usr/bin/sperl5.8.5 root.root 4711
perl -e 'use CPAN; install Time::HiRes'- now that's sweet :-). You can always use the CPAN search engine instead to find it
useradd -c "Qmail-Scanner Account" -s /bin/false -m qscand
alias block-major-8 off alias block-major-22 off alias block-major-33 off alias block-major-34 off
#/etc/tcpserver/smtp.rules # # No Qmail-Scanner at all for mail from 127.0.0.1 127.:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-queue" # Use Qmail-Scanner without SpamAssassin on any mail from the local network # [it triggers SpamAssassin via the presence of the RELAYCLIENT var] 10.:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" # # Use Qmail-Scanner with SpamAssassin on any mail from the rest of the world :allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"Then run "maketcprules" or something like "tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp" to rebuild the database.
perl: error in loading shared libraries:or
failed to map segment from shared object: Cannot allocate memoryThis is due to Qmail's startup script (e.g. /etc/rc.d/init.d/qmail) having it's memory limits set too low. There isn't enough memory available to the process to deal with invoking perl/etc
cd /tmp softlimit -a YOUR_MEMORY_LIMIT <scanner> <scanner options> .If that fails, then run it without the "softlimit" option. If that works, then your scanner needs more memory. Just keep upping YOUR_MEMORY_LIMIT by 1000000 (i.e. 1Mb) until it starts working again. I'd also suggest throwing a few large zip files and PowerPoint/Word docs in the /tmp dir to fully reflect a large complex incoming mail message. Obviously your scanner *always* needs to work 100% - so don't be too stingy on the YOUR_MEMORY_LIMIT amount - but at the same time - don't make it arbitrarily high - as you are opening yourself up to DoS attacks.
Compile, install and run (e.g. via daemontools in /services/sophie/run) as:
exec /usr/local/bin/softlimit -a 20000000 /usr/local/bin/setuidgid qscand /usr/local/sbin/sophie >> /var/log/sophie.log 2>&1
This will ensure trophie/sophie runs as the same usercode that Qmail-Scanner does, and that the socket file that Qmail-Scanner must talk to is under the same tree as the rest of Qmail-Scanner. The softlimit command (could use ulimit there of course) ensures these daemons don't run away, swallowing up all RAM or the likes. Don't forget, trophie/sophie still relies entirely on your Trend/Sophos install. Ensure your Trend/Sophos pattern files are up-to-date as normal, and restart trophie/sophie every time you update the files to ensure it's up-to-date too. If you don't, trophie/sophie will CRASH-AND-BURN and Qmail-Scanner will start reporting temporary errors until you fix it!. Note that this example has a softlimit of 20M. That is way higher than is needed, but it is safer to do with daemonized scanners like Trophie/Sophie than stand-alone scanners as they limit the max number of concurrent sessions themselves. Setting a higher limit like that reduces the likelihood than an automated pattern file update at 2am suddenly make your Qmail-Scanner server start reporting out-of-memory errors! :-)
X-Spam-Status: Yes,
or see below for Subject: tagging.
spamc -c -u <rcpt to>
" i.e. "username" is the recipient email address. This means the recipient is passed to spamd - and so you can do per-user options. Note that this only happens when there is one recipient. If you are running spamd with a SQL backend, or the "-x --virtual-config-dir" option, then this should allow you to do per-user SA settings. See SA documentation for how to configure spamd accordinglyLast Updated: