Re: OpenSMTP relaying to multiple mail servers

2020-06-07 Thread Robert Sacks

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 
action "outlook" relay host smtps://outl...@smtp-mail.outlook.com \
auth 

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



OpenSMTP relaying to multiple mail servers

2020-06-06 Thread Predrag Punosevac
Hi Misc,

I have a very noob question. Is it possible to configure OpenSMTP to use
multiple relay servers? 

I would like to be able to do the following.

mail -r someb...@gmail.com miscATopenbsd

should relay through smtp.gmail.com

mail -r someb...@hotmail.com miscATopenbsd

should relay through smtp-mail.outlook.com

I have seen an article 

https://www.admin-magazine.com/Articles/OpenSMTPD-makes-mail-server-configuration-easy/(offset)/3

but the configuration syntax is old. I tried to configure filter using
new syntax to no avail. I do know how to configure OpenSMTP to relay
email per minimal working example provided with man pages. I am trying
to abuse OpenSMTP to improve my MUA mail(1) experience.

Cheers,
Predrag