rihad wrote:
Now that I've fixed table lookup following from Magnus' advice, all is
working!
# postmap -q ri...@example.com mysql:/etc/postfix/mysql-virtual.cf
ri...@example.com,ri...@sms.example.com
The query now looks like this:
query = select coalesce(goto,email),replace(coalesce(goto,email), '@',
'@sms.') from users left join alias on (email=address) where email='%s'
I know it's not the best query out there, but since we do not allow @
signs in user names ("local part"), the problem is impractical.
Now for the second question. sms.ourdomain.com isn't in our DNS (only
ourdomain.com is), but still someone might like it to send email
directly to our SMTP to u...@sms.ourdomain.com. How can I disallow that?
I want @sms.ourdomain.com to be only available internally to Postfix
itself. Currently we have:
mydestination = localhost, $myhostname, localhost.$mydomain,
mysql:/etc/postfix/mysql-mydestination.cf
/etc/postfix/mysql-mydestination.cf:
user = postfix
password = blahblah
dbname = mail
table = transport
select_field = domain
where_field = domain
hosts = 127.0.0.1
mysql> select domain from transport;
+-------------------+
| domain |
+-------------------+
| sms.ourdomain.com |
| ourdomain.com |