ksylvan / docker-mail-server

Ansible playbooks to deploy a full featured mail server stack using Docker.
50 stars 11 forks source link

502 bad gateway on store.test.dev #8

Closed ghost closed 6 years ago

ghost commented 6 years ago

not sure what / where or how we broke what was working fine but now getting a 502 Bad Gateway nginx

on https://store.test.dev

ghost commented 6 years ago

docker log -f opencart are showing the below repeatedly

Error executing 'postInstallation': You should specify username, password, host, port for SMTP configuration

ghost commented 6 years ago

seems we need to add compete env for this to function, any way we could also prompt for input like we do on domain and hostname and password ? if opencart true then as for mail host smtp port smtp username smtp password

environment:
  - SMTP_HOST=smtp.gmail.com
  - SMTP_PORT=587
  - SMTP_USER=your_email@domain.ext
  - SMTP_PASSWORD=your_password
ksylvan commented 6 years ago

Ah. I see. I didn't test the SMTP_HOST setting.

The thing is that mailserver is set up to allow relaying unauthenticated from any of the local containers, so please play around with using

SMTP_HOST=mailserver
SMTP_PORT=25
SMTP_USER=admin@{{ domain_name }}
SMTP_PASSWORD=

and see if that works. If it does, I can make the fix.

ghost commented 6 years ago

Yes this does work, as a test Ive added and tested it

to roles/mailserver/files/docker-compose.yml

also i noticed these fields

where the variables db_password and domain_name are from questions answered, so where can i add the rest of these questions in bin/setup and any other files involved so they get populated ???

On Mon, Nov 13, 2017 at 7:25 PM, Kayvan Sylvan notifications@github.com wrote:

Ah. I see. I didn't test the SMTP_HOST setting.

The thing is that mailserver is set up to allow relaying unauthenticated from any of the local containers, so please play around with using

SMTP_HOST=mailserver SMTP_PORT=25 SMTP_USER=admin@{{ domain_name }} SMTP_PASSWORD=

and see if that works. If it does, I can make the fix.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ksylvan/docker-mail-server/issues/8#issuecomment-344011693, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXFTtx4hEbyA2z-FRgof3AAc_FfZfxPks5s2ImsgaJpZM4QcHw1 .

ksylvan commented 6 years ago

I'd rather not add more questions than necessary. Not really sure if you need to add SMTP_PASSWORD=opencart since I think the connection is unauthenticated, but it might just be ignored.

Also, if someone tries to respond to an opencart generated email, the mail server will bounce their email, since there is no postfix user opencart unless you added one via postfixadmin.

What do you think?

Should we add the questions and answers for initial OPENCART_USERNAME and OPENCART_PASSWORD and the mailbox (for replies) to be filled in when the person sets use_opencart? Or should we simply default to reasonable values (i.e. SMTP_USER=admin@{{ domain_name }} and document what the person needs to do? (i.e. "Please login to your store admin: https://store.yourdomain.tld as "opencart" with initial password "changeThis" and change your admin password")?

ghost commented 6 years ago

sure i think its fine to add questions and answers for initial OPENCART_USERNAME and OPENCART_PASSWORD and the mailbox (for replies) to be filled in when the person sets use_opencart?

On Mon, Nov 13, 2017 at 10:00 PM, Kayvan Sylvan notifications@github.com wrote:

I'd rather not add more questions than necessary. Not really sure if you need to add SMTP_PASSWORD=opencart since I think the connection is unauthenticated, but it might just be ignored.

Also, if someone tries to respond to an opencart generated email, the mail server will bounce their email, since there is no postfix user opencart unless you added one via postfixadmin.

What do you think?

Should we add the questions and answers for initial OPENCART_USERNAME and OPENCART_PASSWORD and the mailbox (for replies) to be filled in when the person sets use_opencart? Or should we simply default to reasonable values (i.e. SMTP_USER=admin@{{ domain_name }} and document what the person needs to do? (i.e. "Please login to your store admin: https://store.yourdomain.tld as "opencart" with initial password "changeThis" and change your admin password")?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ksylvan/docker-mail-server/issues/8#issuecomment-344056402, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXFTib52S_nOvLiu2hUjUwpKB3UoaArks5s2K4JgaJpZM4QcHw1 .

ksylvan commented 6 years ago

@outbackdingo please look this over and see if it works as you would expect for using opencart.

ghost commented 6 years ago

looks good to me....