Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This might come as an odd request. Thank you for looking at it.

I am setting up a series of postfix+dovecot+mysql mail servers internally.

I am having trouble figuring out how to make them both internal and external.

An example: Alice@server1.local sends an email to Jeff@gmail.com Postfix changes the from address to Alice@MyCompany.com and using an external SMTP relay shoots it to the Gmail servers. Alice@server1.local then sends an email to Howard@server2.local (192.168.1.2) Postfix then wraps the email in a socks5 tunnel and shoots it directly over to Postfix on server2.local -> 192.168.1.2 Alice@server1.local sends an email to Linda@server3.local (192.168.1.3) same as before, wraps in a socks5 to 192.168.1.3:25

I can see how to do one or the other, how would I make a rule based on the recipient?

So to summerize: if the to Address has a .local then send it through some socks5, if it has a .com send it to the smtp relay.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.