Chapter 5. NOD32LMS configuration
messages to the MAILBOX file located at the local user home directory; ’|preline procmail’ to
use the procmail MDA as a local deliver agent, etc.).
In order to involve the module nod32mda into the message delivery process the user is re-
quired to use: "|/usr/bin/nod32mda" as the first command line parameter, i.e. the starting
script (var/qmail/rc) will look as follows:
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "|/usr/bin/nod32mda" splogger qmail
With the above modifications, we have provided that all the messages originally sent by the
MTA for delivery to the MAILBOX (by using an original MDA) will now be primarily sent to
module nod32mda. Still there is the second part of the modification to provide that all messages
processed by nod32mda will be sent to the fully featured MDA agent that will take care about
the message successful delivery to the MAILBOX. Here a problem may occur, as the original
local delivery agent of Qmail is so called qmail-local. The qmail-local understands the structure
of the Qmail starting script and is able to deliver e-mail messages to the special structures of
MAILBOX, e.g. ’./Maildir/’ or ’./Mailbox’. However, this is not the case of other ’old featured’
MDAs, including procmail MDA. Moreover, the qmail-local delivery agent and the whole of
Qmail uses different return codes of MDA than other standard MDAs and this has to be taken
into account when configuring nod32mda module. In the following example we provide the
modification that will use procmail MDA delivery agent, which will deliver the message to the
MAILBOX as a special ’./Maildir/’ structure located at the appropriate user home directory.
In order to do so, we will modify the parameters (infected_return_code, tmpfail_return_code)
located in the section [mda] in the main NOD32LMS configuration file in the following manner:
infected_return_code = 100
tmpfail_return_code = 111
At the same time we will modify the parameter (mda_path) located at the same section [mda]
of the same configuration file to use a custom script
mda_path = "/var/qmail/bin/qmail-maildrop"
that we will, of course, have to provide now. The /var/qmail/bin/qmail-maildrop, we have to
create, will be as follows:
#!/bin/sh
/var/qmail/bin/preline /usr/bin/procmail && exit 0
[ $? = 75 ] && exit 111
exit 100
19