OpenSignLabs / OpenSign

🔥 The free & Open Source DocuSign alternative
https://www.opensignlabs.com
GNU Affero General Public License v3.0
3.32k stars 261 forks source link

[Bug]: Issues with login and mail #1080

Open EDIflyer opened 2 months ago

EDIflyer commented 2 months ago

Issue Description

I setup OpenSign self-host on Linux with Docker using the command in the docs.

I logged in via my customer domain on https and created a new admin user and signed in, was shown the welcome tutorial, clicked to verify my email and realised it wouldn't work as I hadn't entered my mail server details.

I then edited .env.prod to add my SMTP credentials

I did a docker compose down and docker compose up to recreate the containers and force them to re-read the config.

I can now no longer login via my custom domain (not sure why?) but can still access http://localhost:3000 via port forwarding (it's running on a VPS). My saved username (email address) and password are not recognised for login.

I then tried to reset the password but was receiving a 'Please setup mail adapter' error.

Checking the logs I was also initially getting a 'please enter valid SMTP credentials' error in the logs - adding a ' around my password (even though it didn't include spaces?) now seems to not generate that error however the 'Please setup mail adapter' error remains. I have also confirmed the SMTP server/username/password by setting up on Thunderbird on a separate machine and all work as expected. Port is 465 so I've tried adding SMTP_SECURE=true but it didn't seem to make a difference.

# Email mailgun or set SMTP_ENABLE true to use SMTP config (The app will not initialize if any of these 3 variables are>
MAILGUN_API_KEY=
MAILGUN_DOMAIN=mail.yourdomain.com
MAILGUN_SENDER=postmaster@mail.yourdomain.com
SMTP_ENABLE=true
SMTP_SECURE=true
SMTP_HOST=smtp.domain.com
SMTP_PORT=465
SMTP_USER_EMAIL=me@domain.com
SMTP_PASS='REDACTED'   # if your password includes spaces then write password in single quotes

Expected Behavior

Be able to login at my custom domain Be able to send password reset email

Current Behavior

As above - only able to login via localhost and cannot send mail

Steps to reproduce

As above - setup fresh then edit .env.prod file

Screenshots of the issue(optional)

image

Operating System [e.g. MacOS Sonoma 14.1, Windows 11]

Debian 12

What browsers are you seeing the problem on?

Chrome

What version of OpenSign™ are you seeing this issue on? [e.g. 1.0.6]

1.4.0 (according to the docker logs at least - it says open_sign_server@1.4.0 start) - I'm just using the version updated 6 days ago on Docker Hub as per the docker-compose.yml (as mentioned in #1052 there aren't any tags to be sure)

What environment are you seeing the problem on?

Hosted (app.yourdomain.com)

Please check the boxes that apply to this issue report.

Code of Conduct

EDIflyer commented 2 months ago

OK so I nuked the entire setup and recreated from scratch and it now seems to send emails OK!

However the custom domain still isn't working - I've set the custom URL in the .env.prod but just get an error if trying to access it.