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?
Asked
Active
Viewed 2,278 times
0
w00t
- 1,134
- 3
- 16
- 35
1 Answers
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
Jesse
- 243
- 1
- 6
-
`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