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 explicitly added reject_unknown_client_hostname and several other reject rules to slow down SPAM in our server. So far that's working nicely.

However, there is an important client that keeps getting rejected by our mail server, either because there isn't a ptr record on their name server giving a valid hostname or because dns lookups are failing.

warning: hostname verification failed: Name or service not known

In any case, before they get that fixed with their ISP, is there a way to allow only their IP in our postfix? I tried adding it to mynetworks but it didn't work.

share|improve this question
Thanks guys! It worked, the only thing is that check_client_access hash:/etc/postfix/access has to go before reject_unknown_client – Mike Darrow Oct 9 '11 at 14:58
up vote 1 down vote accepted

Did you tried STFW? I'm not postfix fun (I'm consider it as loozer's MTA), but nothing more than 3 URL from Google

smtpd_client_restrictions =
  check_client_access hash:/etc/postfix/maps/access_client, ...

Content of access_client

IP  <policy>
share|improve this answer

You can do it as Lasy Badger suggests. Here a bit cleaner:


smtpd_client_restrictions =
  check_client_access hash:/etc/postfix/client_access

Create /etc/postfix/client_access:    OK

After that you have to postmap /etc/postfix/client_access and then postfix reload.

But note: It will not work! At least not in your case. Because your "client" uses a dynamic IP. So you have to edit it every time your client changes his IP. Probably once a day.

So note that it is not your fault how you configured your server. It is the fault of your client to have a bad mail server configuration. One should not run a mail server behind a dynamic IP. Running one behind a dynamic IP looks like being a Spammer.

share|improve this answer

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.