On Thursday 15 December 2011 01:34:53 Tomas Macek wrote: > I'd like to have an whitelist based on hash:<file> table, for > example this http://www.howtoforge.com/how-to-whitelist-hosts- > ip-addresses-in-postfix - it's simple. > > When I have a line > > 1.2.3.4 REJECT You were blacklisted > > it's logged including reason of rejecting (of course). > > But when I have a line > > 1.2.3.4 OK You were whitelisted > > it's not logged at all and I don't know why the IP was able to sent > a mail through the mailserver and why. Is there any possibility to > achieve that?
Set a class in smtpd_restriction_classes and return that as your lookup result: main.cf contains: smtpd_restriction_classes = [ ... ] whitelisted whitelisted = warn whitelisted, permit Your client access lookup contains: 1.2.3.4 whitelisted In general I'd suggest that need for whitelisting indicates that your restrictions might be too aggressive, such as using reject_rbl_client with SORBS or Spamcop. More aggressive DNSBL services should only be used in scoring, such as with postscreen(8), for most sites. A large whitelist is hard to maintain properly, worse than a large blacklist. So, you might need to step back and reevaluate your restrictions. -- Offlist mail to this address is discarded unless "/dev/rob0" or "not-spam" is in Subject: header