AUTORESPONDER:

autorespond-2.0.4.tar.gz is a part of QmailAdmin project. It is needed if you later want to compile with the auto-responding facility. The tarball is provided by the QMR package. This is the latest version on the net too (http://sourceforge.net/projects/qmailadmin/files/) . So let’s follow it.

Note:
Autorespond assumes that your qmail home is /var/qmail. If you qmail distribution is not in /var/qmail, then edit autorespond.c and change QMAIL_LOCATION to point to the correct directory.

cd /downloads/qmailrocks
tar zxf [autorespond-2.0.4.tar.gz](http://sourceforge.net/projects/qmailadmin/files/autorespond/2.0.4/autorespond-2.0.4.tar.gz/download)
cd autorespond-2.0.4
make && make install

COURIER MAILDROP:

In QMR guide, this step of installing MailDrop comes after vpopmail, Qmailadmin and Vqadmin . But I want to do it before vpopmail, so I can tell vpopmail to use it / enable it in vpopmail configuration. You do not need to download and install maildrop if you already have the Courier mail server installed. (Which we don’t have). The standalone build of the maildrop mail filter can be used with other mail servers. This means that even if I don’t user Courier-IMAP, I would still be able to use MailDrop from Courier. This is excellent option for my next project, in which I am going to use DoveCot, instead of CourierIMap.

Why install it?

We need it. If you remove it, it takes away reformime with it. And later, Qmail-scaner stops working. And here is from the Qmail-Scanner website:-

Requirements

  • Netqmail 1.05 (or qmail-1.03 with patches)


  • daemontools-0.76+

  • reformime from Maildrop 1.3.8+_

In-fact, your mail server will stop working properly if you remove it. Here is the output if I remove the maildrop RPM from the system and run the qmail-scanner (doit) script :

[root@www contrib]# ./test_installation.sh -doit
Sending standard test message - no viruses...
qmail-inject: fatal: qq temporary problem (#4.3.0)
Bad error. qmail-inject died
[root@www contrib]#

Also, I get the following in the /var/log/maillog:

May 10 14:11:44 www X-Qmail-Scanner-2.04: [www.wbitt.com121041070456210137] d_m: output spotted from /usr/bin/reformime -x/var/spool/qscan/tmp/www.wbitt.com121041070456210137/ (sh: /usr/bin/reformime: No such file or directory

May 10 14:16:19 www X-Qmail-Scanner-2.04: [www.wbitt.com121041097956210184] d_m: output spotted from /usr/bin/reformime -x/var/spool/qscan/tmp/www.wbitt.com121041097956210184/ (sh: /usr/bin/reformime: No such file or directory

The FAQ # 9 and 10 on Qmail-Scanner site also explain the requirement of maildrop:

  • It says I must have reformime from the maildrop package! But I like procmail/[insert favorite MDA here]. Why do I have to… You don’t. reformime is needed for the extracting of MIME attachments by Qmail-Scanner - it doesn’t have to be used by any other part of your system. Keep using procmail/whatever 😊

  • It says I must have maildrop installed. Will I have to install .qmail files for all users…?. You don’t. Maildrop isn’t used at all - only the reformime program that comes with it is. Qmail-Scanner installs at a very low level and doesn’t require any per-user configuration.

After re-installing maildrop, everything became fine again.

The QMR site states:

Part 7- Maildrop

Maildrop is a mail filtering agent which can be used to filter messages as they arrive on the server. You willprobably notice, once this installation in complete, that you don’t really use maildrop. However, it’s a cooltool and it’s worth having around if you ever decide to get crazy with filtering your incoming mail. …..”

This is not a true explanation. The true explanation, is specified in the beginning of this article.

Installation:

Make sure you have pcre-devel and gcc-c++ installed on the system.

yum -y install pcre-devel gcc-c++ gamin-devel gdbm-devel

QMR provides maildrop-1.6.3.tar.gz . Where as the latest is: maildrop-2.1.0.tar.bz2 . There is a strange problem with maildrop-2.1.0 and QmailScanner-2.06 . For some stupid reason, QmailScanner-2.06 was treating maildrop-2.1.0 as maildrop-1.0+, declaring it BUGGY, OBSOLETE, and UN-USABLE. So I for that instance I stuck with the older version of maildrop, that is maildrop-1.6.3. This is not the case any more. (Details further below).

wget http://sourceforge.net/projects/courier/files/maildrop/maildrop-2.1.0.tar.bz2
tar xjf maildrop-2.1.0.tar.bz2
cd maildrop-2.1.0
  
vi maildrop.spec
...
%configure --enable-maildirquota --enable-syslog=1 --enable-trusted-users='root mail daemon postmaster qmaild mmdf' --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw
...
...

Create new tarball of the package:

cd ..
mv maildrop-2.1.0.tar.bz2 maildrop-2.1.0.tar.bz2.orig
tar cjf maildrop-2.1.0.tar.bz2 maildrop-2.1.0

Build new RPM:

rpmbuild -ta maildrop-2.1.0.tar.bz2

Stop Qmail, find your machine architecture (just to be sure) , erase old RPM, and install the new RPM:

# qmailctl stop    
  
# uname -i  
x86_64  
# rpm -q maildrop  
maildrop-2.0.4-1  

# rpm -e maildrop  
# rpm -ivh /usr/src/redhat/RPMS/x86_64/maildrop-2.1.0-3.x86_64.rpm  
Preparing... ########################################### [100%]  
1:maildrop ########################################### [100%]  

Verify that it provides reforemime, the idea behind the whole exercise:

# rpm -ql maildrop | grep reformime  
/usr/bin/reformime  
/usr/share/doc/maildrop-2.1.0/reformime.html  

That’s all, maildrop is installed (latest version).

Note: Even if the author of Courier-IMAP drops vchkpw option from maildrop, it won’t matter to us, because we are using only the reformime part of it for qmail-scanner.

Update: I recently figured out the reason of Qmail-Scanner 2.06 barfing at maildrop, and fixed the entire issue. Below is the detail.

The QS configure file (main culprit):

Looking inside the code of configure file provided with qmail-scanner-2.06 , I found the code:

qmail-scanner-2.06\]#  vi configure  
... 
#Check version of maildrop to ensure it's not the buggy version
DD="\`$MAILDROP\_BINARY -v 2
&1|grep '^maildrop'|grep '1

.0'\`"
if \[ "$DD" != "" \]; then
cat<<EOF

You have a known bad version of maildrop (1.0). It is buggy and doesn’t work!
Please upgrade to a later release:
http://download.sourceforge.net/courier/


EOF
fi
...

The fix:

The grep check is checking for existence of “1.0” in the text returned by the maildrop -v command. If it exists, it shows the error message and exits. Since co-incidently maildrop-2.1.0 also as “1.0” in it. This test fires up and the program exits. I have changed this code to the following so it works for every version of maildrop. And of-course in present time we have version higher than maildrop-1.3.8, which satisfies the requirements of qmail-scanner by default. Here is the updated code from qmail-scanner configure file, just for reference. This will be covered in more detail in Qmail-Scanner article:

if [ "$MIME_UNPACKER" = "reformime" ]; then  
DD="`$MAILDROP_BINARY -v 2  
&1 | grep '^maildrop'`"  
if [ "$DD" != "" ]; then  
echo "$DD found on this system."  
else
echo "Maildrop was not found on this system. Please install and run Qmail-Scanner again."  
exit  
fi  

That’s all .