No internet connection
  1. Home
  2. Support

Email/SMTP config forces to define an user and password, should be optional

By Adrián López @adrianlzt2018-10-22 13:40:14.996Z

We are using google as our relay SMTP server. We have to use that server without user and pass.

Talkyard uses fake mail if user or password is not defined:

Could we make that parameters optional?

  • 8 replies
  1. KajMagnus @KajMagnus2018-10-22 14:14:06.195Z

    Can I ask, how do you authenticate against Google's mail server? Is it maybe by IP address, as described here?: step 7:

    7. In the Authentication section, check one or both boxes to set an authentication method:

    • Only accept mail from the specified IP addresses—The system only accepts mail sent from these IP addresses as coming from your domains.
    • Require SMTP Authentication—Enforces the use of SMTP authentication to identify the sending domain. Using this option requires your clients to connect via TLS.

    Anyway since apparently controlling an IP address works fine, for authentication (i didn't know that until now when I read Google's docs), then yes the username and password settings should be made optional.

    (Thanks for linking to the source :- ) saved some time for me)

    1. AAdrián López @adrianlzt2018-10-22 14:41:12.644Z

      We use G-Suite,

      I have checked to send an email using the server without auth and works correctly. I tried to use some random user/pass, but it does not work.


      1. AAdrián López @adrianlzt2018-10-22 14:45:59.944Z

        BTW, any docs of how to build a custom image?

        I have been trying building with sbt, docker, etc but no luck

        1. KajMagnus @KajMagnus2018-10-23 04:04:40.897Z

          Hmm I should document that better, and add a DOCKER_REPOSITORY variable in .env.

          I started a separate topic about this: How do you want to build and upgrade, yourself? — maybe you'd like to reply over there, with your thoughts?

        2. In reply toadrianlzt:
          KajMagnus @KajMagnus2018-10-23 05:32:53.386Z

          I tried to use some random user/pass, but it does not work.

          What's the error message?

          If you type docker-compose logs app > dc-logs-app.txt, maybe you'd like to send me a private message with the dc-logs-app.txt file? Then i can check for error messages.

          Anyway, I'll do this in the next release, if there's no username:, that is:

          • I'll do: properties.put("mail.smtp.auth", "false");

          • And I'll skip this line:

            apacheCommonsEmail.setAuthenticator(new acm.DefaultAuthenticator(userName, password))
          1. AAdrián López @adrianlzt2018-10-24 08:48:16.755Z

            Sorry, I was meaning that trying to send an email to google SMTP with random user/pass was not working

      2. Progress
        with handling this problem
      3. @KajMagnus marked this topic as Planned 2018-10-23 04:08:49.035Z.
      4. KajMagnus @KajMagnus2018-11-07 12:24:02.484Z

        Now I've removed the requirement to specify username and password. Your server should have auto-upgraded to the new version, 0.6.15, with this fixed, last night (Tue –> Wed). Would you like to see if works for you? (Sorry this took long. That's because there were some other changes that took long to review & test, in the same release.)

        1. @KajMagnus marked this topic as Started 2018-11-07 12:24:05.626Z.
        2. @KajMagnus marked this topic as Done 2018-11-09 15:37:39.207Z.