I recently noticed when I add an alias to a Gmail account they ask me for a remote SMTP server, username and password. Then, whenever I try to send an email using that alias it gets relayed by Gmail to the provided SMTP server.
Is there a way I can accomplish this setup on a Postfix install?
To clarify, on my server there's a virtual user person@exemple.com
(with the aliases: external.person@xpto.com
and external.other@corpx.com
) if he sends an email:
- With a
from
address ofperson@exemple.com
=> server will do the default delivery; - With a
from
address ofexternal.person@xpto.com
=> server will relay email usingsmtp.xpto.com
(with proper credentials); - With a
from
address ofexternal.other@corpx.com
=> server will relay email usingsmtp.corpx.com
(with proper credentials);
Ideally it would be nice If I could have a MySQL table with the external alises (for every virtual user) containing the external SMTP server domain, port, username and password. => This way I could setup a small web interface so my users could all their own external alises...
Thank you.