Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

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...
    reject_unauth_destination,
    ... 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 nm30-vm1.bullet.mail.ac4.yahoo.com[98.139.52.251]: 554 5.7.1 Service unavailable; Client host [98.139.52.251] blocked using safe.dnsbl.sorbs.net; Currently Sending Spam although I have added .yahoo.com 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 safe.dnsbl.sorbs.net –  w00t Nov 18 '10 at 14:38
add comment

Your Answer

 
discard

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.