That's certainly not how it's supposed to work. Looking at the code, I don't see how the exception file could be the cause. The exception file is searched in filter_recipient_graylist() (filter.c, line 2545). Then the continue_processing variable is set to 0. When an exception match is found, that variable is never set to 1, so none of the subsequent code executes -- the rest of the function is basically skipped.
But just to be sure, I tried a quick test. I created a folder structure for a domain (foo.com), ran spamdyke once so it would create the 0 byte graylist file, then ran it again with an IP exception file: ................................................................................................................................. samc@ancillae:~/src/spamdyke/spamdyke-4.3.1/spamdyke/tmp$ ll graylist.d/foo.com/foo/silence.org/samc -rw------- 1 samc staff 0 Dec 19 15:57 graylist.d/foo.com/foo/silence.org/samc samc@ancillae:~/src/spamdyke/spamdyke-4.3.1/spamdyke/tmp$ export TCPREMOTEIP=11.22.33.44 samc@ancillae:~/src/spamdyke/spamdyke-4.3.1/spamdyke/tmp$ echo 11.22.33.44 > exception.file samc@ancillae:~/src/spamdyke/spamdyke-4.3.1/spamdyke/tmp$ ../spamdyke --log-target stderr -ldebug --graylist-level always-create-dir --graylist-dir graylist.d --graylist-exception-ip-file exception.file ../../tests/smtpdummy/smtpdummy spamdyke[21575]: DEBUG(prepare_settings()@configuration.c:3243): no UID switch requested, running as: samc (501) 220 smtpdummy ESMTP helo me 250 HELO received mail from:<s...@silence.org> spamdyke[21575]: DEBUG(find_username()@spamdyke.c:194): searching for username between positions 11 and 26: mail from:<s...@silence.org> spamdyke[21575]: DEBUG(find_domain()@spamdyke.c:428): searching for domain between positions 15 and 26: mail from:<s...@silence.org> spamdyke[21575]: DEBUG(find_address()@spamdyke.c:793): found username: samc spamdyke[21575]: DEBUG(find_address()@spamdyke.c:810): found domain: silence.org 250 MAIL received rcpt to:<f...@foo.com> spamdyke[21575]: DEBUG(find_username()@spamdyke.c:194): searching for username between positions 9 and 19: rcpt to:<f...@foo.com> spamdyke[21575]: DEBUG(find_domain()@spamdyke.c:428): searching for domain between positions 12 and 19: rcpt to:<f...@foo.com> spamdyke[21575]: DEBUG(find_address()@spamdyke.c:793): found username: foo spamdyke[21575]: DEBUG(find_address()@spamdyke.c:810): found domain: foo.com spamdyke[21575]: DEBUG(filter_recipient_relay()@filter.c:2360): checking relaying; relay-level: 0 recipient: f...@foo.com ip: 11.22.33.44 rdns: (unknown) local_recipient: true relaying_allowed: false spamdyke[21575]: DEBUG(filter_recipient_local()@filter.c:2330): checking for unqualified recipient; recipient: f...@foo.com spamdyke[21575]: DEBUG(filter_recipient_graylist()@filter.c:2532): checking graylist; recipient: f...@foo.com sender: s...@silence.org 250 RCPT received quit 221 QUIT received ................................................................................................................................. The graylist function is checked, but the exception file is matched and the graylist filter isn't triggered. So I'd guess removing your secondary server from the exception file probably won't fix anything, it'll just slow down the unspooling of the queued mail if the primary server is ever offline. Good thinking though... :( -- Sam Clippinger On Dec 17, 2013, at 9:45 PM, Faris Raouf wrote: > Dear all, > > Some of you may recall that I’ve posted a question on this topic before. > > Essentially I’m having a problem with some sender/recipient pairs being > somehow permanently graylisted, with 0 byte graylist entry in the graylist > directory path never being removed. > > I’ve just woken up at 3am UK time and had to post this right now because I > think I’m on to something and want to check while those of you on the other > side of the Atlantic (particularly Sam) are still awake. > > What I didn’t say before because I just didn’t think about it was that > there’s a secondary mail server involved which is whitelisted in spamdyke’s > graylist-exception-ip-file. > > So we have main Plesk system with the mailboxes and with spamdyke and > graylisting enabled. > In the DNS for the domains, this server has the highest priority MX record. > But there’s also a secondary (essentially store-and-forward) mail system > involved with a lower priority MX record in the DNS records. This server has > no filtering at all. No spamdyke. No nothing (Yes, I know, bad idea not to > have filtering, but that’s how it is). > The idea is that if the main server is down, mail will go to this secondary > server which will store the email until the main server is up, at which point > it sends all the spooled emails across. > > This secondary mailserver’s IP is whitelisted in the spamdyke > graylist-exception-ip-file. And I think that’s the problem. Let me explain: > > I could be wrong, but I believe that the messages that never seem to escape > graylisting all end up being sent to this secondary mailserver which then > attempts to deliver them to the main Plesk box but isn’t able to as the > messages keep on being mysteriously constantly graylisted. > > So here’s what I think is happening: > Mail is sent to Plesk server > Spamdyke rejects message through graylisting > 0 byte graylist file is created > Sender then tries again, but this time sends to lower priority MX (secondary > mailserver) > Secondary mailserver then tries to deliver the message to Plesk server > *** And here’s what I think things go wrong:: Because the IP of the secondary > mailserver is whitelisted in the graylist-exception-ip-file AND a 0 byte > graylist file exists, spamdyke somehow gets very confused. Some bit of code > doesn’t get run due to the whitelisting, but the 0 byte then triggers another > bit of code which in turn triggers a graylisting rejection of the mail, even > though it is long past the graylist-min-secs interval. Essentially the > graylist lock never gets removed. > > Am I on to something or I this just wishful thinking? > > Obviously the next step is to test what happens when the IP of the secondary > mailserver is removed from the graylist-exception-ip-file (and now that I > think about it, I don’t think it really should have been there), but I was > hoping to shortcut this if my suggestions is absolutely impossible. > > > > > > > > > > > > _______________________________________________ > spamdyke-users mailing list > spamdyke-users@spamdyke.org > http://www.spamdyke.org/mailman/listinfo/spamdyke-users
_______________________________________________ spamdyke-users mailing list spamdyke-users@spamdyke.org http://www.spamdyke.org/mailman/listinfo/spamdyke-users