Geert Hendrickx wrote:
On Wed, Oct 21, 2009 at 06:52:21PM +0500, rihad wrote:
Geert Hendrickx wrote:
In your case (SMS notifications) however, I would keep things simple
and not try to integrate it so tightly into the delivery process, but
just fork your incoming mails to two transports: "virtual" for actual
delivery (handled by Postfix) and your own transport for the SMS
notifications. You can do this with virtual aliases:
f...@yourdomain.net f...@yourdomain.net f...@sms.yourdomain.net
b...@yourdomain.net b...@yourdomain.net b...@sms.yourdomain.net
...
This is so repetitive. All our alias maps are in mysql, and there's
an app behind them which isn't under my control, so... Can I rewrite
whole domains? Like this:
@yourdomain.net @yourdomain.net @sms.yourdomain.net
That will break recipient validation. However, with MySQL, you should be
able to put the duplication of addresses in the query or in the result
filter?
We have two maps:
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual.cf
/etc/postfix/mysql-virtual-maps.cf:
user = postfix
password = c00lpass
dbname = mail
table = users
select_field = maildir
where_field = email
additional_conditions = and enabled = 1
hosts = 127.0.0.1
/etc/postfix/mysql-virtual.cf
user = postfix
password = c00lpass
dbname = mail
table = alias
select_field = goto
where_field = address
hosts = 127.0.0.1
the first table definitely does recipient validation, as well as getting
their maildir. The latter table has a few important aliases, like info@,
support@, etc going to the real person's email.
Which setting should I tweak? I'm lost, the docs are overwhelming for a
newb like myself :-(