Currently Gmail and probably other mail providers do not allow sending mail directly to them:
https://support.google.com/mail/answer/10336?p=NotAuthorizedError
We could implement a UI to choose direct/indirect mode with mail server relay address/login/password.
Probably it should be done inside Roundcube mail UI (plug-in?) as it is the only Mail UI we have at the moment.
Workaround (gmail example)
Add login and password
vim.tiny /var/snap/mail/common/sasl_passwd
[smtp.gmail.com]:587 email:password
Encrypt
/snap/mail/current/postfix/usr/sbin/postmap -c /var/snap/mail/common/config/postfix /var/snap/mail/common/sasl_passwd
Change mail config (lost on every upgrade)
vim.tiny /var/snap/mail/common/config/postfix/main.cf
Find existing relayhost and change it.
relayhost = [smtp.gmail.com]:587
Append to the end:
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/var/snap/mail/common/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
Restart mail:
Send a message to google mail to check.
Currently Gmail and probably other mail providers do not allow sending mail directly to them:
https://support.google.com/mail/answer/10336?p=NotAuthorizedError
We could implement a UI to choose direct/indirect mode with mail server relay address/login/password.
Probably it should be done inside Roundcube mail UI (plug-in?) as it is the only Mail UI we have at the moment.
Workaround (gmail example)
Add login and password
Encrypt
Change mail config (lost on every upgrade)
Find existing relayhost and change it.
Append to the end:
Restart mail:
Send a message to google mail to check.