We're trying to use PostFix to check whether the sender email-address is permitted to send to a specific email-address.
Another way to describe it would be that I want specific e-mailaddresses to only allow incoming messages (not SMTP logins) from specific e-mailaddresses.
Will something like this work? main.cf:
smtpd_recipient_restrictions =
[other restrictions here]
check_sender_access
mysql:/etc/postfix/restricted_senders_to_recipents.cf
restricted_senders_to_recipents.cf:
user = uname
password = pword
hosts = 127.0.0.1
dbname = dbname
#!!!PSEUDOCODE!!!
query = SELECT allowed FROM members WHERE sender = %sender AND recipent = %recipent;
Is this possible? If then how?
I know that aliases with MySQL works this way since we're already using it. (http://www.postfix.org/mysql_table.5.html)