Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoming email setup - Local delivery setup - how to? #237

Open
maltokyo opened this issue Jan 19, 2020 · 9 comments
Open

Incoming email setup - Local delivery setup - how to? #237

maltokyo opened this issue Jan 19, 2020 · 9 comments

Comments

@maltokyo
Copy link
Contributor

I am trying to do this in docker, but I am not sure how to edit /etc/zulip/zulip.conf from docker-compose settings:

https://zulip.readthedocs.io/en/latest/production/email-gateway.html#local-delivery-setup

Could someone please share how you got INCOMING email working with docker-compose?

Concretely, how to concatenate , zulip::postfix_localmail to puppet_classes in /etc/zulip/zulip.conf like this:

puppet_classes = zulip::voyager, zulip::postfix_localmail

And I also need to add a section to /etc/zulip/zulip.conf like this:

[postfix]
mailname = emaildomain.example.com
@timabbott
Copy link
Member

I think this is likely annoying to do with docker-zulip today; one needs to patch the Dockerfile or something to do it. My thought on how to fix this is to change puppet/zulip/manifests/dockervoyager.pp to include the zulip::postfix_localmail puppet class by default, and then add a way to add blocks to /etc/zulip/zulip.conf in the entrypoint.sh logic. (Or encourage using MANUAL_CONFIGURATION for it).

@maltokyo
Copy link
Contributor Author

Thanks. If I use manual config and still have some config in docker compose which is given preference? Do I need to remove everything from docker compose or is it all just ignored?

@maltokyo
Copy link
Contributor Author

@timabbott can I take over the old manual config of my "traditional" installation? This might be easier. Dealing with all of the variables has become a nightmare.

@maltokyo
Copy link
Contributor Author

maltokyo commented Apr 3, 2020

@timabbot is there any chance of getting a few pointers here. Would you know which contributor may be able to guide me in the right direction. I've tried (I think) what you said above and rebuild but cannot get this working as it did in the non-docker version.

@maltokyo
Copy link
Contributor Author

maltokyo commented Apr 3, 2020

Sorry. Should be @timabbott

@timabbott
Copy link
Member

@hackerkid can you help with this? Ideally, the goal should be to have the incoming email gateway be fully supported by just merging changes to Zulip as I described above, but we can at least detail a workaround here.

@maltokyo
Copy link
Contributor Author

maltokyo commented Apr 4, 2020

@hackerkid @timabbott I really give up ;) I tried to the best of my ability to hack it into working status, but couldn't find a way. I did the following steps:

  1. Setup MX server on DNS

  2. Changed this line in the Dockerfile from:

export PUPPET_CLASSES="zulip::dockervoyager" \

to:

export PUPPET_CLASSES="zulip::dockervoyager, zulip::postfix_localmail" \

  1. Add EMAIL_GATEWAY_PATTERN to settings in docker-compose.yml, and verify it was reflected correctly in the settings file.

  2. Rebuilt the container and start-up with the patched Dockerfile, it starts fine.

  3. Run /home/zulip/deployments/current/scripts/zulip-puppet-apply

  4. Restart with /home/zulip/deployments/current/scripts/restart-server

  5. Verify that something is listening on port 25 inside the container (and outside) with netstat -tulpn | grep LISTEN

  6. postfix was not running and hence nothing was listening in the container on port 25, so I tried to start it manually with /etc/init.d/postfix restart which worked, but emails sent there came back to me with error:

The response from the remote server was:
554 5.7.1 <stream.f20ed1cf65dc9c59376be9573333dcfc.show-sender@mail.domain.com>: Relay access denied

@myedibleenso
Copy link
Contributor

I'm hitting the same issue. It seems I need to provide a value for mailname under [postfix].

What is the recommended method for customizing zulip.conf?

@myedibleenso
Copy link
Contributor

Based on the discussion around this PR, adding zulip::postfix_localmail to puppet_classes in the Dockerfile introduces other issues. Is that (still) the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants