Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a hash:/exclude.file in which checks for ips/domains to exclude them from rbl checks.
The exclude.file contains something like: PERMIT
xx.yy.zz.ff PERMIT
but it does not catch's subdomains. It only works for IPs. I need something like:
Any way to use wildcards in there?

share|improve this question

I'm guessing that you are using the check_client_access directive in smtpd_client_restrictions or maybe smtpd_recipient_restrictions.

The correct usage would be:

smtpd_client_restrictions =
    ... maybe permit_mynetworks, permit_sasl_authenticated etc...
    ... more checks ...
    check_client_access hash:/path/to/file,
    ... RBL etc...

It is important to reject_unaith_destination before checking client access, because if the check_client_access lookup returns PERMIT, you will be an open relay.

Then, so enable wildcard lookups on hostnames, use:

.domain.tld  PERMIT
share|improve this answer
NOQUEUE: reject: RCPT from[]: 554 5.7.1 Service unavailable; Client host [] blocked using; Currently Sending Spam although I have added PERMIT. Yes, your guess is correct: smtpd_client_restrictions -> permit_mynetworks -> reject_unknown_recipient_domain -> reject_unauth_destination -> check_client_access hash:/exclude.file -> reject_rbl_client – w00t Nov 18 '10 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.