Forums

Resolved
0 votes
I have switched to migadu as an email provider, I use the following setup, but get an error:
https://pasteboard.co/J0JIoCJ.png

This is what works in e.g. Thunderbird:

https://pasteboard.co/J0JJvFA.png

How can I get this to work?
Wednesday, March 25 2020, 02:05 PM
Share this post:
Responses (5)
  • Accepted Answer

    Monday, March 30 2020, 09:09 AM - #Permalink
    Resolved
    0 votes
    OK. I did not realise you weren't using ClearOS as your familie-dokter.net mail server.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 30 2020, 08:53 AM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:

    Thanks. Documentation updated.

    I am not sure why you are using /etc/postfix/rewrite. Can't you just change the Mail Domain in the Mail Settings?
    What is "myhost" doing? There is normally a variable "myhostname" which is set by ClearOS.
    smtp_enforce_tls has been deprecated.Instead use smtp_tls_security_level which is already set to "may". Having it set will mean that smtp_enforce_tls is ignored.


    Migadu is mij mail provider, it has the mx records for familie-dokter.net,
    If I would use
    mydomain = familie-dokter.net
    a mail to anyuser@familie-dokter.net the SMTP server will try and deliver locally while I want it to use Migadu. So I used a maildomain that is not familie-dokter.net. The rewrite is needed because Migadu does not accept logging in as anyuser@familie-dokter.net while the From:header says familie-dokter.lan... I could have used aliases or .forwards but in doing it like this I am able to send mail to any new mail user created for familie-dokter.net without the need for a change at my clearos server. myhost = localhost as I wanted to make sure it is not binding to the outside address (scared of creating a relay :-) )

    If there are better ways of doing this, I am by no mean an expert on all this, any advise is appreciated..
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 30 2020, 07:28 AM - #Permalink
    Resolved
    0 votes
    Thanks. Documentation updated.

    I am not sure why you are using /etc/postfix/rewrite. Can't you just change the Mail Domain in the Mail Settings?
    What is "myhost" doing? There is normally a variable "myhostname" which is set by ClearOS.
    smtp_enforce_tls has been deprecated.Instead use smtp_tls_security_level which is already set to "may". Having it set will mean that smtp_enforce_tls is ignored.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 30 2020, 06:02 AM - #Permalink
    Resolved
    0 votes
    Thank you Nick,
    I now have it running in the way that I want it...Just for reference this is what I added:

    /etc/postfix/main.cf:
    mydomain = familie-dokter.lan
    myhost=localhost
    smtp_always_send_ehlo = yes
    smtp_enforce_tls = yes
    smtp_generic_maps = hash:/etc/postfix/rewrite
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
    smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.trust.crt

    sasl_password:
    [smtp.migadu.com]:587 fake-address@familie-dokter.net:*************

    /etc/postfix/rewrite:
    @familie-dokter.lan @familie-dokter.net
    familie-dokter.lan familie-dokter.net
    localhost familie-dokter.net


    I know some of it is overkill, but very happy that it works.
    There is a small error in the description that you reference SMTP Authentication to ISP
    It says:
    In chapter starttls it says:
    The ISP's mail server, username, and password are kept in a separate file: /etc/postfix/sasl_passwd. The format is:
    [hostname] username:password

    But in the described case this should be:
    [hostname]:587 username:password


    After I changed that it all started to fall in place!
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, March 25 2020, 02:41 PM - #Permalink
    Resolved
    0 votes
    The mail settings app does not support STARTTLS. What you need is SMTP Authentication to ISP for your normal e-mail clients. You can then set up the SMTP Settings to relay via your own mail server (use localhost:25).
    The reply is currently minimized Show
Your Reply