Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'd like to do so that only certain From: addresses can send to an email address (mailing list) on an Ubuntu system running Postfix.

Understanding the Postfix the manuals are requires a lot of knowledge, so I'm hoping to get a complete recipe I can use. Currently this is what I have:

/etc/postfix/main.cf:
smtpd_recipient_restrictions =
  check_recipient_access hash:/etc/postfix/protected_destinations
smtpd_restriction_classes = insiders_only
insiders_only = check_sender_access hash:/etc/postfix/insiders, reject

/etc/postfix/protected_destinations:
protected.list@example.com insiders_only

/etc/postfix/insiders:
allowed.user@example.com OK
another.allowed.user@example.com OK

This gives:

fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit

I am open to any suggestions. It doesn't have to be Postfix. It can be procmail or any other standard solution.

Note: the recipient is a mailing list, and thus does not have a user account on the system account. So any solution must work without an account.

Edit: The mailing list is currently implemented like below. (By the way, is there a way to put all the recipients of the list in a separate newline-separated file, because they are many.)

/etc/postfix/virtual:
protected.list@example.com user1@example.com, user2.example.com, ...
share|improve this question
    
How is the mailing list implemented? Using dedicated mailing list software, or just a mail server alias that expands to a list of recipients? –  Michael Kjörling Jul 12 '13 at 21:28
    
@MichaelKjörling: See recent edit. –  forthrin Jul 12 '13 at 21:41

1 Answer 1

Did you read and understand the error message? You should have something like

smtpd_recipient_restrictions =
  check_recipient_access hash:/etc/postfix/protected_destinations,
  permit_mynetworks,
  reject_unauth_destination

... which is your rule in front of the output from postconf -d on a random Debian box here.

share|improve this answer

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.