SMTP relay, secondary mx and DNS

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.4.1
How are you able to access your server: The webadmin
SSH
Direct access via physical keyboard/screen
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: no

Describe your issue

Fresh install of ynh v12 I discover the new option “Secondary MX” in the Web GUI admin.
Would it be possible to get an example how to fill Web GUI admin fields and DNS (in our DNS provider platform) field for someone who would like to both use secondary MX and SMTP relay?

SMTP relay address : smtp.ouvaton.coop
SMTP relay port : 465
SMTP relay account : contact@MYDOMAYN.tld
SMTP relay password : ******

that’s ok.

Secondary MX domains : mc01.ouvaton.coop,mc02.ouvaton.coop is that ok?

and I don’t understand what I should write in the email whitelist filed.

And I guess, I should change something in the DNS provider platform but I’m not sure how.
I guess this need too be changed :

@ MX 10 mc01.ouvaton.coop.
@ mX 20 mc02.ouvaton.coop
@ TXT "v=spf1 +a +mx include:spf.ouvaton.coop ~all"

Share relevant logs or error messages

No relevant logs

hi Thatoo,

I miss to make some docs on this PR…

I think you understand it in the bad way.

Firstly, backup mx are not related to smtp relay (even if i guess it’s possible to use the 2 settings together).

Secondaly, the goal of those backup mx settings is to tranform an ynh instance into a secondary mx for an other instance (and not to declare a remote secondary mx).

So for example imagine you have mailbox on domainA.tld (ynh instance A), you could add a secondary mx by running this on an ynh instance B:

yunohost settings set 'smtp.backup_mx.domains' -v "domainA.tld"

You also need to list all emails (and alias) using domainA.tld cause the B ynh instance need to know which emails are allowed.

yunohost settings set 'smtp.backup_mx.emails_whitelisted' -v "camille@domainA.tld,fred@domainA.tld"

Yes this second part is not so cool, cause it means you should synchronize by yourself each time someone add an alias or an email account on ynh instance A… You probably can automatize it via a user hooks.

Anyway, this feature is nice cause it avoids you to loose emails when your server A is down more than 4 days…

for smtp relays, i think you are right you should change spf to allow ouvaton.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.