Jason Miller:
> Hi, I'm using Postfix to relay from my internal network, through postfix,
> to mandrill, on to the destination. The issue is that I have multiple
> internal servers, but once it gets to mandrill they all look like one
> because the instructions I found only allowed for one mandrill relay. I
> found instructions how to use a different relay depending on the domain in
> the to: field, but how do I have it select the smart relay based on the
> application server sending the email? The way mandrill works is it
> separates mail into queues based on the username and password provided. So
> the end result is effectively that all application servers have the same
> server and username, but different passwords. Is this possible?

You want to forward mail destined for 'u...@example.com' to different
smart hosts depending on the application server sending the mail
to Postfix?

Basically, index a table by SMTP client (name or IP address) and
use FILTER in a creative manner:

/etc/postfix/main.cf:
    smtpd_client_restrictions = hash:/etc/postfix/app-server-access

/etc/postfix/app-server-access:
    app-server-1        filter smtp:mandril1.example.com
    app-server-2        filter smtp:mandril2.example.com

(instead of hash: use whatever is appropriate for your systems).

This use of the FILTER command is fully supported.

        Wietse

Reply via email to