Rocco Scappatura wrote:
Hello,

I need to use 'mail()' PHP function on a UNIX system, which uses Postfix
as MTA.

On Linux systems, mail() function use the 'sendmail' program to transmit
messages. And so, my PHP program uses postfix setup to transmit the
messages. In particular, it looks up DNS for MX of destination domain an
forward it to the correct destination.

Now I have the problem, that indeed I need that some messages have to be
forwarded directly to the destination, while the ones generated by my
mail application should be sent trhough a smart host (setting up
relayhost=smart.host.tld).

How could I do? Is it possible to change the "relayhost" postfix
parameter on the fly? Or what?

Thanks,

rocsca

You can change it based on the envelope sender
http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps

  -- Noel Jones

Reply via email to