Apple Support Communities > Servers and Enterprise Software > Mac OS X Server v10.6 Snow Leopard > Discussions
This discussion is archived
13251 Views 25 Replies Latest reply: Oct 4, 2010 2:32 PM by Gerben Wierda
Currently Being ModeratedJun 13, 2010 5:08 AM (in response to dupontrider)educate me: does greylisting simply _slow down_ mail delivery from greylisted servers or does it stop delivery forever of mail sent from a greylisted server?
i am willing to accept a delay while SLS figures out the greylisted mail is good, assuming that it will speed up soon, but i cannot accept SLS failing to deliver mailLost count, Mac OS X (10.5)
Currently Being ModeratedJun 13, 2010 11:03 PM (in response to Rob Reuland)It simply slows down mail delivery. Essentially, the idea is to give a spurious error when a new server tries to deliver a message to your server. If the sending server is a "real" (i.e. well-behaved) server, it'll retry the message after a delay (how long depends on the sending server's policy; I think the current version of postfix will retry after 5 minutes), and the receiving server will let it in. On the other hand, if the sending server is a spambot, it's likely to simply abandon the attempt and try some other target.
It's actually a bit more complicated than that, because the server keeps a database of what sending servers have tried to send messages from what source address to what destination address; if it sees the same server sending from the same source to the same destination again, it doesn't apply the delay. Also, after the same server has successfully delivered 10 messages past the greylist delay, it's exempted from the greylist even if it's using a new source and/or destination address. (Note: this is assuming I've read the policy script right...)
Net result: legitimate incoming mail is delayed for a while, but gets through after a bit; the delay tends to go away as the server learns which other servers to trust. Mail from lazy spammers, on the other hand, tends to get blocked. In all, it's a good feature to have, but I'll second pterobyte's suggestions for making it more apparent what's going on.MacBook Pro, Mac OS X (10.6.2)
Currently Being ModeratedJun 14, 2010 7:07 AM (in response to Gordon Davisson)Gordon -- Thank you for that lucid explanation. I knew nothing about greylisting until I upgraded my server to SLS and found mails not being delivered. Log messages showed "Recipient address rejected: Service is unavailable". Panic ensued.
While I'm tempted to use pterobyte's fix to shut off greylisting, I'm now inclined to let it run for a while and see if it "learns."
I do think Apple could have done a better job of explaining this. I called Apple Care and they were frankly clueless.Lost count, Mac OS X (10.6.3)
Currently Being ModeratedJun 14, 2010 5:09 PM (in response to Rob Reuland)BTW, I'm noticing that the server does "learn." Mail sent yesterday to my server from my mac.com account took an hour+ to arrive. Today it takes about two minutes from the same address.Lost count, Mac OS X (10.6.3)
Currently Being ModeratedJul 14, 2010 8:26 PM (in response to Gordon Davisson)I don't think that it is true to say that it simply slows down mail. It actually rejects the mail and I agree with other comments that the rejection message is too obscure. It then expects the mail server to re-send the same mail. If that is done soon enough and is from the same server then it lets it through and gradually learns which servers to accept. BUT not all servers re-send soon enough and not all re-send from the same server and so the mail continues to be rejected. The problem is that there is no workaround if you leave grey listing on as it is up to the servers to re-send and to stop it you have to turn junk filtering off. So, I also agree that this should be visible in Server Admin Filters pane. I ended up calling support to resolve the problem (thanks!) and so now know where to look. Had it listed Grey Listing as an option I would have been onto it way earlier - even putting some info about it onto the page with no controls would be helpful - eg "Junk Filtering also enables Grey Listing". Also, the junk filtering setting I assumed are for SpamAssassin only when in fact they also affect a Postfix setting so is again not intuitive.20+ imac network and 3 servers, Mac OS X (10.6.4)
Currently Being ModeratedJul 16, 2010 10:46 PM (in response to Positive Steve)The SMTP error that greylisting gives - 450 - explicitly indicates a temporary error receiving the message (the RFC gives the example that this could mean the mailbox is busy), implying that the sending server should try again later (by contrast, a 5xx error would indicate a permanent error and that the sending server should not retry delivering the message). While it's true that this could interact poorly in some cases (e.g. the message being retried from another server), I think this is generally rare. The only real objection I have is its opacity -- it's not visible in the UI and the error messages it logs on the receiving server don't give any indication what's going on (note: it also doesn't give the sending server any indication of what's going on, but that's actually good in this case). That, and it complicates debugging because its fake errors can be hard to tell from real errors; so my advice is to turn greylisting off while debugging other receiving errors, but on for normal operation.MacBook Pro, Mac OS X (10.6.2)
Currently Being ModeratedSep 21, 2010 1:04 AM (in response to Corey Blaser)To my mind, a better solution than disabling greylisting (which is an extremely effective anti-spam method) is to simply change the delay value. the default is 60 minutes, which is excessive.
sudo vi /usr/libexec/postfix/greylist.pl
/greylist_delay to get to the line:
(line 77 on my machine)
change the 60 to, say 6.
I use greylisting on my mailserver. 85%of the connections to my server are dropped before I get to the SMTP transaction phase based on bogus server names, blacklisted IPs, or greylisting.MacPro Quad Core, G4 1000bT, MacBookPro, mini server, Mac OS X (10.6.4), 10.6.4 Server on MacPro
Currently Being ModeratedSep 26, 2010 8:40 AM (in response to keeperofthecheese)I was unpleasantly surprised that greylisting happened *without warning/documentation* as soon as I went online with my migrated (10.5.8 -> 10.6.3) server. Especially as I saw a lot of unexpected error messages for my users when I asked my backup mail service to etrn the queues. Not knowing what was going on I suspected an error on my side and killed everything asap.
As soon as I found out what was going on, I edited main.cf and removed the greylisting. But that implies I have also lost spamassasin tagging and my server side rule depend on those.
So, how do I drop greylisting with its delays (at least temporarily) but keep spamassasin filtering?G4 Cube, MacBook Air, Mac mini C2D, Turbo NeXTdimension Cube
Currently Being ModeratedOct 3, 2010 4:27 PM (in response to Gerben Wierda)Greylisting is a feature, it has nothing to do with SpamAssasin, IMHO.
Disable it using Alex's (aka pterobyte) instuctions: http://osx.topicdesk.com/content/view/144/84/
KostasDual 1.25 PowerPC G4 - MacBook Pro 2.16, Mac OS X (10.6.4), ACT 10.6, ACTC 10.6, ACMT
If I disable greylisting according to those instructions I also lose spamassassin. I want spamassassin and not greylisting. But postfix config just says to use policy server or not.iMac 27" i7, MBA SSD, mini server, mini, G4 Cube, NeXTdimension Cube