mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.55k stars 100 forks source link

add TransportDirect transport #153

Closed lmeunier closed 5 months ago

lmeunier commented 5 months ago

The TransportDirect transport allows to tweak outgoing SMTP connections to remote servers. Currently, it only allows to select network IP family (ipv4, ipv6 or both).

For example, to disable ipv6 for all outgoing SMTP connections:

fix #149

lmeunier commented 5 months ago

@mjl- this is my second attempt to fix #149. This time by adding a new transport for direct connections as we talked in https://github.com/mjl-/mox/issues/149#issuecomment-2041007381

mjl- commented 5 months ago

nice, this looks like a good solution. i think the other PR is also still useful, right? will have another look there too. i've got a few small comments on this pr, will show up in a moment.

lmeunier commented 5 months ago

i think the other PR is also still useful, right?

The other PR might still be useful as it works without any configuration, but if both PR are merge I would still prefer to use the transportDirect configuration (for the reasons mentioned on the other PR).

mjl- commented 5 months ago

merged, thanks! fyi, i ran "make genapidiff" afterwards. the smtpclient.GatherIPs changes the api.