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.

We have a mailserver running on Postfix. Only authenticated users are allowed to send emails.

One client has a multifunction printer, which is configured to send scanned documents to an email recipient. Unfortunately that printer is an older model and doesn't support smtp-auth.

I know I can use check_client_access to allow the static IP of this client for unauthenticated mail. The following configuration would do that:

smtpd_sender_restrictions =
  check_client_access hash:/etc/postfix/allow_relay,
  permit_sasl_authenticated,
  permit_mynetworks,
  reject_non_fqdn_sender,
  reject_unknown_sender_domain,
  reject_unauth_pipelining

What I would like to do is to only accept unauthenticated email if the IP and the sender match with a list.

Just adding a check_sender_access to the sender restrictions would result in allowing Mail from the specified IP or the specified sender.

So how could I configure Postfix to combine those two, if possible at all?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

By configuring a restriction class that checks the client IFF the sender matches $foo, or vice versa.

share|improve this answer
    
Thank you, that was exactly what I was looking for. –  Lukas Oct 27 '11 at 11:41
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.