Help Center

Setting up for qmail

Note: These instructions have not been thoroughly tested. Please use discretion when making changes to your qmail configuration.

Configuring qmail to use MailChannels Cloud is a reasonably complex process, due to the way that qmail is structured. The first step is to configure qmail to add the X-AuthUser header that MailChannels Cloud requires to properly quarantine bad users in your system. After this step, it's a simple matter of configuring qmail to relay all mail through the MailChannels Cloud.

Configuring the X-AuthUser Header

  1. Apply Bruce Guenter's qmailqueue patch: http://www.qmail.org/qmailqueue-patch.
  2. Recompile qmail.
  3. Install Bruce Guenter's qmail-qfilter: http://www.untroubled.org/qmail-qfilter/.
  4. Modify /service/qmail-smtpd/run to add the following line:

    export QMAILQUEUE="/var/qmail/control/filter.sh"
  5. Create the file /var/qmail/control/filter.sh executable and owned by the user qmail-smtpd runs with (we used vpopmail):

    #!/bin/sh
    exec /usr/local/bin/qmail-qfilter /var/qmail/control/filter.pl
    
  6. Create the file /var/qmail/control/filter.pl executable and owned by the user qmail-smtpd runs with (we used case vpopmail):

    #!/usr/bin/perl
    $usuario = $ENV{TCPREMOTEINFO};
    print "X-AuthUser: $usuario\n";
    while(<>) {
      print;
    }
    
  7. Restart qmail-smtpd.

Setting up MailChannels Cloud as a Smart Host

You will need to patch Qmail to enable SMTP authentication if you have not already. Check out this installation guide for further information. An alternative is this SMTP authentication tutorial. For this topic, jump to the section on configuring SMTPAUTH for qmail.

Generally, you will need to add the following to /var/qmail/control/smtproutes, but you should verify the actual path and file you need to update.

:smtp.mailchannels.net:25 username password

As with all configuration changes, make sure to restart qmail.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.

Powered by Zendesk