I have one mailbox in postfix and several aliases to it. Is it possible to create whitelists for specific alias in order to allow only the addresses from the list to send messages.

For example:

virtual hash:

test@example.com user
priv@example.com user

I would like to permit only two users(ali@comp.com ola@test.org), to send a message to priv@example.com In the other hand when someone wants to send a message to test@example.com, No restrictions are applied.

Is it possible to configure postfix server this way?

  • You cannot prevent anybody from sending using the ali@comp.com email address. You can only filter emails out that go to priv@example.com and don't have one of the two required senders. I don't know how to do that in postfix, but you can do so using procmail. – Anthon Apr 30 '14 at 10:06
  • Ok procmail is a good idea. Thanks you for pointing it out. – ghi Apr 30 '14 at 12:07

If filtering out based on procmail is acceptable then you can do something like:

* ^To:.*priv@example.com
   * ^From:.*ali@comp.com
   * ^From:.*ola@test.org


(I have not tried this myself, but if you do make sure you test this exhaustively before using /dev/null in the last rule to get rid of the 'spam'.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.