My qmail server is being used to send spam

Discussion in 'qmail' started by yukon, Oct 3, 2008.

  1. yukon

    yukon Valued Member

    Aug 13, 2008
    Likes Received:
    Here is my predicament with our little qmail with vpopmail backend server . . . it's nearly *too good.* Basically, what I mean is the relay is so fast that, some fool is trying to use it to spam via error messages (spoof addresses and, your spam gets delivered with the appropriate NDR). There really is no way of blocking this type of mail without spam blockers (such as SpamAssassin). What I would like to do is block all IPs within the APNIC range from even getting a HELO message:

    APNIC allocates resources in the following ranges within the Asia Pacific region:


  2. popowich

    popowich EQ Forum Admin Staff Member

    Aug 12, 2008
    Likes Received:

    While approaching the problem with this solution may provide a temporary and partial fix to your problem, I would not consider it the best solution. Your mail server is vulnerable to backscattering. Please see my article on how to prevent backscatter for the best solution. For your server I recommend the chkuser patch mention in the solutions section of the article.

    To answer your original question, yes, it is possible to deny incoming connections from specific networks. Update your cdb file with the networks you want to deny. The path to it is specified in your $qmail/supervise/qmail-smtpd/run file. Some example lines to deny the networks listed above are:

    You should be able to use that example to generate the rest of the deny lines needed.


Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.