OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: Allowing mail only from specific address

From: Gary V (mr88talenthotmail.com)
Date: Wed Sep 13 2006 - 22:59:58 CDT


>>Hello,
>>
>>Is there a way to configure postfix to reject all mail sent to an address
>>unless the mail is from a specific address?
>>
>>For example, if postfix is receiving mail for mydomain.com I want to
>>reject all mail to joeusermydomain.com unless the sender is
>>fooyourdomain.com.
>>
>>I have found how to do the opposite (reject mail from specific users), but
>>this one is stumping me.
>>
>>I know I can filter after the fact, but don't want to do it that way.
>>
>>Thanks much,
>>Nathan
>
>Possibly:
>
>smtpd_recipient_restrictions =
> permit_mynetworks
> reject_unauth_destination
> [ ... possible other stuff ... ]
> check_sender_access hash:/etc/postfix/foo_ok
> check_recipient_access hash:/etc/postfix/joe_reject
>
>/etc/postfix/joe_reject
>joeusermydomain.com REJECT
>
>/etc/postfix/foo_ok
>fooyourdomain.com OK
>
>Gary V
>

This would be too easy to break however ([ ... possible other stuff ...]
could contain an OK), might be better served by figuring how to implement a
http://www.postfix.org/RESTRICTION_CLASS_README.html. I would, but it's time
for bed...

Gary V

_________________________________________________________________
Get the new Windows Live Messenger!
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline