Slashdot Mirror


Fight Spam With Nolisting

An anonymous reader writes with the technique of Nolisting, which fights spam by specifying a primary MX that is always unavailable. The page is an extensive FAQ and how-to guide that addressed the objections I immediately came up with. From the article: "It has been observed that when a domain has both a primary (high priority, low number) and a secondary (low priority, high number) MX record configured in DNS, overall SMTP connections will decrease when the primary MX is unavailable. This decrease is unexpected because RFC 2821 (Simple Mail Transfer Protocol) specifies that a client MUST try and retry each MX address in order, and SHOULD try at least two addresses. It turns out that nearly all violators of this specification exist for the purpose of sending spam or viruses. Nolisting takes advantage of this behavior by configuring a domain's primary MX record to use an IP address that does not have an active service listening on SMTP port 25. RFC-compliant clients will retry delivery to the secondary MX, which is configured to serve the role normally performed by the primary MX)."

22 of 410 comments (clear)

  1. Attacks on 2ndary relays by mcrbids · · Score: 2, Informative

    For some time a few years ago, spammers used to IGNORE the primary MX and send to secondary MXs preferentially.

    Since in our case, the 2ndary MX was a dumb sendmail relay only without knowledge of the user DB, it shot the traffic load out thru the roof with bounces to junk spam that, because they couldn't be rejected during the actual delivery attempt, hammered our backup relay.

    This is just a dumb idea.

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  2. That's "greylisting". by khasim · · Score: 5, Informative

    "Greylisting" is where an SMTP server refuses messages for a certain amount of time. You set the criteria on why the message would be refused and how long the server would refuse to accept it.

    It's been pretty much defeated now because so many spammers have their machines try to hammer the message through until it does go through.

    I'm using greylisting right now and the only advantage is that many times a spammer will end up on an RBL during the 15 minutes that I'm refusing his messages.

    Remember, the spammers have, effectively, unlimted bandwidth and unlimited processing power at their disposal.

    1. Re:That's "greylisting". by AchiIIe · · Score: 3, Informative

      It's not quite greylisting. Greylisting denies access to the smtp server, this technology reads the whole message, analyzes it, rejects it, and waits for a second `exact` copy.

      see: http://it.slashdot.org/comments.pl?sid=132222&cid= 11045587

      From the FAQ (http://www.olympus.net/doubleVerifyNL):

      DoubleVerify gets two chances to automatically identify mail. When mail arrives at our mail server the first time our server requests the sending mail server to send it a second time. Spammers rarely comply. Legitimate mail servers typically resend the mail about fifteen minutes later. Once OlympusNet receives mail the second time, it immediately delivers that mail and continues to immediately deliver mail from that sender. The DoubleVerify process works invisibly and is handled automatically by the mail servers.

      --
      Nature journal lied in Britannica vs Wikipedia Ask to retrac
    2. Re:That's "greylisting". by Dion · · Score: 2, Informative

      Funny, I've found that switching to greylisting has meant that I went from 50+ spams pr. day on one account to 0-2, with the norm being 0.

      The trick is that I don't just use greylisting, I use greylisting + spamtrap driven RBLs, so that once the greylisting period runs out the RBLs have a much greater chance of having been hit by the same spammer and thus they catch him.

      Grylisting on its was a temporary fix, but it makes spamtrap driven RBLs pretty much bulletproof.

      You could get pretty much the same result simply by tarpitting connections that would have been greylisted for 15 minutes rather than giving the immediate error code and then checking the RBLs before receiving the body of the mail.

      --
      -- To dream a dream is grand, but to live it is divine. -- Leto ][
    3. Re:That's "greylisting". by Dion · · Score: 3, Informative

      Well, you can solve this by whitelisting the broken appliances.

      A better solution would be to ignore the problem, because those appliances are broken and need to be replaced or fixed no matter what.

      --
      -- To dream a dream is grand, but to live it is divine. -- Leto ][
    4. Re:That's "greylisting". by toonerh · · Score: 2, Informative

      Greylisting still DOES help a lot in 2007. The majority of "zombie" spambots don't bother to requeue the "soft", 4xx, errors; also zombies that relay through their ISP generate a more obvious fingerprint and finally, and perhaps most importantly, the 30 minutes to 1 hour delay allows DCC, Razor2 and other spam signature databases to register hits at the expense of non-greylisters.

    5. Re:That's "greylisting". by pe1chl · · Score: 3, Informative

      Firewalls and anti-spam appliances have often very broken SMTP implementations, and not only do they have bad support (when you report it is broken, you get a "it works with most servers so it must be YOUR server that is broken!") but also when an update IS released, it can take years before it is installed by the users.

      However, I still believe that the best way to handle this situation is by not working around it. When users complain that a good fraction of their mail gets bounced for no apparent reason, there may be action. When you implement a workaround, things will remain as they are.

      This does not only affect greylisting. I have seen bad SMTP bugs in NAI's virus checker, "SurfControl E-mail Filter", "logsat spamfilter for ISP", and another spamfilter whose name I forgot. tried to issue bug reports via their support system. It often is near impossible to submit a bug report when you are not a user of their product, and once you get through they are completely uninterested when you are not Microsoft or Sendmail. Pointing them to the RFC does not work at all, they fix bugs by the "if it delivers mail then it must be OK" paradigm.

  3. Not as good an idea as it sounds by bigberk · · Score: 3, Informative

    This probably works in many cases, but as a mail system admin I can tell you that it can fail and will cause problems for legitimate mail delivery. Over the past few months I remember seeing a few messages stuck in my Postfix mail queue, that didn't ever seem to make it out to the recipient's MX. These were domains with deliberately non-functioning MX, and I could not figure out why Postfix was not trying the other MX even though it was up and running. In one case I also tried mailing the recipient domain through gmail, which ALSO failed after many days of retrying. Again I am not sure why the scheme failed to work, but it did fail through both Postfix and gmail which are two very legitimate mail servers.

  4. Re:Temporary Solution by bigberk · · Score: 2, Informative

    The interesting thing about the solution is that it will increase costs for the spammer. Not quite, because spammers don't really pay for bandwidth. They steal the computing power and bandwidth from victims (virus infected machines) to set up botnets, and then leverage the stolen resources for their marketing business.
  5. Re:Oblig. by scottv67 · · Score: 2, Informative

    You must be the fastest typist in the known universe...

    Whiney Mac Fanboy is a subscriber. They (subscribers) get to see the articles before us mortals. First post isn't hard when you can reply to the article before the article is available to the unwashed masses.

  6. Re:Won't work. by schon · · Score: 2, Informative

    Most spam bots already send to the *lowest* priority MX
    he has results that dispute it. If he does, he didn't post them to his page.

    If you take a look at his page, he says that he used DNSBL.

    DNSBL host != spam-bot

    Spam-bots are a subset of the hosts that would be listed in a DNSBL.

    Next time, before attacking someone, you might want to work on your reading comprehension skills. You'll look like much less of a fool.
  7. Just like MailHurdle by jonnythan · · Score: 1, Informative

    It sounds like a function called MailHurdle that's built into Mirapoint email filters.

    It works wonderfully. We've been using for about a year at my organization. It works by initially rejecting all incoming mail from unknown servers. If the server is legit, it will retry the email, and on that retry, MailHurdle will allow the mail through.

    It instantly eliminated well over half of our incoming spam. Very clever technique, and it certainly works.

    1. Re:Just like MailHurdle by Anonymous Coward · · Score: 1, Informative

      The rest of the world calls this "greylisting".

  8. Re:Temporary Solution by TheSkyIsPurple · · Score: 2, Informative

    The kept the IPs handy, not even bothering to check DNS.

    I handled other domains on the same servers, so I'd still see the requests come in

  9. Re:Spammers IGNORE the MX priority by steppin_razor_LA · · Score: 2, Informative

    I think this article has it backwards. Spammers often times will go after your secondary MX records instead of your primary. This strategy = waste of time.

    --
    Evolution: love it or leave it
  10. Re:Temporary Solution by tdelaney · · Score: 3, Informative

    If you'd bothered to RTFA (which I did a month or so ago) you would notice that the secondary server will only accept mail which was first rejected by the primary.

    This means that servers *must* be RFC-compliant to deliver mail to a no-listed server - they must try to deliver to servers in the published order, and must try at least two.

    The big advantage with no-listing is that if the sending server immediately tries the secondary after the primary fails, here is almost no delivery delay.

    The big disadvantage of course is that an RFC-compliant spammer gets almost no delay either.

  11. Re:I run a high volume mailserver, this is a bad i by anakog · · Score: 3, Informative

    I run a fairly low-key server, which I only use for my family, so I am not sure how relevant my data is.

    I remember at one point last year checking on the usage my backup MX gets and was surprised to see a lot of mail coming through it. Surprised because my primary server is (almost) always available. Upon a closer inspection I was astounded by what I found: all the email that came through the backup MX was spam for the past year was spam. No exceptions!

    Certainly, mine is an extreme case, but I think the trend is very clear.

  12. Re:Temporary Solution by tdelaney · · Score: 2, Informative

    Sorry - you're right. What I was thinking of was *unlisting* which is linked to right near the bottom of that same page (and reproduced here for convenience):

    http://www.joreybump.com/code/howto/unlisting.html

  13. Re:MOD PARENT UP +5 THE FUNNAH by DavidTC · · Score: 2, Informative

    Except it wasn't filled in consistently.

    These are incorrectly checked:

    (X) Many email users cannot afford to lose business or alienate potential employers
    (x) Dishonesty on the part of spammers themselves
    (x) It will stop spam for two weeks and then we'll be stuck with it
    (x) Asshats
    The plan loses no email that is distributed by an actual mail server. Even the crappiest actual mail server out there follows the rules by checking another MX server, and if it doesn't it's going to lose a lot of mail anyway. Supporting multiple MX records isn't some obscure part of the standard, it's a major requirement, and all actual mail servers do.

    And spammers can't 'lie' their way around it. They can use software that operates correctly in the first place, but the years have demonstrated exactly how long it takes them to switch. I have no idea how long the spam software pipeline is, but spammers have operated software that is broken in many ways, and people have been consistently using that brokenness to block spam for years.

    If this reduces spam for a time and then stops reducing spam, I'm failing to see what the problem is. I'm still checking that the MAIL FROM domain is a real domain, and it's astonishing how much spam doesn't even bother to do that. Or checking that the HELO is not a negative number. (I have no idea what that's about.)

    And we won't be 'stuck' with it. It doesn't change anything. People can point to a fake MX server for however as long as they want, and then switch back to just having their one real one, whenever they want.

    And the 'asshats' check box is used to mean people can abuse or break the system. I have no idea why it was checked.

    About the only one correctly checked complain is:

    (X) Eternal arms race involved in all filtering approaches

    Yes, it's an arms race, and, yes, it will lose power over time as spammer's crapware adapts. Aaaand? At the very least we cost spammers money, and upgrading spam software is insanely expensive. We didn't hurt ourself in the slightest.

    --
    If corporations are people, aren't stockholders guilty of slavery?
  14. I WTFA... by jumperboy · · Score: 3, Informative

    ...and encourage readers to RTFA, where I've addressed many of the issues brought up in these comments. I also encourage people to try the technique, if they are in the position to do so (admins only, this is not a solution for endusers), and evaluate it for themselves. Or not. It's true that most new antispam solutions are dreamed up by crackpots. I might be a crackpot. If this possibility concerns you, don't be an early adopter. Wait and see.

    It's true, in my experience, that Nolisting stops some spam with no false positives (in my experience). And that's a Good Thing. But it doesn't stop significantly more spam than a combination of other techniques, which I also implement. Some of those techniques use a lot of resources, such as content filters (often powered by perl) and virus scanners. Nolisting provides a way to free up some of those resources, possibly resulting in better performance and even hardware savings. These savings can be significant at large sites that currently scan each and every message that arrives.

    Nolisting can be bypassed. I don't make any wild claims. Spammers can get past it easily by going directly to the secondary MX. Guess what? They already do that, and have been doing that well before greylisting was introduced. Nolisting significantly reduces the percentage of spam my MX processes, thereby freeing up resources. It's just one part of a layered solution.

    I've limited secondary MX access by extending Nolisting into Unlisting (Port Knocking for SMTP): http://www.joreybump.com/code/howto/unlisting.html . It's wildly effective, except for one serious problem: A retry might originate from a different IP. This appears to be legal, and seems to be the result of load balancing strategies adopted by some important sites. For that reason I don't recommend it. It will randomly block messages from gmail, for example. You can't reasonably predict the IP a multihomed host will use for a retry, so be very skeptical of any approach that claims to have solved this problem.

    Unwanted email is annoying. When it carries a payload, it is potentially dangerous. But I don't really view this as a security issue. I don't buy the argument that Nolisting is security by obscurity, and therefore bad. It's a form of access control, a gatekeeper, a prophylactic. It's an apple a day, not a cure for cancer. It's not addicting, fattening, or life-threatening. Try it, if you're looking for ways to improve the health of your mail system. Discontinue use immediately at the first sign of complications. Side effects include more sleep and time spent with your kids.

    Nolisting rarely introduces delays. As I point out in the article, most relays retry immediately. Any relay that cannot get beyond Nolisting is seriously, seriously noncompliant. While I don't suggest Nolisting as a complete replacement for Greylisting, it is a viable alternative for sites that experience problems with Greylisting and find the delays it introduces to be unacceptable. As the name implies, Nolisting is meant to used without dependence on whitelists. Wider adoption and testing will determine if this ideal has been realized.

    Like Greylisting, Nolisting breaks infrastructure to some degree. Many admins find this distasteful. I know I do. If Nolisting becomes widely adopted, logs will become fatter with "Connection refused" errors when the primary MX doesn't respond. I'm sorry for that. But our logs are already fat with 45x errors from Greylisting, RBL disconnections, SpamAssassin scores, etc. Nolisting might even help to make logs smaller, if you currently see a lot of these messages. Time will tell. Keep an open mind, and remember that we often make concessions to improve a system's overall health. Just reducing the possibility of another zombie being created on the Internet creates benefits for everyone.

    Try it before you draw a c

  15. Re:Oblig. by DavidTC · · Score: 2, Informative

    The acknowledgements don't say anything about running specific software, or making any changes to software.

    I've been doing nolisting for about three months now, and it required:

    1) Making three A records, mx1.example.com, mx2.example.com, and mx3.example.com, all of them pointed to my IPs (Don't abuse the internet by directing traffic randomly elsewhere, people.) with mx2 being my already existing mail server and the other two being IPs without mail servers.

    2) Set all the domains I felt like it to use those 3 MX records in order.

    That was it. I didn't touch my mail server at all, I didn't even bother with firewalls, because my server already has a firewall setup.

    --
    If corporations are people, aren't stockholders guilty of slavery?
  16. Re:Oblig. by raju1kabir · · Score: 2, Informative
    Very stupid and very annoying idea! It fails to account for the fact that spammers use fake FROM-addresses, and stupid &%@! SMTP servers bounce the email to the fake FROM-address. I receive around 10000 bounced spam-emails per day of this type because one spammer somewhere decided to use my domain as a fake FROM-address. Just discard the email. Don't bounce!

    How did this get marked insightful? Sending a temporary failure SMTP response code is not a bounce, and should not result in the generation of a bounce message except from psychotic MTAs.

    --
    "Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS