Slashdot Mirror


How To Fight Spam Using Your Postfix Configuration

hausmasta writes, "In this guide you will learn how to tweak your virtual Postfix setup to better combat spam by stopping the mail before it hits SpamAssasin, using RBL (Realtime Blacklists) and RHBL (slightly different), greylistings, and Helo Checks." A clear, step-by-step guide to a complex subject.

158 comments

  1. Why to Use this by neonprimetime · · Score: 2, Informative

    The HowtoForge guide is great for everything however if you have a very busy mail server running Spam Assasin on 1000s of message per minute is a CPU killer. The best answer is to stop the mail before it hits Spam Assasin with a range of RBL (Realtime Blacklists) and RHBL (Same but different), Greylistings and Helo Checks.

    1. Re:Why to Use this by DaveGuy · · Score: 3, Informative

      The system I setup for my company uses as little "spam-scanning" as possible:
      1) greet-pause (reject mode)
      2) IP-blacklist (reject known bad sending IPs)
      3) SPF (reject if indicated)
      4) TLS (temp-fail if indicated)
      5) greylist (temp-fail mode)
      6) rcpt (reject user unknown)
      7) max-rcpts-per-envelope (temp-fail overage)
      8) max-connect-per-interval (temp-fail overage)
      9) IP-whitelist (known good sending IPs skip directly to virus filter)
      10) Domain-Spoofers (quarantine - sender can't trip this unless coming from wrong IP)
      11) Spam Classifier (quarantine if score is too high)
      12) Custom Content Filters (quarantine on hit)
      13) Virus Filter (delete on hit)

      Log analysis on a regular basis reveals IPs to white list and to black list. We validate these candidates against WhoIs, and other tools (Senderbase is good) before committing them to an actual list. We consolidate lists to network segments whenever possible.

      The end results are: no false positives, no viruses, rare false negatives, small quarantine volume, no outbound bounces from us, very few content filters, and a volume block rate of over 95% of about 7 million emails per day. False positive mitigation is extremely simple (and recoverable). False negative mitigation is likewise extremely simple.

  2. Yeah, but... by cp.tar · · Score: 3, Insightful

    ... aren't blacklists still a bit... tricky?

    --
    Ignore this signature. By order.
    1. Re:Yeah, but... by TheBogBrushZone · · Score: 1
      ... aren't blacklists still a bit... tricky?

      They can be a real pain if your ISP isn't doing as much as they should against botnets. On a few occasions I've been unable to send mail because my ISP (NTL) is less than rigorous in that respect and have been blacklisted by SpamCop and others. Even now I can't report spam using SpamCop's email submission service because a number (not all) of NTL's mail servers are apparently blacklisted.
      --
      And behold, a command prompt and he who sat upon it, his name was shutdown and -h 3:11 followed with him
    2. Re:Yeah, but... by jank1887 · · Score: 1
      yes, but I'd also qualify running a capable high-volume mailserver as a little bit ... tricky.

      RBL's are rather reliable, having few false positives from a server listing point of view. That said, you will have collateral damage from other users of shared spamming mailservers. There's no way around that, and less-than-clueful business customers will get upset about non-delivery of email. Most issues can be avoided by making customers fully aware of your mailhandling policies, and offer easy whitelisting, or customer adjustable blocking preferences.

      Some RBL's recommend greylisting all RBL'd servers, and automatically flagging anything that gets through as junk/spam. Then, the legit email will have gotten through, and you need to let your server customers know to periodically review their junk folders for legit mail. Avoids the SpamAssassin overhead on those messages that get through, and blocks receipt of most of the real junk.

    3. Re:Yeah, but... by bogado · · Score: 2, Interesting

      The only problem is that the customer never knows that his email is being droped. He things that the receiver got the email and choosed to ignore it, simply because it never got returned. And you know what? He is right to think like that, if an email has not returned it should be assumed as delivered.

      The problem with those black lists is that is quite easy to get in one of those and is near impossible to get out. The number of false positives that those RBL produce is huge, and this means a huge number of people not receiving emails. I had a friend that almost could not get into an international congress because she did not got any replys from the congress email because it's university was in one of those black lists.

      I do not advise anyone to use black lists. There are many good ways to get rid of spam that do not have false positives, like gray listing. Check this out , this guy has a very good analisys of the problem and the solutions he used.

      --
      []'s Victor Bogado da Silva Lins

      ^[:wq

    4. Re:Yeah, but... by jrockway · · Score: 3, Interesting

      I'm having excellent luck with OpenBSD's spamd blacklisting and greylisting. Haven't lost any important mail, but my SPAM has been cut by about 98%. It's truly amazing.

      http://www.openbsd.org/spamd/

      --
      My other car is first.
    5. Re:Yeah, but... by jank1887 · · Score: 2, Informative
      did you even read the post you replied to? either way, a response:

      1)The only problem is that the customer never knows that his email is being droped
      Very true, and a sign that the mailserver is making poor use of blacklists. A rejection notice should always be sent. Proper use of blacklists will, as I mentioned above, either allow the message through, but tag it, or notify the sender that it was rejected, providing alternate means of contact or correction.

      2)The problem with those black lists is that is quite easy to get in one of those and is near impossible to get out
      Quite easy to get in: if your mailserver is sending out lots of spam, yes it is, and it should be. It is the sign of a mailserver that is misconfigured, insecure, or just has bad policies.
      Near impossible to get out: It seems you have moved to describing BL's, not RBL's. A Realtime BlockList is supposed to list a mailserver upon significant spam amounts coming from it, and then de-list after the problem has been corrected. Correction doesn't equal "Hey, we have ligit mail over here, let us through please!!!" It means ending the flood of spam from the server. the onus is on the server operator to be a good net-citizen. otherwise, our servers don't want to talk to his servers. Some blocklists are overagressive, and have poor de-listing practices. It's the implementing admin's job to understand the lists he implements and the potential impacts of those lists.
      As I mentioned above, alternate forms of contact and customer whitelisting capability are crucial if you are actually blocking mail. RBL's are very effective when used conscientiously. Combined with grey listing, they can cut your 'processed' spam (i.e., what you pay to handle) down to almost nothing.

    6. Re:Yeah, but... by Anonymous Coward · · Score: 0

      Haven't lost any important mail,

      How do you know?

    7. Re:Yeah, but... by ajs · · Score: 1

      Yes, blacklists are tricky. You need to find one whose philosophy you and your users are willing to live with. This is why I use Spamhaus's SBL/XBL list which excludes only those hosts which are known problems. I happen not to agree with the philosophy that I should not be allowed to recieve mail from a network that has one spammer on it. Others disagree and wish to exclude the whole network. Salt to taste.

    8. Re:Yeah, but... by Lord+Ender · · Score: 1

      What do you think SPAM stands for?

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    9. Re:Yeah, but... by element-o.p. · · Score: 1
      I do not advise anyone to use black lists. There are many good ways to get rid of spam that do not have false positives

      That seems a little bit optimistic, to me. I used to work at an ISP that had a sendmail farm as a front-end for an i-Planet mail server (grrr....), and you could tell when the spammers would unleash a flood from botnets on other ISPs' networks: the sendmail farm would grind to a halt, delaying legit mail from our users by 1-5 hours, at times.

      You simply *cannot* filter that much mail real time without denying e-mail from known spam sources out of hand; if your domain is well-known enough, blocking by RBL becomes a matter of survival, not convenience.

      Besides, I am reminded of a quote (as best as I remember it) by Paul Vixie, the author of Bind and Vixie cron, I believe, on the Nanog mailing lists:
      We know that blacklists hurt spammers because of the changes they make to get around them. And anything that hurts spammers, we should be all over.
      (My apologies to Paul if I didn't get the quote exactly right)
      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    10. Re:Yeah, but... by CerebusUS · · Score: 2, Insightful

      I'd agree with you _if_ the only reason a server ever got put onto an RBL was due to relaying and misconfiguration. The trouble is that some addresses are inevitably put on the list due to a disagreement about terms of service or what constitutes "spam."

      As the network admin for a consulting company, I'll never use an RBL on our mail because any lost communication from a customer or potential customer costs us more than potentially allowing some spam through (or buying larger hardware to handle better spam detection)

    11. Re:Yeah, but... by jrockway · · Score: 1

      Nothing, but everyone else capitializes it these days, so "SPAM" looks correct now. Thanks for your insightful comment, though; I appreciate it.

      --
      My other car is first.
    12. Re:Yeah, but... by Lord+Ender · · Score: 1

      "everyone else capitializes it these days"

      Sure, if by "everyone," you mean "a small minority."

      But I'm always willing to share insight with the sightless masses.

      Actually, I'm doing you a favor. Just like someone would be doing the President a favor if they mentioned to him that he was pronouncing "nucular" incorrectly.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    13. Re:Yeah, but... by jumpingfred · · Score: 1
      What do you think SPAM stands for?

      SPAM stands for SPiced hAM.
    14. Re:Yeah, but... by ePhil_One · · Score: 2, Interesting
      I'd agree with you _if_ the only reason a server ever got put onto an RBL was due to relaying and misconfiguration. The trouble is that some addresses are inevitably put on the list due to a disagreement about terms of service or what constitutes "spam."

      The RBL's all have different policies. Some are very explicit & limited, some are personal toys (I recall one that blocked all of MCI/UUnet). I start with the most restrictive, falling through about 4-5 total whose policies seem reasonable. Anything banned gets an email back explaining why and is logged, I pull daily reports with the IP's, RBL, Subject lines, etc from the logs (with a nice summarization header) so I can easily spot check their effectiveness. All client domains are whitelisted by default, most "leads" come in via webforms. Any list that blocks something I want gets scrutinized and removed, thans to the summaries I know RBL #4 is only blocking 150 spams a day anyway, so I can delete it (it might have caught more, but RBL #1 blocks 14k a day before #4 ever gets a shot at it). Another handy trick, use tighter controls on your lower priority servers, real mail almost never goes there, but spammers like to use them because they are less monitored, sometimes poorly configured, and less loaded.

      Worked wonders. But implying all RBL's have low false positive rates in irresponsible.

      --
      You are in a maze of twisted little posts, all alike.
    15. Re:Yeah, but... by Kazoo+the+Clown · · Score: 2, Interesting

      Oh, we don't care if our email is unreliable, we're BLOCKING SPAM. RBLs are largely counter productive in that regard-- avoid them.

      Email reliability essentially *means* that some spam will get through. GET USED TO IT. Do not trade reliability away to be spam free. False positives are unacceptable, PERIOD. If a filtering system is subject to false positives, it's worse than the problem it is trying to solve.

      Those who would sacrifice a little email reliability for spam security deserve neither.

    16. Re:Yeah, but... by geminidomino · · Score: 1

      The only problem is that the customer never knows that his email is being droped. He things that the receiver got the email and choosed to ignore it, simply because it never got returned.

      If that's the case, there's a mail admin in the equation somewhere that needs to be fired. What you're describing has exactly nothing to do with RBLs, and everything to do with the server configuration.

      My mail server is running sendmail with 4 DNSBLs, plus a locally-run internal. If a mail message hits those lists, it's rejected with a (very descriptive) 550 error before the connection completes. At that point, it's the sending mailserver's responsibility to generate the bounce (it should come from the sender's domain server, not the recipients. Configuring your mailserver to send bounces to remote addresses is Evil and Rude. Don't even get me started on virus notifications).

      If the blocking server is accepting mail and silently dropping the packets on the floor, that is bad. If the sending server is receiving the 550, but not generating the bounce, this is also bad. The question remains of WHICH server is causing the badness, but the RBL isn't.

    17. Re:Yeah, but... by Auntie+Virus · · Score: 1

      OMFG! Rejection notices should always be sent??? That's the mother of all bad ideas! Most true spam is either sent from non-existant senders, or forged senders. So your mail server will be bogged down with trying to send NDRs to non-existant addresses. The ones that DO get through won't make you any friends. Sender domain RBLs are bad. Period. Spam filtering should be based on a combination of tests, use blacklists of URIs and checksum databases of known spammy messages. Pyzor, Razor, DCC...

      --
      Why yes, I *AM* new here. Why?
    18. Re:Yeah, but... by fredklein · · Score: 1

      I have a simple, foolproof idea to help eliminate spam.

      Email certification.

      If you want to be able to send Certified Email (CE), you apply for Certification from the company that gives you internet connectivity. They check you out, and 'Certify' you as being a legitimate emailer (ie: not a spammer). Then, you generate a private/public key pair and give them the public one. In the headers of all your email, is their certification, and an encrypted header line that's createdusing your private key.

      When email arrives at the recipients server (or this could be done at the client level, as well), the server sees the certification, and connects to the certifying server to get your public key. It attempts to decrypt the header line. If it does it marks the email as 'certified', if it cannot, it marks the email as 'uncertified', and the email client can be programmed to filter messages based on that.

      Due to the public/private key cryptography, there can be no certified email spoofing. (Assuming the private keys are secure, the keys are of decent length, etc.) All emails are traceable back to the originating server. CORRECTION- all CERTIFIED emails are traceable. Anonymous email is still possible. People can still set up email servers for mailing lists without "having" to get them certified. And people can still receive non-certified mail.

      If an email server sends out spam, the complaints go to it's certifier. They can drop the certification, deleting the public key from their server. When this happens, ALL the email from the spamming server is now 'uncertified', and gets handled accordingly by email clients. If nothing is done, complaints go to THEIR upstream, etc. Individuals and groups can keep their own blacklists, if they wish, and anyone can choose to filter emails according to those lists.

      Now, I've looked over that 'form email' that people like to post to shoot down anti-spam ideas. And nothing applies to this idea. (If something seems to apply, it's because I either left out details, or explained something wrong.) This idea does NOT need to be universally adopted, nor does it need to be adopted by everyone all at once. It's primarily a way of reliably tracing (certified) emails back to their originating server. The anti-spam part comes later: if you receive certified spam, complain and get the server un-certified. If you receive un-certified spam... well, just have your email client dump all uncertified emails in the trash. (Not nessisarilly, you could just use it's un-certifedness as a factor in filtering your email.)

      This idea does not require anything be changed with SMTP. It simply requires a second connection be made to the certifying server. Now, before you bitch about the extra bandwidth, I'd like to remind you that, once this idea catches on, spam will be greatly reduced. This reduction will MORE than make up for the slight increase in bandwidth created in querying the certifying servers. Also, the certifying servers can set time limits on when the certifications expire, and need to be re-downloaded (kind of like DHCP leases). A 'new' company that just applied for certification might have it's certificate set to expire almost instantly. This way, every email they send requires a download of the certificate. This allows the certificate to be pulled rapidly if they start spamming. After a month or two, it could be set to expire weekly or monthly.

      To sum up: Email Certification is reliable way of tracing the certified emails back to their originating server. This allows spammers to be identified unequivocally, and have their certification pulled. Email servers are NOT required to be certified, and anonymous email is still possible. Email recipients can, if they choose, set up their client to send uncertified emails to the trash, or to handle them however they wish. White lists and black lists are still possible. 'Hobby mailing lists' are still possible, certified or not. The extra bandwidth is minimal, and easily overshadowed by the reduction in spam being send once spammers realize no one is even seeing, much less reading or replying to their spam.

    19. Re:Yeah, but... by geminidomino · · Score: 1

      Since you mentioned the form, I decided to use it. I found a few entries that DO hit, based on what you wrote. Since you mentioned that you may have left out some details, I'll let you answer. (and also trim the form. ;))

      Your post advocates a

      (X) technical ( ) legislative ( ) market-based ( ) vigilante

      approach to fighting spam. Your idea will not work. Here is why it won't work. (One or more of the following may apply to your particular idea, and it may have other flaws which used to vary from state to state before a bad federal law was passed.)

      (X) Requires immediate total cooperation from everybody at once

      -- That is, without the new SMTP software to support it, it's worthless.

      Specifically, your plan fails to account for

      (X) Huge existing software investment in SMTP
      --Self-explanitory

      (X) Armies of worm riddled broadband-connected Windows boxes
      --It would be trivial for a worm to get it's current IP and use its ISPs mailserver for "smarthosting" outgoing mail. In fact, I think they're already doing it

      (X) Extreme profitability of spam
      (X) Extreme stupidity on the part of people who do business with spammers
      (X) Dishonesty on the part of spammers themselves
      -- You place too much faith in the SPs who will be "Certifying" users to be non-spammers. There are already providers out there offering "bulletproof hosting" and "pink contracts" to spammers for extra money.

    20. Re:Yeah, but... by XNormal · · Score: 2, Interesting

      Quite easy to get in: if your mailserver is sending out lots of spam, yes it is, and it should be. It is the sign of a mailserver that is misconfigured, insecure, or just has bad policies.

      My server is sending out lots of spam but it is not misconfigured or insecure and I don't believe my policies are bad.

      I have set up forwarding addresses for some people and some of them are receiving lots of spam. This means that my server is sending out lots of spam and I think it has already been blacklisted by at least one other provider.

      The best place to put spam filtering is at the endpoint - that's where the most information is available to make the decision and the end user can intervene and provider feedback to the classifier (e.g. gmail). If I start filtering spam, in the hope of reducing the chances of being blacklisted, I will be doing a disservice for my users.

      --
      Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
    21. Re:Yeah, but... by fredklein · · Score: 1

      (X) Requires immediate total cooperation from everybody at once

      -- That is, without the new SMTP software to support it, it's worthless


      There is no new software required. The certification can easily be added as a 'plug in' or option to existing software. People could still use email software that does not include 'certification'- they just would not gain any benefits.

      (X) Armies of worm riddled broadband-connected Windows boxes
      --It would be trivial for a worm to get it's current IP and use its ISPs mailserver for "smarthosting" outgoing mail. In fact, I think they're already doing it


      In which case, the spam emails could be definitively traced back to the server they came from. A complaint is made, and the ISP investigates and cuts off the 'infected' customer's email service (until they clean their box) or a complaint gets sent to their upstream, who will investigate, and possibly revoke the ISP's email certification.

      Either no more spam gets sent, or at least it is sent un-certified, which simplifies filtering.

      -- You place too much faith in the SPs who will be "Certifying" users to be non-spammers. There are already providers out there offering "bulletproof hosting" and "pink contracts" to spammers for extra money.


      And they have to get their Internet Service from somewhere. If their Upstream doesn't certify them, their un-certified emails will easily be filtered, and never seen. If their Upstream is evil and does certify them, then the Certified email from them (the spammer and/or the upstream, and/or everyone else the upstrean serves, depending on how hardcore you want to be) can be blacklisted.

      With Certification, all email will come in Either Un-cerified, or Certified. If it's Uncertified, it can be junked, or whitelisted, or handled anyway the receiver wants. (Most peopel will just junk it, I think.) Certified email can be traced to a specific server, which provides a place to complain to if you get spam. If the owner of the server refuses to deal with it, you can go to the company who certified them, and get their email access cut off. Etc.

      UUNET
          |
      Big Regional ISP
          |
      Local ISP
          |
      Spammer

      If 'Spammer' sends spam, then complain to Spammer. You KNOW the mail came from their server- the encryption involved in the Certification process proves it. If they solve the problem (maybe they were hacked, whatever), then the spam stops.

      If Spammer refuses to do anything, then go to Local ISP. Tell then they Certified someone who is spamming, the Spammer refuses to stop. The ISP will revoke Spammers cerification. The spam, while still being sent, is now UN-certified, and will probably not reach anyone. In addition, Spammer can be added to a 'problem user' list, so if they try to change ISPs, their next ISP can be warned about the problem, and refuse to Certify them.

      If Local ISP refuses to do anything, Contact Big Regional ISP. Tell them the story: that Spammer is spamming and refuses to stop, and Local ISP is not doing anything. Big Regional ISP can pressure Local ISP by threatening to revoke Local ISP's Certification. If they need to, they can actually revoke it.

      Etc.

      See how it works? The key to the whole thing is knowing for sure where the spam came from, so you can complain to them, or their upstream. Unlike the current situation, where email addresses can be spoofed, and bots can blast out untraceable spam from residential accounts, this forces everyone with a (certified) email server to BE RESPONSIBLE, or face the consequences. At the same time, ANYONE can still set up a 'hobby' email server that is UN-certified, and send out newsletters, etc., without restriction. They just need to let the receivers know to whitelist them, or their uncertified emails might end up in the trash.

    22. Re:Yeah, but... by bogado · · Score: 1

      My mail server is running sendmail with 4 DNSBLs, plus a locally-run internal. If a mail message hits those lists, it's rejected with a (very descriptive) 550 error before the connection completes. At that point, it's the sending mailserver's responsibility to generate the bounce (it should come from the sender's domain server, not the recipients. Configuring your mailserver to send bounces to remote addresses is Evil and Rude. Don't even get me started on virus notifications).


      Sure, but how the poor guy that has a blacklisted servers as his provider should act. He will not be able to send his email, so if he does not have an alternative way of contacting this guy he is in big trouble. The receiver end will never know that he is losting a possibly important email. And even worst, if the blcked sender is not very literate in "internet" he will not know what the heck is spam or RTBL is, and if the interest part in reciving the email is the receiver he will simply give up.

      There are many ways of blocking email, and the sooner you block it (in the connection) the better. But I don't believe that black lists are a good solution, unless you're usign it in addition to other meaning, like for instance as a point adder rule to spam-assassin or if your configuration if it uses 4 and only drops the email if two or more agree.

      --
      []'s Victor Bogado da Silva Lins

      ^[:wq

    23. Re:Yeah, but... by 51mon · · Score: 1
      The best place to put spam filtering is at the endpoint - that's where the most information is available to make the decision and the end user can intervene and provider feedback to the classifier (e.g. gmail). If I start filtering spam, in the hope of reducing the chances of being blacklisted, I will be doing a disservice for my users.


      Absolutely disagree.

      Best place to do spam filtering is at the termination point of the first SMTP connection. Okay in a perfect world this would be the end point, but the world isn't perfect.

      User interaction is pretty much useless in spam filtering.

      1) There is too much spam.
      2) Users are too error prone (Trust me on this I have a SCOMP feed)

      I have no choice I have to do spam filtering before the end point, because if I don't, the spam filtering at the end point will reject the email (and or blacklist my server), and it'll end up in my queue, and I'll have to try and return it (otherwise email would become unreliable), and some poor smuck gets 100,000 delivery reports for emails he never sent.

      I have about 1000 domains on one of the email servers at work that forward the email elsewhere, and the average queue length is about 40 messages (with 5 day expiry). The queue consists almost entirely of spam from domains that won't accept email, refused by the final destination server. So I think I'm doing quite well on the spam filtering front.

      We don't really do "false positives", I guess maybe a single report every few months, almost invariably due to misconfiguration of the sending email servers.

      Read the article and learn.
    24. Re:Yeah, but... by geminidomino · · Score: 1

      -- You place too much faith in the SPs who will be "Certifying" users to be non-spammers. There are already providers out there offering "bulletproof hosting" and "pink contracts" to spammers for extra money.

      And they have to get their Internet Service from somewhere. If their Upstream doesn't certify them, their un-certified emails will easily be filtered, and never seen. If their Upstream is evil and does certify them, then the Certified email from them (the spammer and/or the upstream, and/or everyone else the upstrean serves, depending on how hardcore you want to be) can be blacklisted.

      With Certification, all email will come in Either Un-cerified, or Certified. If it's Uncertified, it can be junked, or whitelisted, or handled anyway the receiver wants. (Most peopel will just junk it, I think.) Certified email can be traced to a specific server, which provides a place to complain to if you get spam. If the owner of the server refuses to deal with it, you can go to the company who certified them, and get their email access cut off. Etc.

      UUNET
              |
      Big Regional ISP
              |
      Local ISP
              |
      Spammer

      If 'Spammer' sends spam, then complain to Spammer. You KNOW the mail came from their server- the encryption involved in the Certification process proves it. If they solve the problem (maybe they were hacked, whatever), then the spam stops.

      If Spammer refuses to do anything, then go to Local ISP. Tell then they Certified someone who is spamming, the Spammer refuses to stop. The ISP will revoke Spammers cerification. The spam, while still being sent, is now UN-certified, and will probably not reach anyone. In addition, Spammer can be added to a 'problem user' list, so if they try to change ISPs, their next ISP can be warned about the problem, and refuse to Certify them.

      If Local ISP refuses to do anything, Contact Big Regional ISP. Tell them the story: that Spammer is spamming and refuses to stop, and Local ISP is not doing anything. Big Regional ISP can pressure Local ISP by threatening to revoke Local ISP's Certification. If they need to, they can actually revoke it.

      Etc.

      See how it works? The key to the whole thing is knowing for sure where the spam came from, so you can complain to them, or their upstream. Unlike the current situation, where email addresses can be spoofed, and bots can blast out untraceable spam from residential accounts, this forces everyone with a (certified) email server to BE RESPONSIBLE, or face the consequences. At the same time, ANYONE can still set up a 'hobby' email server that is UN-certified, and send out newsletters, etc., without restriction. They just need to let the receivers know to whitelist them, or their uncertified emails might end up in the trash.


      Except then that's no solution to anything. I don't know if your example case there used UUNet by pure coincidence or if you're familiar, but they're probably THE pinkest (i.e. most "spam friendly") backbone out there, so your solution would still end up having to shitcan an entire backbone.

      We've already gotten that far, so what does your system offer us? We can already identify the server sending us the mail (the "Received:" header that our mailserver adds can be trusted, and it's enough to identify the last hop, which is the important one. It won't prevent us from /dev/nulling false positives since the spammers on spammy hosts will have certification too. So we'd be right back where we are now.
    25. Re:Yeah, but... by geminidomino · · Score: 1

      I answered elsewhere as to why blocking during SMTP transaction was better than point-parsing like SA in high-volume situations.

      If a provider has blacklisted servers, the "poor guy" still has several options.

      1) He can complain to his provider to fix the problem.
      2) He can get a new provider
      3) He can contract for alternate SMTP service ("smarthosting")
      4) He can just do nothing.

      As for not knowing what spam is, I highly doubt that's the case with anyone less reclusive than the Unabomber. And even if it is, so what? He might not understand what the problem is, but that in no way obligates me or any other mail admin to allow the crapflood in from his provider just because he doesn't have a clue. If he's in that much "trouble" for an email getting lost, he made a poor choice of communications medium. Email is not, and never will be, reliable.

  3. RBLs and not getting your mail by BadAnalogyGuy · · Score: 1, Insightful

    If you're running the mail servers for a business, how prudent is it to run a spam filter in the first place? While using something that relies on checking the content of the mail may be useful in getting rid of the most egregious spam, you don't want to block all items identified as spam. You can't run the risk of blocking your customers.

    RBLs are notorious (especially SpamAssassin) for blacklisting entire domains when only a small subset of those users are actually sending spam.

    If you're running your own mail server at home, then a whitelist would probably be more useful than a blacklist since you already know who you want to contact you.

    But you gotta hand it to the Unix folks for making the task of setting up a spam filter this difficult. I am curious how difficult it would be to set up a spam filter on an Exchange server.

    1. Re:RBLs and not getting your mail by slapyslapslap · · Score: 2, Interesting

      If you're running the mail servers for a business, how prudent is it to run a spam filter in the first place? While using something that relies on checking the content of the mail may be useful in getting rid of the most egregious spam, you don't want to block all items identified as spam. You can't run the risk of blocking your customers. Most start out thinking this way. Then they get so burried in spam that they start to think much differently. It CAN be done properly with minimal collateral dammage. A good way to do it is to always send a rejection back to the sender with a reason why. In the event that a real user is rejected, at least they know and can try again via another account, fax, or phone.

    2. Re:RBLs and not getting your mail by grasshoppa · · Score: 5, Informative

      If you're running the mail servers for a business, how prudent is it to run a spam filter in the first place? While using something that relies on checking the content of the mail may be useful in getting rid of the most egregious spam, you don't want to block all items identified as spam. You can't run the risk of blocking your customers.

      New to the business? You don't block anything in this situation; You mark it with a header ( that's part of the email message that you would likely never see. Most mailers won't display them unless you ask it specifically to do so ), and leave the blocking/filtering up to the end user.

      For my uses, I have spamassassin running with a couple RBLs ( both in house and external ). I don't delete any mail; It is instead redirected to a specific folder when it's identified as spam. Over the past 6 months spam has made it into my inbox twice, and i've had no false positives.

      If you know what you are doing, this is the ideal solution.

      RBLs are notorious (especially SpamAssassin) for blacklisting entire domains when only a small subset of those users are actually sending spam.

      Uh, no they aren't. Spamassassin isn't an RBL.

      There are a few RBLs that are notorious for their blocking behavior, and as such, few use them.

      If you're running your own mail server at home, then a whitelist would probably be more useful than a blacklist since you already know who you want to contact you.

      I'd agree with this; Automated whitelists are the way to go.

      But you gotta hand it to the Unix folks for making the task of setting up a spam filter this difficult.

      It's only difficult when you don't understand the process.


      I am curious how difficult it would be to set up a spam filter on an Exchange server.


      Curiously enough, most of the time I hear people recommending placing a spamassassin enabled email server in front of an exchange server if you want decent spam protection.

      Overall, I'd give your post a 9/10 on the troll scale. It wasn't bad, had factual data twisted in such a way as to be completely false. I even bit, not to argue with you but to make sure innocents don't read your post and get confused.

      --
      Mod me down with all of your hatred and your journey towards the dark side will be complete!
    3. Re:RBLs and not getting your mail by Philosinfinity · · Score: 4, Insightful
      If you're running the mail servers for a business, how prudent is it to run a spam filter in the first place? While using something that relies on checking the content of the mail may be useful in getting rid of the most egregious spam, you don't want to block all items identified as spam. You can't run the risk of blocking your customers.
      The firm that I work for gets something like 160,000 emails from external sources a day. Roughly 10% of these are legitimate. How prudent is it to force users to sift through 90% crap in order to get to the legitimate 10%. Currently, we use Postini as our primary MX host. They forward legitimate messages directly to our Exchange server, filter out 100% guaranteed spam, and drop the remainder into a quarantine that we check every few hours. Basically, all I am getting at is that spam filtering is necessary for enterprise environments and that there are actually some good tools to acheive it.
    4. Re:RBLs and not getting your mail by Ed+Avis · · Score: 3, Insightful
      A good way to do it is to always send a rejection back to the sender with a reason why.
      Um, and the 'sender' is who exactly? Please don't tell me you're using the From: address...
      --
      -- Ed Avis ed@membled.com
    5. Re:RBLs and not getting your mail by John+Fulmer · · Score: 1

      Okay. I'll bite.

      > If you're running the mail servers for a business, how prudent is it
      > to run a spam filter in the first place?

      Many businesses feel that they have a responsibility to block a certain amount of spam, especially porn spam.

      > RBLs are notorious (especially SpamAssassin) for blacklisting entire
      > domains when only a small subset of those users are actually
      > sending spam.

      Um.... SpamAssassin != a RBL. It is a spam filter that uses multiple algorithms to try to identify spam. RBL's are *ONE* source of information, and is almost never used as the sole determinator of spam/ham decisions in the SpamAssassin config.

      > If you're running your own mail server at home, then a whitelist
      > would probably be more useful than a blacklist since you already
      > know who you want to contact you.

      From: old_friend@newemail.com
      Subject: New Job

      Hey! I just started at this new company and they have a job you'd love. Let me know soon,

      of

      PS.. You might want to update your email address for me. This is my new primary email.

      Whitelists have limited usefullness in email except as a another source of information to your filter. Gmail does an excellent job of this, IMHO.

      > But you gotta hand it to the Unix folks for making the task of
      > setting up a spam filter this difficult. I am curious how difficult
      > it would be to set up a spam filter on an Exchange server.

      Damn near impossible, short of purchasing a package. Exchange traditionally isn't the worlds friendliest package to interface with directly.

      In most corporate environments, spam filtering happens offbox before it reaches the email servers and is frequently done by an appliance. Same for anti-virus.

    6. Re:RBLs and not getting your mail by TFGeditor · · Score: 1

      For our U.S.-based business, we simply blacklist all email from IP addresses outside the U.S. and Canada. We do not do business with any foreign interests, so we receive no legitimate email from other countries. This cuts our spam load by about 70 percent.

      The other thing is to blackhole email that the domain name in the From field (e.g. comcast.net) does not match the sending IP. This reduces spam (which invariably has a fake From address) by another 20 percent. Whatever gets past these is handled at the local machine level by filters. Net result: perhaps 5 spams per week (out of thousands) make it to users' Inboxes.

      --
      Ignorance is curable, stupid is forever.
    7. Re:RBLs and not getting your mail by Amouth · · Score: 1

      I agree with the spamassassin box in front of the exchange server.

      for my work domain. I have two virtual slackware boxes running that do nothing but take mail clamav and spamassassin and then forward it to exchange.. we get about 1-2 messages a second per box and most of them are spam - exchange is a very nice work group server and the integration between outlook - mobile devices and OWA is quite nice - it has it's issues and security holes but I find that using linux spam filters and having exchange only except inbound connections from them removes most of the exploitable issues.

      i feel that neither linux nor ms have the best solution but for us a soulution of both works Quite well

      --
      '...if only "Jumping to a Conclusion" was an event in the Olympics.'
    8. Re:RBLs and not getting your mail by otisg · · Score: 1

      But how do you know you didn't get any false positives? You could know that only if you examined every single email marked as spam. Did you really do that? If so, then what is the point of running spam filters? The whole problem is that spam consumes our time, and thus we want to get rid of it without ever seeing it. We don't want to monitor our spam filters.

      --
      Simpy
    9. Re:RBLs and not getting your mail by raddan · · Score: 3, Interesting

      We block somewhere around 200k spam emails a day. And we have a very similar setup sitting in front of our Exchange server. The kinds of things we can do with Postfix simply aren't possible with Exchange, and once we learned the ins and outs of Postfix, we found it to be easier to use than Exchange. For one, Postfix has real documentation. Not to mention that the main developer posts regularly on the mailing list. Ever talk to MS's corporate support people for Exchange? Exchange is so huge and complex no one person knows the entire program. Postfix is a model of simplicity by comparison.

    10. Re:RBLs and not getting your mail by Drachemorder · · Score: 1

      If it's a valid business email and not spam, I'd expect that the "From:" address should be meaningful. Granted, spammers wouldn't have valid addresses in the "From:" field, but I don't care whether or not a spammer gets my "rejected" message. I only care about notifying the false positives, and a legitimate email should have a valid address to reply to.

    11. Re:RBLs and not getting your mail by Pollardito · · Score: 1

      it actually is easier to clean up spam when you have the likely candidates sorted into their own folder. even if you're still looking at each header/sender before deleting it, you're ahead of the game because you're not working in a mixed mode (opening some and acting on them, deleting others) when dealing with spam or dealing with regular mail.

    12. Re:RBLs and not getting your mail by grasshoppa · · Score: 1

      But how do you know you didn't get any false positives? You could know that only if you examined every single email marked as spam. Did you really do that?

      Two reasons;

      1) In my environment,if I don't acknowledge an email I get follow ups from the person until I do. I have never come across a situation where their email has been in the spam folder.

      2) I glance at my spam folder on occation ( about once a week ). I look at the senders and the subjects. Takes me a minute ( usually less ).

      If so, then what is the point of running spam filters?

      To keep it out of my general user base.

      The whole problem is that spam consumes our time, and thus we want to get rid of it without ever seeing it. We don't want to monitor our spam filters.So you want a spam appliance. Not going to happen; Spammers are constantly working to get around filters; You need someone or something constantly adapting to them. If you have an automated method for this ( bayes ), then you need a human keeping it on track.

      Further, you need to train your users as to what to do if a spam gets through to their inbox ( drag it to the spam folder ).

      Nothing will ever make spam go away entirely ( until we get a better protocol that is ), so the best that can be done is education combined with good spam filters.

      --
      Mod me down with all of your hatred and your journey towards the dark side will be complete!
    13. Re:RBLs and not getting your mail by shadowmas · · Score: 2, Insightful

      You might not care if the spammer doesnt get your rejected message. i dont either, but i certainly do care if you're 'rejected' messages end up in my inbox just because some spammer used my email address as his 'From' address. do everyone a favour either reject any spam at the time you recieve it (via a smtp error code) or dont reject it at all. It would be almost the same as havng a open smtp server since spammers can use your server to send spam as backscatter.

    14. Re:RBLs and not getting your mail by just_another_sean · · Score: 3, Interesting

      As someone who uses Exchange I can say that setting spam filtering up is easy. You can use RBLs or not. You can set thresholds that let a lot in or block a lot with many false positives. If you're worried about losing business mail then you can configure it to be safe about that and never outright refuse or delete mail.

      But I don't like it because once you check the boxes, set the sliders and press OK, that's it. Unless you then get into scripting or third party products or any other solutions I can't think of you don't get to customize it any further. In other words, at that point, if you want more, it's just like Unix. I've never worked with any but can't you buy Sendmail or OpenExchange and get a lot of the point and click stuff for free too? And for a lot less then the dragon's horde a small business spends on MS Exchange?

      One last thing to mention, we feel the same way as you about losing a customer's mail. So our users don't get anywhere near the spam they used to but the IT Admin that works for me spends anywhere from an hour to two a day checking the spam filter to see what gets tagged. Whitelisting? So far we found a few half ass solutions in forums that for various reasons don't do exactly what we need.

      All in all, like most Window's based solutions in my experience, Exchange is easy to set up, hard to customize. We're working on a OpenBSD solution as a front end in our spare time. Hopefully we can get it to get the worst of the spam and then set Exchange to be a lot more lax when it gets in... Anything that keeps us from checking the spam filter all day.

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    15. Re:RBLs and not getting your mail by Tweekster · · Score: 1

      Basically, most businesses are willing to lose one email that is important if it means saving hours a week...Because anyone I have dealt with in business, understands the fact that email is not a reliable form of communication. They follow up with a call if they send something critical.

      99% means losing one legit email per 100, in all likelyhood it wasnt important,

      I use ASSP, automatic whitelists are built as people send emails so email has become useable for my organization. They understand if an email is blocked, the sender is notified, the sender calls the office (that has happened twice, and the sender would complain about it, trust me)

      99% is good enough, period. I keep a seperate account so that if something isnt received that should have been, it will be in that box and I can retreive it, that happens maybe once a month.

      People always clamor on about how "what about losing that important email" well the way it works in the real world, if it is important, the person simply doesnt put their full faith in email to begin with.

      If someone expects email to be reliable, they will learn soon enough, spam filter or not.

      You can and should run the risk of blocking your customers, with a proper whitelist system that hardly ever happens, coupled with a content analysis system you are set. End users in a business should not have to sift through crap deleting an important email because they want to get rid of the 100 junk emails. (I used to see them do that regularly)

      The important thing to remember is, they were already deleting important emails on accident. Now they just dont have to delete junk. The whitelist makes it far more effective because in all likelyhood, the email will be delivered without problems.

      I am sorry, but anyone who bickers on about "that one important email" obviously doesnt live in reality, or doesnt live in the business world (or will quickly be exiting the business world) by trusting a system that is inherently unreliable.

      --
      The phrase "more better" is acceptable English. suck it grammar Nazis
    16. Re:RBLs and not getting your mail by emurphy42 · · Score: 1

      No, no, the point is that spammers typically have someone else's valid addresses in the "From:" field, and then you end up spamming that someone else with the bounce message. Unintentional, sure, but you should still fix it (e.g. by checking SPF).

    17. Re:RBLs and not getting your mail by Osiris+Ani · · Score: 1
      Granted, spammers wouldn't have valid addresses in the "From:" field, but I don't care whether or not a spammer gets my "rejected" message.

      Actually, spam will rather often have a valid address in the "From" field. Unfortunately, it rarely ever has any true association to the originating spammer, but is instead usually simply yet another address culled from their list of potential recipients. Sometimes that address will even be yours.

      As such, this practice to which you adhere actually makes you part of the problem; you're sending unsolicited automated replies to people who didn't first attempt to contact you. In other words, your mail server is generating spam, probably in great amounts.

    18. Re:RBLs and not getting your mail by cortana · · Score: 1

      Spamassassin is far more accurate at classifying spam than humans. You will lose less mail if you let Spamassassin do the job.

    19. Re:RBLs and not getting your mail by misleb · · Score: 1
      If you're running the mail servers for a business, how prudent is it to run a spam filter in the first place? While using something that relies on checking the content of the mail may be useful in getting rid of the most egregious spam, you don't want to block all items identified as spam. You can't run the risk of blocking your customers.


      Well, the sender should get a notification if a message was blocked by an RBL. Same can be done with SpamAssassin+Amavisd. Send a bounceback for low scored spam and drop the most egregious. Unless your customers are particularly sensitive and/or irritable, it shouldn't be a disaster if there is a false positive now and then. The way I see it, users run about the same risk of accidently deleting an important email (i've done it) while manually trying to clean spam from their inbox (or even special spambox).

      If you have to, have SpamAssassin archive all blocked spam.

      -matthew
      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    20. Re:RBLs and not getting your mail by secolactico · · Score: 1

      The other thing is to blackhole email that the domain name in the From field (e.g. comcast.net) does not match the sending IP

      I don't think this is very wise. What about hosted virtual domains? Maybe my email domain is mydomain.com but my mail server's PTR is mail.provider.com.

      I have found that making sure PTR and A match cuts a lot of incoming spam from dynamic addresses.

      --
      No sig
    21. Re:RBLs and not getting your mail by Ed+Avis · · Score: 1

      Suppose your normal mail is 90% spam and 10% legit (a pretty reasonable figure if your address is published on the web; my mail is two orders of magnitude worse than that). Then suppose that your spam filter is 90% accurate, in that it tags 90% of spam as spam, and only tags 10% of legitimate mail as spam. (Again, real spam filters usually have much lower false positive and false negative rates than this, after a bit of training.) Then for every one genuine 'rejected' message you send out, you'll send 81 completely bogus messages to forged 'From' addresses. Indeed, your server will be producing almost as much spam as it receives. And once people start getting spam from your mail server, they'll tag it as spam in their mail programs, and your domain and the keywords you use in your rejected messages will get associated with spamminess. You might even get onto a few blacklists. Legitimate mail from your domain will start to be filtered as spam by other people, and as for that one genuine rejection message you were so keen to send out... it's likely to be silently dropped into the recipient's spam folder.

      Now I am doom-mongering a bit here. I do still get 'your mail was filtered out' messages from various people, and a lot of the time they don't get marked as spam because each one is different. I don't see any genuine ones, BTW, just bogus ones from worms spoofing mail from my address. The point stands that if you try to send a rejection message for every possible-spam you receive, almost all of them will be bogus and you will be pumping out almost as much sewage as you receive.

      Antivirus companies used to be particularly bad at this; see Anti-Virus Companies: Tenacious Spammers.

      --
      -- Ed Avis ed@membled.com
    22. Re:RBLs and not getting your mail by mhollis · · Score: 1

      For our U.S.-based business, we simply blacklist all email from IP addresses outside the U.S. and Canada. We do not do business with any foreign interests, so we receive no legitimate email from other countries. This cuts our spam load by about 70 percent.

      Increasingly, businesses in the US and Canada will find it impossible to do this (depending one one's business). The economy and business is global and, as time goes forward most non-local industries will need to be able to communicate across national boundaries. The spammers know this.

      It used to be that you could safely block all e-mail from China. Multinationals can't do that any more. They're in China and are opening markets in many of the countries where spammers used to (and still do) operate freely.

      Of course, if what you are doing is local lawn care, or dry cleaning for your locality, you'll be able to safely block anything from outside of the US (or your own nation). But many businesses are increasingly needing to find markets, services and suppliers internationally.

      --
      Gods don't kill people, people with gods kill people.
    23. Re:RBLs and not getting your mail by ajs · · Score: 1
      New to the business? You don't block anything in this situation; You mark it with a header ( that's part of the email message that you would likely never see. Most mailers won't display them unless you ask it specifically to do so ), and leave the blocking/filtering up to the end user.

      Most businesses do not do this. Most use a spam-filtering appliance that uses a very conservative blacklist (often run by the appliance provider in conjunction with a service contract), fingerprinting and some heuristics to assess spam probability (much like SpamAssassin, and often using SpamAssassin), and then leaves the choice of what to do to the messages up to the administrator. Typical installs that I have seen discard all of the mail that's high probability spam. Some appliances keep such "discarded" mail for some period in a quarantine, and periodically give the user a list of held messgaes, making it possible to retrieve those that are mis-identified.

      The setup where headers are added so that users can do their own filtering really only works in a highly technical environment, and even then there will be administrative staff for which this is not a reasonable option.
    24. Re:RBLs and not getting your mail by dragonator · · Score: 1

      Yes, it can be a bit of a pain. There are however some nice tools to handle it for you and make most of the pain go away... along with the spam.

      Try a proxy tool called ASSP. I've been using it for several months and am very happy with it.

    25. Re:RBLs and not getting your mail by insanehomelesguy · · Score: 1

      I have to agree. It seems non-sensical to even think about it not being an option to filter. There are some fantastic black lists out there. But, having tools like this tutorial makes that more stream lined and even able to whitelist senders who are on a RBL. If they actually have legitimate e-mail to send. Filtering saves users time that can be spent doing their job. It also prevents other problems, like phising, virus or other exploit from getting to the user. Which saves me a lot of time. Time I can spend doing other things. Like surfing Slashdot.

      --
      Of all the things I've lost. I miss my keys the most.
    26. Re:RBLs and not getting your mail by farnz · · Score: 1
      If you're running sensibly, your server does the spam checking *before* returning the final 2xx result at end of data. Thus, once you discover that the mail's spammy, you give the server that's sending mail your way a 5xx result, and let it handle sending a bounce mail to the sender. Spam senders tend to just drop mail on 5xx codes, so you've not lost anything.

      That way, your mail server never sends bounces. If a server delivering mail to you starts sending backscatter bounces, it's their problem, and they need to find a way to stop it.

    27. Re:RBLs and not getting your mail by Not+The+Real+Me · · Score: 1

      "spammers typically have someone else's valid addresses in the "From:" field, and then you end up spamming that someone else with the bounce message."

      Let us not forget the "Return-Path:" either. We've gotten a bunch of bounceback/undeliverable return messages and when I've looked at the headers, it's a spammer putting something like: "Return-Path: info@our-domain" or "Return-Path: admin@our-domain" in conjunction with someone's pilfered e-mail address from a zombied machine.

    28. Re:RBLs and not getting your mail by MadMidnightBomber · · Score: 2, Informative
      If you're running the mail servers for a business, how prudent is it to run a spam filter in the first place? While using something that relies on checking the content of the mail may be useful in getting rid of the most egregious spam, you don't want to block all items identified as spam. You can't run the risk of blocking your customers.

      The firm that I work for gets something like 160,000 emails from external sources a day. Roughly 10% of these are legitimate. How prudent is it to force users to sift through 90% crap in order to get to the legitimate 10%. Currently, we use Postini as our primary MX host. They forward legitimate messages directly to our Exchange server, filter out 100% guaranteed spam, and drop the remainder into a quarantine that we check every few hours. Basically, all I am getting at is that spam filtering is necessary for enterprise environments and that there are actually some good tools to acheive it.

      Exactly. It is not viable to deliver all email to user's inboxes at this stage. When I orked at the local Uni we were dropping ~60% of mail using SBL+XBL, and dropping anything from machines which HELO'd as us (this was impossible because the MX's only got external email).

      This left a sane amount of email for MailMarshal to do content-filtering on - removing another ~50% of what was left.

      --
      "It doesn't cost enough, and it makes too much sense."
    29. Re:RBLs and not getting your mail by edb · · Score: 1

      A good way to do it is to always send a rejection back to the sender with a reason why. In the event that a real user is rejected, at least they know and can try again via another account, fax, or phone.

      Giving you the benefit of the doubt, I'm sure that by "send a rejection back" you meant "return a rejection SMTP response at SMTP time". You just said it sloppily.

      Of course, you never want to generate a new email message to report rejected email. That new email would almost certainly be going to a non-existent address (at best) or an innocent bystander (worse) or even an automated spamtrap address (worst of all). The "From:", "Reply-To:", and "Return-Path:" headers on spam are almost always bogus.

      A properly configured email server is set up to reject email at SMTP time, with either a 5xx permanent or a 4xx temporary status. Never, ever generate a new email to a supposed sender of an email unless you know for sure that it's going to the right place (for example, if it's a local address and the original message was verified with SMTP auth or other mechanism).

      If that's *not* what you meant, then you should not be surprised when your own email server gets its IP address added to numerous blocklists.

      --
      In theory, practice and theory are the same. In practice, they rarely are.
    30. Re:RBLs and not getting your mail by Ed+Avis · · Score: 1

      Yup - unfortunately some MTAs can't do this and can (by design) only send soft bounces, which makes them unsuitable for today's spam-ridden world. It would be nice if MTA comparison reviews mentioned this.

      --
      -- Ed Avis ed@membled.com
    31. Re:RBLs and not getting your mail by Anonymous Coward · · Score: 0

      Our company uses a service called Postini http://postini.com/ for this kind of thing. Spam messages are kept on the postini server and the user is given the option to deliver them after previewing them or just delete them. Their inbox isnt full of junk and we dont have to waste time setting up mail filters and the like. The admin interface is decent, and I have had no complaints from my co-workers.

  4. useless article by Anonymous Coward · · Score: 1, Insightful


    a single page article that tells you how to filter internal domain mail from external ?

    there is nothing on this page about how to use RBL (which is a lame way of filtering as it is) or whitelists or anything else, did the submitter actually what this article covers ?

    useless, now wheres my point and click interface ?

  5. Useless by Anonymous Coward · · Score: 2, Insightful

    The layout of the linked site is awful and sticking configuration snippets in text areas is awful. I didn't even see any warnings and if you're doing this, there are plenty of things that could go wrong. IMHO, setting up an MTA to reject spam at SMTP time is an involved process that requires the admin know what they are doing, blindly following a poorly written howto is a recipe for disaster.

    1. Re:Useless by Anonymous Coward · · Score: 0

      If you're really interested in these matters, use this approach. At the very least, it's well written and an easy read.

    2. Re:Useless by Anonymous Coward · · Score: 0

      If you're interested in this, you should start by reading the RFC's and manual for your MTA instead of relying on second hand knowledge.

  6. What the heck are you talking about? by Anonymous Coward · · Score: 2, Insightful

    You clearly have no understanding of how SpamAssassin works. Blacklists are only one of many negative as well as positive factors that SpamAssassin takes into account when evaluating whether a message is spam or not. You can adjust the score threshold to a level you're personally comfortable with.

    I have 3 tiers, ham (non-spam), possible spam (that gets moved into my junk folder), and true spam (really high scores) that gets rejected at the mail server. Also, for anyone else running anti-spam software at the server, DO NOT BOUNCE EMAIL BACK TO SENDERS if you're not rejecting at connect time. If someone used my email address to send spam (not to be confused with my server), I don't want to receive the bounces for it.

    1. Re:What the heck are you talking about? by Ucklak · · Score: 1

      The problem I have, or maybe I haven't figured it out yet, is that 95% of spam (that we get) comes from RIPE and APNIC addresses that are using for hire SMTP servers. The other 5% is from zombie machines on charter.net, rr.com, and other ISPs in the US.

      How can I just block out IP addresses instead of domain names without using an external firewall?

      --
      if you steal from one source, that is plagiarism, if you steal from many, well, that's just research.
    2. Re:What the heck are you talking about? by Ponga · · Score: 1

      Simple. Like this,

      80.190.252.0/24 550 spam not allowed

      (for exmaple)

      See this for more info,
      http://www.postfix.org/access.5.html

  7. postgrey by viniosity · · Score: 1

    I started using postgrey on my mail server a few months ago and my spam dropped from several hundred per day to about 10 per week. I wrote up this great how-to but figure that if spammer's got wise my advantage would be lost so I never published it.

    1. Re:postgrey by rel4x · · Score: 1

      In a world where e-mail address are $10-$30 per million, the amount of people using your custom config would probably never be high enough for spammers to care. No Spammer bothers to adjust their software to best every menial anti-spam fix. Only the big ones.

      --

      Before you mod me funny, think, perhaps I was insightfully funny?
  8. bad idea... by Vellmont · · Score: 3, Informative

    If you do this, and you're an ISP (which you likely are if you're getting 1000s of spams a minute) you're very likely to block legit mail from ever getting to subscribers. Realtime Blacklists aren't reliable enough to use alone in blocking spam. You'd serve customers better by buying more/faster machines to handle the load.

    If you DO decide to do this, be VERY carefull about the RBLs you use. Some RBLs list entire blocks of IP addresses of ISPs that have hosted spammers, and some even list every DSL/Cable modem static IP address. I've had me mail blocked by overzealous ISPs before (for just being on a cable modem static IP), so I'm not a big fan of using RBLs or other simple techniques to block spam at the postfix/sendmail level.

    --
    AccountKiller
    1. Re:bad idea... by Anonymous Coward · · Score: 0

      and some even list every DSL/Cable modem static IP address. I've had me mail blocked by overzealous ISPs before (for just being on a cable modem static IP)

      And why were you sending mail direct from your cable modem static IP? You should have been using your ISP's smarthost.

    2. Re:bad idea... by Anonymous Coward · · Score: 0

      RBL lists are the bain of internet service providers, I say. They continually blacklist whole blocks of IP space that are 'clean' due to 1 IP being a spam source, thus killing the email service of potentially hundreds of legitimate customers. Don't use them, there's got to be a better way than trusting some 3rd party, one which there is no control over.

    3. Re:bad idea... by glesga_kiss · · Score: 1
      And why were you sending mail direct from your cable modem static IP? You should have been using your ISP's smarthost.

      Because when I hook my laptop up to the net away from home using wifi or gprs, it can't get to my ISP's smarthost. So instead I have a publicly accessible server with authetication and SSL set up that I can use from anywhere. This is way better than the last 8 years where I've had to manually change the outgoing server.

      I've had to stop this approach because of some RBL lists blocking my mail. The whole of @aol.com ignores me. Instead I now use GMails SMTP server. It also has SSL and authentication, and can be reached for anywhere.

    4. Re:bad idea... by Anonymous Coward · · Score: 0
      And why were you sending mail direct from your cable modem static IP? You should have been using your ISP's smarthost.
      Because when I hook my laptop up to the net away from home using wifi or gprs, it can't get to my ISP's smarthost. So instead I have a publicly accessible server with authetication and SSL set up that I can use from anywhere. This is way better than the last 8 years where I've had to manually change the outgoing server.

      Okay, so hang your mail server off the cable modem and then configure it to use the smarthost. That's what I do. Client talks to the mail server, mail server talks to the smarthost - it's one extra hop, hardly a big deal. Now if your ISP smarthost finds itself on an RBL, then you have trouble.
    5. Re:bad idea... by Drizzt+Do'Urden · · Score: 1

      Make your personnal SMTP server relay through you ISP's, and everything will be fine!

      This is what I did, 2 years and counting without problems :)

    6. Re:bad idea... by Albanach · · Score: 1
      Because when I hook my laptop up to the net away from home using wifi or gprs, it can't get to my ISP's smarthost. So instead I have a publicly accessible server with authetication and SSL set up that I can use from anywhere. This is way better than the last 8 years where I've had to manually change the outgoing server.

      The question remains - why aren't you using your ISP's smarthost.

      There's no reason you can't run an SMTP server at the end of your cable modem - it, however should still pass it's traffic directly to your ISP's smarthost for onward delivery.

      That way you won't hit and RBL lsiting Cable / DSL users.

    7. Re:bad idea... by Anonymous Coward · · Score: 0

      There's no technical reason to relay through an ISP's heavily loaded server, you're conflating seperate problems. A static IP and matching forward / reverse DNS is good enough for us (and many other receivers) to whitelist. We have no qualms about blocking 'smarthosts' either!

      The question therefore is: Why use a smarthost?

    8. Re:bad idea... by Vellmont · · Score: 2, Insightful


      it, however should still pass it's traffic directly to your ISP's smarthost for onward delivery.

      And why would I want to have to rely on my ISPs mailserver to be up to send outgoing mail? I like reliability, I don't like outages. I also don't want to rely on them to route my mail properly, decide I'm a spammer and block me, or whatever. Also, why would I want to make it easier for my ISP to snoop on my mail? (who knows if they'll send targeted advertising, etc).

      If you don't mind all those things, fine. But there's very good reasons to not use your ISPs mailserver.

      --
      AccountKiller
    9. Re:bad idea... by Fez · · Score: 1
      And why would I want to have to rely on my ISPs mailserver to be up to send outgoing mail? I like reliability, I don't like outages. I also don't want to rely on them to route my mail properly, decide I'm a spammer and block me, or whatever. Also, why would I want to make it easier for my ISP to snoop on my mail? (who knows if they'll send targeted advertising, etc).

      If you don't mind all those things, fine. But there's very good reasons to not use your ISPs mailserver.


      Then you're probably violating your ToS, unless you've paid for a business account with a static IP in which case they can be de-listed from RBLs.

      Mail should NOT be coming from end-user dynamic IPs directly. Period. No excuses. Your ISP's mail servers exist for a reason, and secure relays such as Gmail exist for a reason.

      I know around here the cable provider has a TLS/SSL/SMTP Auth setup for their customers to use remotely, yours might have one as well.
    10. Re:bad idea... by Vellmont · · Score: 1


      Mail should NOT be coming from end-user dynamic IPs directly. Period. No excuses.

      Blah blah blah.. Frankly I don't care about your opinion. It matters to me about as much as what ice cream you prefer. There's no law that says I can't run my own SMTP server on my own internet connection. As far as your universal terms of service, they aren't so universal. Most ISPs prohibit spamming, but there's plenty that have no problem with running a SMTP server on your ip address. If my ISP starts whining about it, I'll go elsewhere.

      --
      AccountKiller
    11. Re:bad idea... by Fez · · Score: 1

      Unfortunately, attitudes like that are the exact reason that spam continues to get worse and worse. The reason it's so bad is because smtp is so broken and free-flowing. You should care about my opinon because I'm a sysadmin at an ISP, and people like me are who decide if your mail actually gets out.

      I bet if you checked the ToS, it does prohibit servers.

      Unfortunately very few ISPs (not even the one I admin) block outgoing smtp from anything but known servers. That's the best way to go. If your ISP is fine with running a server on a static IP, then it's trivial to let it pass through, you just have to let them know. Meanwhile the rest of the zombie horde gets nowhere. And with a policy like that, I doubt any RBL would ban them outright.

      We do use a couple different dial-up list RBLs, though, and it helps a lot. I can grep the mail server logs and get some numbers if you don't believe me.

    12. Re:bad idea... by Achromatic1978 · · Score: 1
      Then you're probably violating your ToS, unless you've paid for a business account with a static IP in which case they can be de-listed from RBLs.

      1) He mentioned a static setup. 2) His ToS with his ISP is of no relevance or importance to you, nor should it be to the decision to accept mail. 3) You're an optimist. I have watched many people try to have static IP addresses delisted from many RBLs with no success whatsoever (and not due to spam coming from them, but because the RBL administrators said "static or not, you're an ISP customer, use their server".

      Mail should NOT be coming from end-user dynamic IPs directly. Period. No excuses.

      Says who? Why? Clue: abuse by malcontents is not a legitimate reason.

    13. Re:bad idea... by Fez · · Score: 0, Troll
      1) He mentioned a static setup. 2) His ToS with his ISP is of no relevance or importance to you, nor should it be to the decision to accept mail. 3) You're an optimist. I have watched many people try to have static IP addresses delisted from many RBLs with no success whatsoever (and not due to spam coming from them, but because the RBL administrators said "static or not, you're an ISP customer, use their server".


      It's not really his place as the customer to deal with the blacklist, the ISP should be doing that. If I had a customer come to me and tell me they got blacklisted just because of their IP range, I would contact the RBL on their behalf. It's my netblock after all. At least with SORBS they require contact with the network owner. Also, the ISP should have something to the effect of '.static.' somewhere in the reverse DNS for the netblock containing static IPs to avoid this. I am an optimist, but I also have dealt with this on some occasions.

      Also, if he has his own domain, the ISP could setup his static IP to reverse resolve to his own domain. Toss in an SPF record, and I find it hard to believe he couldn't get delisted.

      He should be in contact with his ISP if he wants it to work. He's paying them to handle his mail, among other things, so why shouldn't they work with him? If they won't, then get another ISP that will.

      Says who? Why? Clue: abuse by malcontents is not a legitimate reason.


      Says just about every admin who is sick to death of spam from compromised zombie machines. Why should mail be allowed to flow from end users directly to mail servers? Why is it against the law in the US for anyone but a mail carrier to put things in a mailbox? Forcing people to go through proper mail servers provides an extra layer of protection and accountability. The ISP will likely see the spammers and cut them off (or at least raise flags when the ISPs server itself gets blacklisted!), and there is little to gain by allowing everyone access.

      Here's the mail server stats from yesterday on one server:
      108125 sbl-xbl.spamhaus.org
        29350 dynablock.njabl.org
        11938 dul.dnsbl.sorbs.net
          1586 dsn.rfc-ignorant.org
          1465 web.dnsbl.sorbs.net
            181 rhsbl.sorbs.net
            133 http.dnsbl.sorbs.net
            108 cbl.abuseat.org
              83 socks.dnsbl.sorbs.net
              63 relays.ordb.org
                2 misc.dnsbl.sorbs.net
                1 smtp.dnsbl.sorbs.net

      Over 40,000 rejected messages from dynamic IP ranges. (I can't use the SORBS composite list because of their RBLs has a habit of blocking yahoo, hotmail, etc. I'd love to block them but my customers don't agree...)

      I have yet to hear a single solitary complaint from anyone who had a message rejected by a dynamic range RBL, though I have had complaints about several other RBLs. We stopped using Spamcop's RBL because of too many complaints from customers.

      And since when is abuse not a reason to close something off? Let me paraphrase: "Why aren't all servers open relays? Abuse by malcontents is not a legitimate reason." or "Why should I validate the input in my web application? Abuse by malcontents is not a legitimate reason." - We're talking about a security hole here, not fair use rights.

      Spam is, unfortunately, not going away anytime soon. So we have to do whatever we can to block it and keep customers happy.
    14. Re:bad idea... by Anonymous Coward · · Score: 0
      And why were you sending mail direct from your cable modem static IP? You should have been using your ISP's smarthost.
      I so hate this excuse. In my country the mail servers of ISPs are monitored and using your own is a good way to escape that.
    15. Re:bad idea... by Vellmont · · Score: 1

      Unfortunately, attitudes like that are the exact reason that spam continues to get worse and worse. The reason it's so bad is because smtp is so broken and free-flowing. You should care about my opinon because I'm a sysadmin at an ISP

      Gee.. how did I possibly guess that? You're the hard-ass sysadmin that needs to control everything, and you get all uppity when you can't. Being a sysadmin is about managing risk, not control.

      Me running my own SMTP server has exactly zero impact on spam. I don't run an open relay, I run secure updated machines, and I don't get viruses.

      I bet if you checked the ToS, it does prohibit servers.

      Bzzzzt. But thanks for playing..

      We do use a couple different dial-up list RBLs, though, and it helps a lot. I can grep the mail server logs and get some numbers if you don't believe me.

      Even if this works to some degree, I still think outright blocking is always a bad idea. There's probbably going to be almost no one running an SMTP server on dialup, but I also can't believe there's really much spam coming from a dialup modem either.

      --
      AccountKiller
    16. Re:bad idea... by Fez · · Score: 1
      Gee.. how did I possibly guess that? You're the hard-ass sysadmin that needs to control everything, and you get all uppity when you can't. Being a sysadmin is about managing risk, not control.


      No, I'm not uppity and a control freak, I'm just sick of spam and viruses. :) I could care less if my customers run smtp servers, as long as they are responsible and have a static IP. I'll even do reverse DNS and such for them to help avoid problems with delivery. However, if they are on a dynamic IP, they are on their own. Thankfully our IP ranges haven't made it into any RBLs but I have considered submitting our dynamic ranges myself.

      I still maintain that allowing dynamic IP ranges to connect to our mail servers *is* a risk.

      Me running my own SMTP server has exactly zero impact on spam. I don't run an open relay, I run secure updated machines, and I don't get viruses.


      Right, I never said you were contributing to the problem. I said the attitude that everyone should be free to mail directly to other mail servers is what contributes to spam. If you have a mail server "properly" setup (i.e. valid hostname, reverse resolves, etc) then that is not a problem. Unfortunately you are also in the minority because you run secure updated machines...

      As I mentioned in a reply to a different person, if you were one of my customers and you (being in one of my netblocks) ended up in an RBL, it would be my responsibility to get that cleared as the netblock representative. If you have been listed, and servers are allowed in your netblock, make your ISP fight to get it delisted.

      Bzzzzt. But thanks for playing..


      Then you must have a very lenient ISP. From what I've seen, a lot of them ban servers in the ToS but never actually enforce it. That, or it's allowed due to the class of account you have.

      Even if this works to some degree, I still think outright blocking is always a bad idea. There's probbably going to be almost no one running an SMTP server on dialup, but I also can't believe there's really much spam coming from a dialup modem either.


      I posted the numbers from one of our mail servers in another reply, but in short: we block about 40,000 messages per day on dynamic IP RBLs alone, and I have yet to hear anyone complain. When we get false positive RBL hits, our customers tend to complain. We have had to drop a couple (the composite NJABL and SORBS lists in favor of certain sub-lists, and the Spamcop RBL) because of complaints.

      I'm not sure what the breakdown is on those with respect to how much are spam vs how much are viruses, but it's probably weighted more heavily toward spam.

      Ideally, we'd let all of the mail through and let SpamAssassin weight the RBLs, but that puts a much, much higher load on the servers and delays mail delivery even more with the kind of volume we have. And unfortunately it's not always in the budget to toss in more servers, or upgrade the current ones.
  9. Hard Filter by RBL -- A NoNo by Kirth · · Score: 4, Informative

    Don't filter by RBL. Use them to give scores to Spamassassin, but don't reject mail on basis that some host is in some RBL.

    * There are RBLs nearly impossible to get out from, and you might actually get an IP assigned months earlier to somebody who never requested a removal.
    * False positives. Mails misidentified as spam (typically: newsletters which the signed up person no longer wants, vacation-mails in foreign languages) might bring you onto an RBL.
    * Collateral damage. A shared server with 1000 users and 2000 domains might turn up in an RBL because one of those users had an inscecure formmail running a night long. And even after removal by the sysadmins in the morning, 1499 users can't mail you the next 18 hours.
    * Spurious criterions for getting listed. Like "unsolicited bounces" or "sent mail to secret spamtrap"

    So while RBLs are really a useful tools for deciding whether a mail might be spam, using them as THE ONLY reference on whether something is spam or not is just foolish.

    --
    "The more prohibitions there are, The poorer the people will be" -- Lao Tse
    1. Re:Hard Filter by RBL -- A NoNo by repetty · · Score: 3, Insightful

      >> * Collateral damage. A shared server with 1000 users and
      >> 2000 domains might turn up in an RBL because one of those
      >> users had an inscecure formmail running a night long. And
      >> even after removal by the sysadmins in the morning, 1499
      >> users can't mail you the next 18 hours.

      Good point. On the other hand, I don't fucking care. I don't hear anyone knocking on my door, offering to help me filter out my spam. RBL's work GREAT on a tough problem, which is why they haven't gone away.

      And the collateral damage? If a user/subscriber abuses a service then the service provider SHOULD be held accountable and those other 1499 users are better off elsewhere.

      --Richard

    2. Re:Hard Filter by RBL -- A NoNo by wayne · · Score: 3, Insightful
      * Spurious criterions for getting listed. Like "unsolicited bounces" or "sent mail to secret spamtrap"

      Neither sending bounces to forged email addresses (backscatter) nor sending email to spam traps is a "spurious criteria" for getting listed. If you are doing either of these, you are part of the spam problem and you deserver to have your email blocked.

      Configure your mail server to reject *during* the SMTP session, or only send bounces after the fact if the email passes something like SPF. Using SPF's "best guess" default record of "v=spf1 a mx ptr" when there isn't an SPF record may by safe, but you are still risking sending backscatter to innocent people. Domainkeys and DKIM validate the From: header, which isn't where you should send bounces to, so it can only be used when the Envelope-From and the From: header match. Really, the easiest thing to do is just to always reject during the SMTP session and not accept-then-bounce.

      --
      SPF support for most open source mail servers can be found at libspf2.
    3. Re:Hard Filter by RBL -- A NoNo by eXtro · · Score: 1

      Name a provider where a user hasn't abused the service at some point in time. Perhaps only people capable of running their own provider should have email access? Fine, but name a backbone provider that hasn't been abused.

    4. Re:Hard Filter by RBL -- A NoNo by iangoldby · · Score: 3, Insightful

      I agree that ISPs should to some extent be held accountable, but to hold them 100% accountable ignores the fact that it is virtually impossible to pre-emptively stop all forms of email abuse.

      For example, SORBS have a policy that they will blacklist a server if they receive three or more emails to their spam trap addresses. These addresses are kept secret, so the ISP can't know what these spam trap addresses are. Suppose a malicious client of the ISP discovers (or guesses) one or more of these spam trap addresses. He can then send just three emails, the contents of which need not be 'spammy' in the least. The ISP's server will then be blacklisted for at least 48 hours, but usually much longer. An ISP has absolutely no defence against this kind of thing.

      You could easily think of other examples where the ISP has no possible way to recognise that malicious email is being sent until after it has gone out of the door.

      But the real issue is that the people who suffer are the other customers. They are completely disempowered, because they will just be ignored if they contact the RBL operator (since they are not the administrator of the blacklisted server). They could in principle find another ISP, but that is usually an unacceptable solution due to the disruption involved. If they don't have their own domain, they lose their email address, which means they will continue to lose emails. They can't win.

      ISPs should be fighting against spam, but not with RBLs. The only time it is justified to use an RBL as a single criterion for rejecting email is when the administrator of the filter is also the only consumer of the filtered email. (Or perhaps if you have the explicit approval of all consumers that missing some non-spam emails is acceptable.)

    5. Re:Hard Filter by RBL -- A NoNo by Anonymous Coward · · Score: 0
      If a user/subscriber abuses a service then the service provider SHOULD be held accountable...


      That's total rubbish. Even the most conscientious, spam-hating ISP can have something like this happen to them. It really isn't fair to blacklist them for that, regardless of how furious you get when you receive spam. No amount of indignation on your part can justify such an ignorant, capricious policy.
    6. Re:Hard Filter by RBL -- A NoNo by Achromatic1978 · · Score: 1
      sending bounces to forged email addresses

      And sans SPF, manual intervention, how does one programatically tell that a from address is forged so as to not send a reject?

      Clue: fixing the spam problem should not involve neutering legitimate functionality of the mail server - it's a bandaid.

    7. Re:Hard Filter by RBL -- A NoNo by sjames · · Score: 1

      And the collateral damage? If a user/subscriber abuses a service then the service provider SHOULD be held accountable and those other 1499 users are better off elsewhere.

      Imagine you're a colo provider. One or your users gets hacked and starts spamming like mad. Your alert admins (perhaps you) cut them off within an hour. Obviously, you deserve to watch your business go down in flames for stupidly failing to hire a psychic to stop the spam before it started. And your 1499 other customers are equally deserving of business failure for failing to psychically predict that you would fail.

      It's worth noting that you can get into a blacklist even if the entire subnet your on blocks ALL SMTP traffic. Just have one user's website spamvertised and you're done. Or perhaps their server gets exploited and a spamvertised redirector is put on it.

      RBLs CAN help identify spam, but should be checked by spamassassin and scored appropriatly rather than dropping a connection based on the sayso of someone you've never met.

      If you're running your own personal mail server, knock yourself out, but if you're running a mail server for others, it's probably better to let them decide what mail they do or don't want.

    8. Re:Hard Filter by RBL -- A NoNo by geminidomino · · Score: 1

      Spoken like someone who's run only a small-volume mailserver, if any at all.

      From the other side:
      Consider it in terms of overhead.

      DNSBL:
      Connection opens
      Rec. Server sends banner
      Sending Server HELOs/EHLOs
      Rec. server responds
      Sending server begins MAIL transaction
      Rec. Server queries DNSBLs for sending IP.
      Rec Server sends 550 (permanent failure) error.
      Rec. Server ends connection, leaving Sending mail server to deal with the 550 error.

      Spamassassin using DNSRBL checks:
      Connection opens
      Rec. Server sends banner
      Sending Server HELOs/EHLOs
      Rec. server responds
      Sending server begins MAIL transaction
      Rec. Server accepts mail
      Sending server closes connection.
      Rec. server delivers mail, piping through spamassassin (often a perl process)
      SA processes mail-see below
      SA Marks mail and delivers/drops/redirects as configuration specifies.

      The SA processing is not a lightweight task.
      -Parse headers, checking "Received:" lines for "suspect" IPs
      -Parse mail text through a barrage of regexes (the more rules you have, the more resources this takes)
      -etc. etc. etc.

      Multiply these by 2000, 2 million, or 200 million mail messages recieved. When you get into the bigger numbers, your mail "reliability" (I've noticed that word being bandied about quite a bit) is going to flatline when SA brings your mailserver to its knees because it's trying to parse 3 libraries of congress every hour.

      Don't let this give the impression that I don't like spamassassin. It's a great program and I run it on my own mailserver. The difference is, I turned off the RBL checks and let sendmail handle that. SA only sees the message if it PASSES the rbl check.

    9. Re:Hard Filter by RBL -- A NoNo by geminidomino · · Score: 1

      Name a provider where a user has only gotten one chance to abuse the service. Much easier (though, sadly, still a small subset).

      The real RBLs don't list based on single incidents, but patterns of abuse. Comcast, for example, is one of the worst in this regard. At one point (I don't know if this is still the case), they actually claimed connecting a firewall/router between the cable modem and PC was a violation of thier TOS.

    10. Re:Hard Filter by RBL -- A NoNo by geminidomino · · Score: 1

      A reject should NOT be sent by your server. YOUR server should be telling the sending server "Err... come back later" (450 error) or "No, that's not going to happen. Ever. Not if you were the last postfix server on earth" (550 error).

      Generating the bounce is the responsibility of the sending server, since it's not relying on easily-faked headers to pick its target.

    11. Re:Hard Filter by RBL -- A NoNo by Achromatic1978 · · Score: 1

      Of course - stupid me... I knew I didn't get enough sleep last night!

    12. Re:Hard Filter by RBL -- A NoNo by Slashdot+Parent · · Score: 1
      He's not saying don't use RBLs, he's saying don't just automatically reject email based on one RBL hit. Use RBLs as just one factor in the mail acceptance logic.

      If I were your customer, and my clients weren't able to email me because you won't allow their email to go through, you don't deserve my business.

      --
      They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
  10. I'll Do It One Better... by Beefslaya · · Score: 2, Interesting

    Here is a link setups to build servers with postfix, amavisd, SpamAssassin, ClamAV, Razor (you could also use these settings just for postfix to add better spam resistance).

    I not only am I the President, I'm a user.

    http://www.freespamfilter.org/

    Enjoy...I love it...

    1. Re:I'll Do It One Better... by Beefslaya · · Score: 1

      Also, "The Book of Postfix" (yes it's a regular book) is great for showing you how to fight spam with just postfix.

      90% of spam problems are because admins and ISP absolutley refuse to follow the RFC guidelines set forth. (i.e. DNS entries for all "servers" live on the Internet, proper hostnames.)

      Then it's just a matter of blocking non-RFC compliant servers from sending you mail. It's that easy.

  11. A good RBL experience? by autocracy · · Score: 4, Informative

    I am aware there's definitely a fair number of over-zealous blacklists, but I've had an extremely good experience using cbl.abuseat.org as a blacklist source, and haven't encountered any false-positives while perusing my mail logs.

    --
    SIG: HUP
    1. Re:A good RBL experience? by Beefslaya · · Score: 1

      A lot of the RBL's reference each other. So adding more then 2 or 3 usually is redundant.

      I've had GREAT results with them.

      http://rfc-ignorant.org/ has been a great one for me.

    2. Re:A good RBL experience? by NastyGnat · · Score: 1

      You might consider using sbl-xbl.spamhaus.org instead. That covers cbl.abuseat.org as well as several other rbls all in one check. I've been running the settings below in my postfix for roughly the last year and the only "false positives" I've had to deal with are with sites that are open relays and had to get their site fixed. In each case they apparently requested to get removed, got removed within a few hours, and then within a few weeks got relisted again because they didn't atually fix the problm.

      Eventually I agreed to whitelist the IP address of one site but have had to play chase the address 5 times each time they call and ask why we're blocking their mail. They complain it's our problem that they get blocked despite the fact that CBL has a copy of the messages sent via their open relay. When asked why they keep changing IP addresses, they said they didn't want to bore us with their security precautions.

      As far as hard lists to get removed from, sorbs appears to get the most complaints, especially with some of their ideals about $50 fees for removal and entire subnet blocking. None the less if you stay active with your mail system you should be able to determine quickly if you have any false positives and need to remove any rbls. FWIW we're doing
      Postfix+Amavisd-new(with Spamassassin)+Vexira(clamAV as a failover)+Greylisting+Bayes learning as well as smptd auth for users outside or local network. We're not running and ISP here, but we see about 175-200K e-mails a month with about half of them getting rejected at SMTP for one reason or another.

      Anyway, here is a glimpse at our postfix rules.
      smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_client_access hash:/etc/postfix/white-blacklist, reject_invalid_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_destination, reject_rbl_client relays.ordb.org, reject_rbl_client list.dsbl.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client dul.dnsbl.sorbs.net, check_policy_service inet:127.0.0.1:10030, permit

      --
      -- this space for rent --
  12. RBL-based rejection can be a BAD thing by frostyboy · · Score: 1

    Rejecting mail outright based on RBL results is an invitation for loads of false positives. If you're getting "1000s of messages per minute," chances are you are a large business or an ISP. Either way, your customers sending mail from foobaz.net (for example) won't be happy when their no longer gets through because some boneheads at spamcop or spamhaus put them on the RBL.

    If you don't have the proper setup to accept that many messages and do adequate "tag-and-forward" spam analysis, or at least reject later in the delivery cycle based on cumulative results from multiple RBLs, you need to beef-up your mail architecture. Of course, you could just set it to randomly drop 80% of all of your incoming email into /dev/null and you would likewise solve your traffic problem.

    --
    Who is General Failure? And why is he reading my disk????
    1. Re:RBL-based rejection can be a BAD thing by Mr.+Roadkill · · Score: 1
      Let me just pipe in with my two cents worth. I'm the mail administrator at a University, and have been through all these arguments before.

      Rejecting mail outright based on RBL results is an invitation for loads of false positives. If you're getting "1000s of messages per minute," chances are you are a large business or an ISP. Either way, your customers sending mail from foobaz.net (for example) won't be happy when their no longer gets through because some boneheads at spamcop or spamhaus put them on the RBL.

      (actually, if they're in SpamCop or SpamHaus, I'd say they probably deserve it; I won't block directly on SORBS-Spam, but I'll cheefully reject on most of the other SORBS lists)

      Keep your postmaster address completely unfiltered, and have meaningful information in the rejection notice that invites affected senders to contact you so something can be sorted out. Our mail gateway has lately been rejecting 100000 messages a day (around 80% of attempted deliveries) and I've been getting between four and a dozen reported "false-positives" per month, and we're usually happy to have something temporary in place to let their mail through within a couple of working hours of being informed.

      This also brings up the fact that anyone who uses RBLs without knowing what they are or what they might do is grossly irresponsible. Anyone using them (myself included) needs to understand that from time to time an ISP or a trusted business partner might end up in one - and you'll need whitelistings to ensure the straight accept/reject RBL check doesn't apply to those mail sources. This ought to be common knowledge. Anyone who uses this to attack RBLs per se really ought to be attacking a certain administrative mindset that sees RBLs as a magic bullet that doesn't need human oversight - they aren't, and I'm not sure any single technology can really claim to be.

      Okay... so we use RBLs, our local shit-list of sources we don't want mail from (to save doing lookups for Charter cable ranges and the like) and local whitelistings. What else do we do here?

      We run Sendmail on our external gateways, and use Mimedefang as a milter - that runs messages past ClamAV and SpamAssassin with some locally tweaked rules to increase the scores given by various hits - RBLs we wouldn't dare to block against directly, URIBLs, Razor, etc. We find that a reasonable amount of spam gets caught by this approach, and our first-level approximation based on straight RBL and local shitlist checks keeps the load down to a reasonable level.

      If you don't have the proper setup to accept that many messages and do adequate "tag-and-forward" spam analysis,

      ...and what, store all this stuff in a suspected spam folder, with a whole lot of similarly-scoring legitimate stuff? Tried that... our users were forever losing legitimate mail because they'd assume that everything in there was spam... or they'd get confused, and delete the wrong thing. The recipient never sees it, and the sender doesn't know it wasn't seen... at least if a message is rejected, the sender knows it wasn't seen and has the opportunity to do something about it. If you can keep the amount of accidentally blocked mail really low, and keep inboxes reasonably spam-free, then rejecting does less harm overall than tagging. We let people opt out of the filtering, though... some people really don't get spam, believe it or not.

      or at least reject later in the delivery cycle

      You have to be kidding... that sounds like a recipe for backscatter.

      Of course, you could just set it to randomly drop 80% of all of your incoming email into /dev/null and you would likewise solve your traffic problem.

      Now you're just being silly.

      In practice, I've found that RBL checks as a first approximation, followed by SA checks on what passes those, keeps the spam level here to being a minor annoy

  13. Great guide, ... NOT by xming · · Score: 2, Informative

    There are more explaination on the postfix.org than this FA (fine article). Wisely using good RBL (for open proxies) and graylisting and some helo/header checks should reduce a lot of spam.

  14. Greylisting + a bit more by stabiesoft · · Score: 2, Interesting

    I use a combination of greylisting (10 mins for normal IP addresses and an hour for dynamically assigned IP addresses). I also do a very quick check on a few sender domains such as yahoo.com A "from" yahoo.com must be from a machine with .yahoo.com. If not, it is rejected. Works quite well with less than one spam per day. Given that yesterday had 466 spam's that got rejected, I'm pretty happy. I cannot recall anyone complaining they can't get in. Greylisting works really well because real mail servers try hard to deliver whereas spammers don't try that hard for delivery.

    1. Re:Greylisting + a bit more by Anonymous Coward · · Score: 0

      > spammers don't try that hard for delivery

      My mail logs disagree, zombies try to deliver a message a preset number of times no matter what you do.

      If ISP's can shape their traffic for BT, they can monitor it for spikes in a users port 25 egress and cut them off. There's no excuse for the current situation, Microsoft have a lot to answer for.

    2. Re:Greylisting + a bit more by Just+Some+Guy · · Score: 2, Insightful
      I also do a very quick check on a few sender domains such as yahoo.com A "from" yahoo.com must be from a machine with .yahoo.com. If not, it is rejected.

      If by that you mean that you're using SPF or similar, that's a great idea. If it means that you wrote your own code that does something like "if fromdomain != helodomain: reject()", then your system is pathologically broken and needs to be updated.

      --
      Dewey, what part of this looks like authorities should be involved?
    3. Re:Greylisting + a bit more by Achromatic1978 · · Score: 1
      something like "if fromdomain != helodomain: reject()", then your system is pathologically broken and needs to be updated

      Exactly. My dedicated server runs mail, too, and has a A record of hostx.isp.com. Though it handles mail for a dozen domains, all with SPF (and Sender ID) records, the number of bounces / drops I get from people who do this is scarily high.

    4. Re:Greylisting + a bit more by stabiesoft · · Score: 1

      Since everyone seems to be mis-interpreting...
      Nope, its not the "helo" I key on, it is a reverse DNS lookup of the sender's IP address.
      For a few (granted few, but some of the biggies like yahoo.com) the sender's IP address
      can be checked to make sure its from where you expect. yahoo.com comes from ???.yahoo.com
      If it does not, then it is spam. Granted a real yahoo user could send mail from
      their machine and mark it as from yahoo, but thats not really valid. Yahoo's mail
      is supposed to come thru their servers. The other's poster's comment is also correct,
      zombie's do try hard, but with ever changing email from email domains. So if a spammer
      sends foo@hotmail.com, the foo@gigigi.com, the IP address is marked illegal.
      I'll admit, this method may not work for an ISP, but it does work well for small biz.
      I've yet to have a customer complain their mail didn't come in. Whereas before,
      when I used sender verification, I *did* have troubles because some ISP's would
      call me a spammer because I'm in a address range they reject.

    5. Re:Greylisting + a bit more by Just+Some+Guy · · Score: 1
      Since everyone seems to be mis-interpreting... Nope, its not the "helo" I key on, it is a reverse DNS lookup of the sender's IP address. For a few (granted few, but some of the biggies like yahoo.com) the sender's IP address can be checked to make sure its from where you expect. yahoo.com comes from ???.yahoo.com If it does not, then it is spam.

      To the contrary, it looks like we're interpreting you quite well.

      Your system is broken - full stop. There are many, many reasons for an email to come from a server with a different PTR, such as, oh, a mailserver that hosts more than one domain. My mailserver has been named kanga.honeypot.net for almost a decade, but my primary email address is kirk@strauser.com. This is a very common and compliant setup, but your system would reject all mail from me for no real reason whatsoever.

      --
      Dewey, what part of this looks like authorities should be involved?
    6. Re:Greylisting + a bit more by stabiesoft · · Score: 1

      I guess you missed the part about "a few domains" such as yahoo. No, its not broken for your domain, unless you send mail as foo@yahoo.com from your server. Otherwise, your server would greylist normally and come in fine.

  15. Wrong by Anonymous Coward · · Score: 0

    You should be able to send email between any 2 routable IP's. It's unfortunate that we have a minority of criminals and amoral profiteers ruining it for everyone. I myself reject residental hosts on networks operated by irresponsible ISP's (comcast, netvision, road runner, verizon). That doesn't mean I agree with forcing people to use a smarthost to send legitimate email.

  16. sendmail tweaks by ltjohhed · · Score: 5, Informative

    A far more effective and less faulty way to filter out some spam can be done by using the new features added in sendmail 8.13.

    FEATURE(`great_pause',5000)
    That one is given in your .mc file.

    Wait's 5000ms to say HELO (EHLO) and all MTA's starting to send data (spambots not being all that RFC-aware) before that is discarded.

    I've measured that it atleast cuts 15-20% of the total amount of spam.

    --
    All generalizations are false
    1. Re:sendmail tweaks by leighklotz · · Score: 2, Interesting

      It's FEATURE(`greet_pause',5000) not FEATURE(`great_pause',5000).
      The previously-referenced Acme page mentions it.

    2. Re:sendmail tweaks by Shadowlore · · Score: 1

      If you run a server that needs to handle a lot of email, and do so in a timely manner, this will hose you. if you run an enterprise environment where there are applicaitons (usually JavaMail based ones) that bork and die on this but are sending legitimate mail, this will hose you.

      There are many legitimate applications that will die if you do this. To recommend this as a general solution is a mistake. Sure, we would all love it if the legitimate apps worked properly, but that isn't the real world. The real world is painful.

      If you want a personal or small-medium user amount email address that your friends/family/etc. can send you email to but get no spam, you can set up an encryption based mail system. Only encrypted and/or signed mail is allowed in. Period. You can run this type of system in two ways:

      1) Look for signed/encrypted message, extract key and verify signature. Check key against your key database. If it is not a valid signed/encrypted AND is not in your trusted/accepted keys list: reject it.

      OR

      2) Look for signed/encypted email, verify signature and if the signature is not correct reject it.

      I use it on one of my addresses and am transitioninng all other than mailing lists to it. 100% spam free. I use option 1. If someone with a valid key does send a signeed and/or encrypted spam I can remove that key from the allowed list and that problem goes away. The likelihood of getting spam from this account is slim to none.

      Not useful of unsolicited emails, but I have an application mechanism for people who want in. The time I spend validating new senders is a tiny fraction of the time spent cleaning spam, running spam filters, and trying to keep up with the latest spam fighting techniques on the server.

      --
      My Suburban burns less gasoline than your Prius.
  17. Monitor the results of your blacklists! by reed · · Score: 2, Interesting

    Warning, I used to use RBLs to reject mail, but occasionally all of yahoo or somethnig gets added to a blacklist, and so mail from yahoo would start bouncing (including yahoo groups -- they really ought to use a seperate network for yahoo groups as their free webmail!). So instead of rejecting mail, I started just inserting a warning header, X-Spam-Blacklists:, which is easy to do with Exim. (I assume also with Postfix). Then I could filter the message in Thunderbird into a "probably spam" folder. You could also set up SA to increase a messages score if it's in a blacklist, I think, but I've never tried it.

    So if you do set up RBL rejection, make sure you pay attention to what it's rejecting. Skim through the log file a few times in the week or two after doing it, otherwise you'll never no that it's being rejected.

    1. Re:Monitor the results of your blacklists! by (Score:1) · · Score: 1
      Add check_client_access pcre:/etc/postfix/client-checks.pcre to your main.cf (smtpd_client_restrictions), with the RBL's in between and you are able to both white- and blacklist specific IP-adresses and -ranges.

      /etc/postfix/client-checks.pcre:

      # Yahoo group mailers
      /216.155.201./ OK
      /66.94.237./ OK
      /66.163.187./ OK
      /216.155.203./ OK
      /209.73.160./ OK

      # gmail
      /66.249.92.202/ OK

  18. greylisting not all that useful. by nblender · · Score: 4, Insightful
    To all you greylisters, I don't know what part of the interweb you're from but when I survey my spam, I find that great tracts of it come from zombies via their ISP's mail server which means greylisting is no longer effective. It was effective last year but I think you folks missed the boat. I moderate a mailing list for a popular open source operating system project that uses greylisting and I still get about 100 spam per day as owner-listname...

    Spammers are having their zombies dig through the windows configurations to find the owners email relay and using that to send their spam. It's not that difficult and combats greylisting.

    1. Re:greylisting not all that useful. by badger.foo · · Score: 1
      Your comments certainly do not match my experience here.

      As far as I can tell from my logs, greylisting remains effective, getting rid of certainly no less than 85% per cent (likely more in the 95%+ range) of the spam attempts. Whatever spam does get past greylisting mostly gets dealt with by content filtering (spamassassin/clamav). Then again, there are several greylisting implementations, and the one you are using is perhaps not very good to start with or not too well tuned.

      http://www.bgnett.no/~peter/pf/en/spamd.html gives you a rough idea of how to do MTA independent greylisting with OpenBSD's PF (doable on other BSDs as well).

      I did notice a few months back that spammers started trying to inject their payload via secondary or even teritary MXes for the domain they target. After a few weeks of that, I intorduced a setup rougly like the one described above on our secondaries, and it pretty much killed the remainder of our spam.

      --
      -- That grumpy BSD guy - http://bsdly.blogspot.com/
    2. Re:greylisting not all that useful. by stormpunk · · Score: 1

      I run a small server and I find greylisting to be very useful. Just because you still get spam doesn't mean it is pointless. About 90% of incoming attempted deliveries to my server are blocked before the mail even gets to spamassassin. The zombies aren't enough reason to throw away greylisting. It's a simple measure and even if it eliminates 1% of incoming spam, and doesn't cause any major headaches I figure I might as well put it in.

      Greylisting, conservative RBLs, some simple HELO checks (don't accept mail from somebody claiming to be your own mail server), domain name existance check, and SPF are all pieces that work together to at least slow down the onslaught.

    3. Re:greylisting not all that useful. by Draco_es · · Score: 1

      when I survey my spam

      Unfortunately, I can't survey my spam, because is near to 0 (well, it's a toy system, 500 users, but are lots of organizations like mine that get lots of spam). OpenBSD's spamd with greylisting & blackllisting(spews1) & spamtrap does the job near perfectly. Other tricks like trapping connections to secondary MX while primary is up can be very effective, also.

      I think that the kind of spam you describe can't the more common at all. ISP's can rate-limit their customers, and if their main mailserver gets into blacklists they may get into trouble, so I'am sure they track zombie's IP which use their SMTP relay. Besides, SMTP AUTH headers give a lot of info about who's owned.

    4. Re:greylisting not all that useful. by Just+Some+Guy · · Score: 3, Insightful
      Spammers are having their zombies dig through the windows configurations to find the owners email relay and using that to send their spam.

      In other words, greylisting makes zombies relay spam through their ISP, forcing said ISPs to deal with the problem to keep their mailserver from being both overwhelmed and added to every DNS RBL in existence. In what possible way is this not a Good Thing?

      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:greylisting not all that useful. by Greyfox · · Score: 1

      It's not like any one single method will completely solve your spam problem. I'm using a combination of greylisting and SPF checking on my domains at home and a couple of spams a week get through to SpamAssassin. Thus far SpamAsssin has been giving me a 100% success rate at tagging the spams that do get through and a 0% false positive rate. Pretty good, I think.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    6. Re:greylisting not all that useful. by Anonymous Coward · · Score: 0

      My experience mirrors yours. Greylisting is still amazingly effective. I have dual mail gateways. I solved the secondary MX problem by pointing each of them at a single PostgreSQL database on another server as the greylist backend. Works like a charm.

    7. Re:greylisting not all that useful. by Ponga · · Score: 1

      Greylisting is still very useful to me. But I have to say that it will become not as useful in the near future, (already seeing it happen, in fact). Besides more spam being relayed through 'legit' mail servers, virus/mailbot coders are getting wise to the idea, and starting to retry delivery, more like an RFC complient smtp host. Yet, I'm still getting some good use out of it...

  19. Some words of wisdom by bfree · · Score: 3, Informative

    Here is an insightful blog posting from Justin Mason about using RBL's (and bl.spamcop.net in particular which this HOW-TO mentions) for filtering spam. You could see a staggering amount of false positives unless any rbl is only one part of a scoring system which decides whether a mail should be rejected.

    --

    Never underestimate the dark side of the Source

    1. Re:Some words of wisdom by derF024 · · Score: 1

      I see a lot of people making this kind of association. "I used superaggressiveblacklist.com's list and all my mail got blocked! RBL's are a complete waste!" That's kind of thinking is just silly. There are hundreds of popular lists on the internet, and not all of them are as aggressive as that other list you used. I use list.dsbl.org and xbl.spamhaus.org on all the mail servers I run. I check mail logs regularly and inspect rejected messages for false positives, and haven't found one yet. Those two lists also drop a staggering amount of mail every day; around 90%. I let spamassassin pick up the rest (around 8%.) Spamassassin, unfortunately, does have false positives, so anything that spamassassin tags gets delivered with a 'possibly spam' header added.

    2. Re:Some words of wisdom by Mr.+Roadkill · · Score: 1
      Spamassassin, unfortunately, does have false positives, so anything that spamassassin tags gets delivered with a 'possibly spam' header added.
      Using the default scores?

      I've got the scores tweaked somewhat, and we tag at 5 and reject at 15. RBLs (including ones we wouldn't reject on outright), URIBLs, Razor checks etc are all good for five points each. No PTR gets 10 (although that one's hacked together in our mimedefang filter). Try skewing the scores somewhat for tests that look super-spammy, and reject at some relatively high threshold that requires a few to be tripped... that seems to limit the SA false-positives to things that would have problems getting through many other systems anyway.

      We have RBL checks (and some mitigating whitelistings) ahead of all that, and find that our system copes really well with even high-volume days. We normally reject around 100000 messages per day, but that's been up to a quarter million on occasions.

  20. Alternative guide by Anonymous Coward · · Score: 0

    For those of us who like details, here's an alternative spam filtering guide: http://www.flakshack.com/anti-spam/wiki/index.php.

    I'm using the setup presented to filter about 1000 messages per day before they hit our exchange server. It works very well and so far has had no false positives. However, it's difficult and time consuming to set up and needs to be trained with sa-learn before using.

  21. assp is better by Anonymous Coward · · Score: 0

    http://assp.sourceforge.net/

    We use ASSP its an SMTP mail proxy that sits infront of your mail server.

    The advantage of assp is it can reject emails without having them processed and it has a greylist and penelty box. The offical site explains it better than i can. All i know is since we started using it (and after training the bayes database) ive had no spam for several months....

  22. They are, but it's... by Anonymous Coward · · Score: 0

    collateral damage.

  23. greylisting will always be useful by wayne · · Score: 2, Insightful

    Greylisting will always be useful, at least to a certain degree. When you get email from an unrecognized source, one that you can't judge as being a source of legitimate email or if it is a spam source, greylisting lets the reputation systems like DNSBLs and DCC/Razor/etc. catch up. Also, good ISPs and mail admins have tools to watch for likely spam runs. Again, greylisting gives those tools time to act and purge the spam.

    Sure, greylisting also gets rid of spam from spambots that don't retry email, and that's a plus but, as you mention, making sure the email gets retried isn't that hard.

    Greylisting is not a Final and Ultimate Solution to the Spam Problem, but it will always be a useful tool.

    --
    SPF support for most open source mail servers can be found at libspf2.
  24. More of this kind of thing by stunt_penguin · · Score: 1, Offtopic

    I for one, welcome our spamfighting overlords, and think that we should see more of this kind of thing on the front page of ./

    Although we've got our share of trolls and fanboys ruining it for the rest of us, I daresay that there are at least a few slashdotters out there who could write guides at least as good as this on a number of geeky and related subjects and present them on the front page, in much the same vein as the original content presented in book reviews etc. It might even be worth paying the author a few bucks for the privelige.

    I know that the news presented here is usually linked-to content, but I think some original guides with relevant links would be content at least as worthy as the 'Nanocosmetics used since Aincent Egypt' article posted by that little troll Roland last night.

    --
    When the posters fear their moderators, there is tyranny; when the moderators fears the posters, there is liberty.
  25. Filtering against dictionary spam by knarfling · · Score: 2, Informative

    At my last company, we had a big problem with spam. But because the company did some online marketing, there were people in our marketing department that WANTED to get some of the spam so they could see what tactics the competition was using. At one point our mail gateways were so clogged, mail was being delayed by up to 4 or 5 hours at our gateway.

    We fixed the problem by having postfix discard any mail that was not addressed to a legitimate email account. We ran a script that would pull all valid email addresses from exchange and told postfix to reject anything else. We set that script to run every hour to catch any changes to email addresses. Our emails that went through spamassassin dropped by almost 90%.

    Our only trouble was that if we rejected with NDR, there were tens of thousands of Non-Delivery Reports being sent out, and if we rejected without an NDR, people who mispelled email names (sean@domain instead of shawn@domain) never got a report stating that their email did not go through.

    Overall, it was a huge success and we didn't have to mess with greylistings or blacklists.

    --
    Great civilizations have lived and died on false theories. Don't mess up mine with a few facts.
    1. Re:Filtering against dictionary spam by DrGalaxy · · Score: 2, Informative

      Agree with parent.

      I call this technique "early recipient rejection". As soon as the SMTP client sends "RCPT TO:" our postfix systems check a database list of valid recipients and drop the message immediately if it is not valid.

      To set up early recipient rejection with postfix, read the docs about "check_recipient_access" and apply that directive to your "smtpd_recipient_restrictions" section in main.cf.

    2. Re:Filtering against dictionary spam by Architect_sasyr · · Score: 1

      There is a problem with this that I noticed a few months ago when we implemented a similar system. If I might take a moment to slide slightly off topic:

      RCPT TO: Address (conforms to company standard) firstnamelastname@company.com
      RCPT TO: Address (User Error): firstname.lastname@company.com
      RCPT TO: Address (Spam): lastnamefirstnamelastname@company.com

      My solution came in the form of trigram's (an algorithm I uncovered in some ruby code and converted to C). A trigram http://en.wikipedia.org/wiki/Trigram involves matching blocks of three characters and checking these against the legitimate user name. I found that this dramatically reduces our incoming Spam, but allows for those users who add the extraneous character to the email. Based on a probability rating depending on the number of difference's the email is continued, or the SMTP Proxy kills it off with a RSET.

      No doubt others would have thought of this, but I haven't been able to find it.

      --
      Me failed English...
      FreeBSD over Linux. If my comments seem odd, this may explain...
  26. Another HOWTO that I'm biased toward by Just+Some+Guy · · Score: 1

    I wrote basically the same article a year ago for Free Software Magazine. We've been using this setup at my office for the last year, and it's been working perfectly - to the point that an upset coworker told me yesterday that she's received four spams last week and wondered if something was wrong.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Another HOWTO that I'm biased toward by twistedcubic · · Score: 1

      Dude! That five minute delay is genius! Once spammers get wind of it, they will probably change their methods (increaing spam traffic), but it seems highly effective for spammers of the "own a computer and spam as much as possible before getting noticed" ilk.

    2. Re:Another HOWTO that I'm biased toward by Just+Some+Guy · · Score: 1
      Dude! That five minute delay is genius!

      I can't claim to have invented it, but I've been advocating it to everyone who will listen. We're rejecting over 90% of incoming mail with greylisting (as measured by the number of entries in the greylist database that never returned for the second attempt). An unexpected side effect is that SpamAssassin now rejects less mail than before because all of the "low hanging fruit" has already been filtered out, and because it has less data to feed into its Bayesian training. Despite that, it's been several months since I've received a spam message at work.

      Once spammers get wind of it, they will probably change their methods (increaing spam traffic), but it seems highly effective for spammers of the "own a computer and spam as much as possible before getting noticed" ilk.

      I'm not sure. The biggest change is that their zombies now have to maintain state and support more of the RFCs. That is, they have to be smart enough to recognize a "try again later" response, and they have to track which one of their potential recipients needs to be retried later. That requires a lot more complexity, and it also takes a lot more resources that the zombie victim may come to notice.

      --
      Dewey, what part of this looks like authorities should be involved?
  27. Shame the article is about Postfix. by AltGrendel · · Score: 2, Insightful

    Ok, I recognize that you are probably trying to promote Sendmail. But for a variety of reasons, there are folks out there that can't or don't want to use Sendmail. I don't use Sendmail because I consider it overly complex. I use postfix and yes, I use the RBLs before it gets to SpamAssassin (gasp). If you tune it properly, it works just fine, thank you. Also the email list archives are extremely helpful in this matter, as is the list itself if you've done your homework first.

    --
    The simple truth is that interstellar distances will not fit into the human imagination

    - Douglas Adams

    1. Re:Shame the article is about Postfix. by KillerBob · · Score: 1
      I don't use Sendmail because I consider it overly complex.


      Please don't get the impression that I'm trying to evangelize you... but Sendmail used to be overly complex. More recent versions are actually pretty good from the configuration perspective, especially if you're using a binary distribution such as a slackpackage or deb package. It's really just a question of changing your sendmail.mc file, and compiling it. Copy to the right location, and restart Sendmail. Poof. It's done.

      Enabling a RBL or RHBL in Sendmail is as simple as adding a line to the end of your configuration file:
      FEATURE(`enhdnsbl', `bl.spamcop.net', `"Spam blocked. See: http://spamcop.net/bl.shtml?"$&{client_addr}', `t')dnl


      Personally... I found that Sendmail was the mail package that "just worked" for me. I tried qmail, PostFix, and a bunch of other ones, and by far, Sendmail with Procmail was the easiest to set up filters and other configuration.
      --
      If you believe everything you read, you'd better not read. - Japanese proverb
  28. There are better guides on the Postfix site. by ThatDamnMurphyGuy · · Score: 4, Informative

    The better place to looks is the Howtos and FAQs.

    One of my favorites: http://jimsun.linxnet.com/misc/postfix-anti-UCE.tx t

  29. Mail Gateway like Barracuda by Anonymous Coward · · Score: 0

    Has anyone found a good open source gateway solution that incorporates a web front end for user configs and quarantine? Basically an open source Barracuda appliance?

  30. Whoever marked this as offtopic. by Anonymous Coward · · Score: 0
    Didn't read the whole post.

    Idiot.

  31. Total bullshit. by Anonymous Coward · · Score: 0

    Yes, greylisting has become less effective. Now its only blocking ~90% of the spam instead of ~95%. Oh no! Considering it is essentially a freebie, with no real downside, and no false positives ever, that's damn good. Of course you still need to filter spam after that, but cutting out 90% of it for free is a great help.

  32. Why I love slashdot by Shadowlore · · Score: 1

    Comment: (paraphrase)" X doesn't work because Y happens"
    Rating: +5 "insightful"

    Reply to above comment: "X works because Y happens"
    Rating: +5 "insightful"

    And neither post showed any actual insight; just observation.

    --
    My Suburban burns less gasoline than your Prius.
    1. Re:Why I love slashdot by TheNumberless · · Score: 1

      You're forcing the comments into a dichotomy that's not there. Try to see what they're actually saying, without imposing your preconcieved ideas of conflict.

      Comment: X doesn't do Z because Y happens

      Comment: It's OK that X doesn't do Z, because Y is better than not Y.

      I found this exchange to be one of the most insightful things to come out of this discussion.

    2. Re:Why I love slashdot by Anonymous Coward · · Score: 0

      So stop bitching about moderation and encourage people to meta-moderate instead.

  33. That's what SPF is for. by Medievalist · · Score: 1

    If you implement SPF, SPF-aware mailers won't send you those reject messages. And for the most part, spammers will stop using your address in their From: fields, because it decreases their spam's penetration.

    Don't confuse SPF with Microsoft's fake "sender-ID" crap, though. That's essentially useless, you want SPFv1 aka "SPF classic", then DKIM as soon as it's ready.

    Worked for me...

  34. Be careful when rejecting at HELO by Medievalist · · Score: 1
    RFC 2821, section 4.1.4 Order of Commands:
    An SMTP server MAY verify that the domain name parameter in the EHLO command actually corresponds to the IP address of the client. However, the server MUST NOT refuse to accept a message for this reason if the verification fails: the information about verification failure is for logging and tracing only.
    So, you can drop a connection at HELO if the HELO parameters are malfed, but you can't drop it just because it's unverifiable - you have to wait and drop it at RCPT if you want to be RFC-compliant. It's generally a good idea to be RFC-compliant whenever possible.

    RBLs are great for weighted systems like SpamAssassin, and for blocking Open Relays. If you use an Open Relay, everyone should reject your mail, because you are either clueless or a cantankerous ass-hat.

  35. Shameless plug alert by pathological+liar · · Score: 1

    I wrote a policy server for Postfix that will allow you to trigger responses to a message based on rbl status, which means you can use presence on an RBL to trigger greylisting of an email, which gives you the best of both worlds.

    maRBL

  36. Barracuda substitute by Anonymous Coward · · Score: 0

    Can anyone recommend a good open source antivirus and antispam gateway that allows the user to manage their prefs and quarentine via a web page. Basically like an open source Barracuda appliance.

  37. good info, but come on... by coleridge78 · · Score: 1

    .... it's not like this is awesome breaking news. I know of at least one institution that's been doing this since the 20th century (as a matter of fact, they likely invented greylisting before anyone had thought to call it that).

  38. Better way - bleed spammers dry by QuantumFTL · · Score: 1

    Martian Software has an interesting (if somewhat dated) piece on using statistics to cause spammers pain. Essentially it's a real-time spam filtering system that slows down messages according to how "spammy" they seem to be. For individual messages, a few seconds or more delay would cause little if any problems, but when sending millions of spams, this is a very big issue indeed.

    Personally I'd like to make the spammers pay - in CPU cycles - using methods like this. Of course I'd rather beat them witha baseball bat, but that's a wee bit illegal/impractical.

  39. Mod Parent Up, Please. 5xx Reject is exactly right by billstewart · · Score: 1
    I just used up my mod points on the IPv6 DNS discussion, but please mod up the parent article.

    As long as the receiving mail server rejects the message with a permanent failure notice, a correctly configured sending mail server will give the user an appropriate response, and if it rejects it with a temporary failure notice, a correctly configured sending server will keep trying, and eventually let the user know if delivery hasn't happened in some time period.

    If the receiving mail server accepts the message, it's obligated to send a reject email if it fails. That doesn't mean you *actually* do that with spam, but it means you either fail to notify a legitimate sender that the mail has been dropped, or else successfully notify a forged sender that the spam with his name forged on it has been dropped, or do something else inappropriate.

    This doesn't mean the reject code needs to be *honest* - your smtp receiver can lie to the sender about the recipient's mailbox not existing, or being full, or about the sender's mail server smelling of elderberries. If the email really was sent by a human, and the sender's mail server correctly notifies the human of problems sending it, it's up to the human to decide what to do.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks