Postfix with virtual users and domains and a difficult mailtransport configuration...

Discussion in 'Server Operation' started by voltron81, Jan 21, 2010.

  1. voltron81

    voltron81 New Member

    Hi to everybody.
    I've realized a mailserver based on postfix and virtual mailboxes (following this how-to:

    Now, in this mailserver I'll have some accounts from different providers (even gmail or hotmail).

    All the emails to be sent will be relayed to another mailserver. (depending of the sender, means that if the sender is a gmail account, that email must be relayed to gmail).

    I'm able to say to postfix which emails are internal, putting all the internal email addresses in mysql_virtual_transport.

    But for the emails that are not destined to an internal account, I can just put in mysql_virtual_transport the general value:
    *  	smtp:mail.anotherdomain.tld
    So all emails are delivered to mail.anotherdomain.tld.

    The problem is that the sender is not always using the same smtp server to relay emails (as I said before, if is using gmail want to relay to gmail, etc).

    How can I decide the generic virtual transport depending of the sender instead of the receiver?
    I mean, how can I say to postfix that:
    *  	smtp:mail.domain1.tld
    is for the sender [email protected]
    *  	smtp:mail.domain2.tld
    is for the sender [email protected]
    *  	smtp:mail.domain3.tld
    is for the sender [email protected]?????

    I hope I was understandable...


Share This Page