|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
source & destination based routing: When to decide where to go you need to go
From: Fabio Pietrosanti (lists
pietrosanti.it)
Date: Tue Oct 03 2006 - 11:16:08 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
i am using postfix 2.3 doing source based routing with
sender_dependent_relayhost_maps .
I am using SQL table to do dynamic lookup and do routing based on source.
I need to match in the sql query not only the Sender but also the
Recipient because the database has to reply with the right smtp server
by looking at the couple of From + To .
Unfortunately the table in the sql statement allow me to only put a "%s"
which match the Sender:
sender_dependent_relayhost_maps =
pgsql:/etc/postfix/virtual_source_based_transport.cf
The query that's actually working is:
"query = select fqdn from postfix_source_table where name = '%s';"
I would like to make the routing decision be managed by something like that:
"query = select fqdn from postfix_source_table where sender = '%sender'
and recipient ='%recipient';"
My postfix is managing emails which "ever" have only one recipient per
email message so there's no chance to have more than one recipient.
My problem is that i can make the routing decision only by matching both
the sender and the recipient.
There's a way to do that without having to write an smtp wrapper?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]