On 6/7/20 12:42 AM, Predrag Punosevac wrote:
I have a very noob question. Is it possible to configure OpenSMTP to use
multiple relay servers?
Yes. I would create an action for each relay like this:
action "gmail" relay host smtps://gm...@smtp.gmail.com auth <secrets>
action "outlook" relay host smtps://outl...@smtp-mail.outlook.com \
auth <secrets>
and then create a match rule for each email address like this:
match mail-from "someb...@gmail.com" for any action "gmail"
match mail-from "someb...@hotmail.com" for any action "outlook"
If you want to use more than one email address for a relay you could
also use `match-from "@gmail.com"` or use a list table.
You can read this blog post[1] for a more detailed explanation.
[1] https://dataswamp.org/~solene/2018-09-06-openbsd-opensmtpd-relay.html