I have set up a SMTP server with iRedMail on Ubuntu 14.04 LTS and everything is working smoothly. I can create new users and send e-mails.
My situation however is a bit more complicated: I need this server to send e-mails on behalf of my domain name "sampledomain.xxx" but I'm using a hosted mail service to receive e-mails. My domain DNS's MX records are set to a different IP than the SMTP server I've just set up. Basically this should be an outgoing-only SMTP server.
The problem arises when I need to use the SMTP server as user1@sampledomain.xxx to user2@sampledomain.xxx because Postfix thinks that mail should be relayed internally, but it doesn't find the address in the virtual domain's mailboxes and thus fail to send the e-mail.
How can I configure Postfix to not relay internally such e-mails and instead resolve MX records and send them as classic e-mails?
Many thanks!