On 10/26/2012 4:06 PM, Freek Dijkstra wrote: > Hi all, > > I have set up some new rules in smtpd_recipient_restrictions (see below) > on my test machine. They don't work exactly as I expected.
If you describe the the unexpected behavior, maybe someone can explain. > Is there a > way to log the output of each lookup performed? You can turn on postfix debug mode. Note that debug mode produces large amounts of logging, and can be hard to decipher since the important stuff (which is usually present in regular logs) often gets overlooked in the flood. http://www.postfix.org/DEBUG_README.html#trace_mail Use postmap as a low-level debug tool to test lookups. Note that postmap by design only looks up the key you specify. Most postfix map features will lookup several variations of the primary key, see the man page for each feature to see what is searched, such as http://www.postfix.org/access.5.html > Second question: I'm currently using check_sender_access to block email > coming from non-existing user addresses at my domain. However, this only > checks the MAIL FROM address. Is it also possible to create a rule which > checks the From: header. (presumably such check should occur in > smtpd_data_restrictions or smtpd_end_of_data_restrictions?) Not possible. If there are a few frequently-abused From: headers, you can add those to a header_checks map. -- Noel Jones