Revision of Maildrop from Mon, 06/15/2009 - 20:51

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

Maildrop is a mail filter/delivery agent that can be used with your Qmail server to customize how messages are handled as they are delivered. One capability is to have messages moved to a particular IMAP folder as they are delivered to the user's mailbox.

<strong>Maildrop installation</strong>
Install the gdbm-devel package:

yum -y install gdbm-devel

Then download and install maildrop:

cd /extra/src
wget http://voxel.dl.sourceforge.net/sourceforge/courier/maildrop-2.0.4.tar.bz2
tar jxvf maildrop-2.0.4.tar.bz2
cd maildrop-2.0.4
./configure
make
make install-strip

<strong>Maildrop Logging</strong>
<A HREF=">Patrick McDonald
came up with a good way of setting up Maildrop's logging to use multilog. His Maildrop with multilog page details the installation as well as why he did it this way:

Maildrop provides a logging functionality. This functionality allows you to log what actions maildrop is taking with your messages and where you want it to write. There are a couple of problems with the maildrop logging functionality. First, there is no means to limit the size of the log file. This means the logfile could grow to fill the partition and/or filesystem. Second, it does not possess the ability to rotate files by criteria. Programs such as logrotate while capable of handling these problem, do not posses an automatic restart capability and are not OS agnostic.

Patrick's method requires creating a logger service using a named pipe and having maildrop log to the named pipe. For the purposes of this example, the named pipe will be "/tmp/log-maildrop". To create the maildrop-logger service:

mkdir -m 1755 /var/service/maildrop-logger
mkdir -m 755 /var/service/maildrop-logger/log
cd /var/service/maildrop-logger/log
wget -c --no-check-certificate http://www.antagonism.org/scripts/log-run
mv log-run run
chmod 755 run
cd ..
wget -c --no-check-certificate http://www.antagonism.org/scripts/log-maildrop
wget -c --no-check-certificate http://www.antagonism.org/scripts/pipe-watcher
wget -c --no-check-certificate http://www.antagonism.org/scripts/maildrop-logger-run
mv maildrop-logger-run run
chmod 755 pipe-watcher log-maildrop run

Create the symbolic link to start the service:

ln -s /var/service/maildrop-logger /service

Wait about 10 seconds then confirm that the service is running:

svstat /service/maildrop-logger

To really confirm that it is running, in one shell window, watch the maildrop-logger log file:

tail -f /service/maildrop-logger/log/main/current

In another shell window, echo some text onto the named pipe /tmp/log-maildrop. You should see the text in the service log:

echo testing > /tmp/log-maildrop

Recent Updates

  • 11 months 1 week ago
    1.27.2 update
  • 11 months 3 weeks ago
    Drupal 10/11 config
  • 11 months 3 weeks ago
  • PHP
    11 months 3 weeks ago
    PHP 8.3.11 and AlmaLinux
  • 11 months 3 weeks ago
    New version of Pound
Error | Production Monkeys

Error

The website encountered an unexpected error. Please try again later.