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

Postfix cannot be installed for use with local email mirroring #192

Closed
aiveras opened this issue Apr 11, 2019 · 3 comments
Closed

Postfix cannot be installed for use with local email mirroring #192

aiveras opened this issue Apr 11, 2019 · 3 comments

Comments

@aiveras
Copy link

aiveras commented Apr 11, 2019

Hi,

I was trying to setup email mirroring with local delivery. The comments in settings.py say

If you are using local delivery, EMAIL_GATEWAY_PATTERN is all you need to change in this file. You will also need to enable the Zulip postfix configuration to support local delivery by adding
, zulip::postfix_localmail to puppet_classes in /etc/zulip/zulip.conf and then running scripts/zulip-puppet-apply -f to do the installation.

The script command is also run when the container is restarted, but it fails to install postfix, see the following error message:

Attaching to zulip_zulip_1_72224365dae8
zulip_1_72224365dae8 | 2019-04-11T12:18:04.561434573Z === Begin Initial Configuration Phase ===
zulip_1_72224365dae8 | 2019-04-11T12:18:04.566492221Z Preparing and linking the uploads folder ...
zulip_1_72224365dae8 | 2019-04-11T12:18:04.577336334Z Prepared and linked the uploads directory.
zulip_1_72224365dae8 | 2019-04-11T12:18:04.577366885Z Executing nginx configuration ...
zulip_1_72224365dae8 | 2019-04-11T12:18:04.577371565Z Disabling https in nginx.
zulip_1_72224365dae8 | 2019-04-11T12:18:07.488351645Z Notice: Compiled catalog for ccd08316fb89 in environment production in 1.62 seconds
zulip_1_72224365dae8 | 2019-04-11T12:18:08.268107363Z Notice: /Stage[main]/Zulip::Postfix_localmail/File[/etc/mailname]/ensure: defined content as '{md5}e073d6614784589dea079596dab9d238'
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324617005Z Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postfix' returned 100: Reading package lists...
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324648083Z Building dependency tree...
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324653436Z Reading state information...
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324656370Z Package postfix is not available, but is referred to by another package.
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324660218Z This may mean that the package is missing, has been obsoleted, or
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324664420Z is only available from another source
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324668379Z
zulip_1_72224365dae8 | 2019-04-11T12:18:08.324672498Z E: Package 'postfix' has no installation candidate
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325140388Z Error: /Stage[main]/Zulip::Postfix_localmail/Package[postfix]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postfix' returned 100: Reading package lists...
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325161821Z Building dependency tree...
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325165983Z Reading state information...
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325169483Z Package postfix is not available, but is referred to by another package.
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325173138Z This may mean that the package is missing, has been obsoleted, or
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325176677Z is only available from another source
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325180077Z
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325183349Z E: Package 'postfix' has no installation candidate
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325685091Z Notice: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/virtual]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.325878107Z Warning: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/virtual]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:08.326188825Z Notice: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/main.cf]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.326353653Z Warning: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/main.cf]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:08.326963460Z Notice: /Stage[main]/Zulip::Postfix_localmail/Exec[postmap /etc/postfix/virtual]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.327002308Z Warning: /Stage[main]/Zulip::Postfix_localmail/Exec[postmap /etc/postfix/virtual]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:08.340039673Z Notice: /Stage[main]/Zulip::Base/File[/etc/zulip/zulip-secrets.conf]/ensure: created
zulip_1_72224365dae8 | 2019-04-11T12:18:08.341322809Z Notice: /Stage[main]/Zulip::Base/File[/etc/zulip/settings.py]/ensure: created
zulip_1_72224365dae8 | 2019-04-11T12:18:08.344503330Z Warning: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/master.cf]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:08.344515551Z Notice: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/master.cf]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.345163048Z Notice: /Stage[main]/Zulip::Postfix_localmail/Service[postfix]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.345355840Z Warning: /Stage[main]/Zulip::Postfix_localmail/Service[postfix]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:08.348342160Z Notice: /Stage[main]/Zulip::Base/File[/etc/zulip/zulip.conf]/owner: owner changed 'root' to 'zulip'
zulip_1_72224365dae8 | 2019-04-11T12:18:08.348845170Z Notice: /Stage[main]/Zulip::Base/File[/etc/zulip/zulip.conf]/group: group changed 'root' to 'zulip'
zulip_1_72224365dae8 | 2019-04-11T12:18:08.833010984Z Notice: /Stage[main]/Zulip::Apt_repository/Exec[setup_apt_repo]/returns: executed successfully
zulip_1_72224365dae8 | 2019-04-11T12:18:08.874025092Z Notice: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/transport]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.874122263Z Warning: /Stage[main]/Zulip::Postfix_localmail/File[/etc/postfix/transport]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:08.876208204Z Notice: /Stage[main]/Zulip::Postfix_localmail/Exec[postmap /etc/postfix/transport]: Dependency Package[postfix] has failures: true
zulip_1_72224365dae8 | 2019-04-11T12:18:08.876286813Z Warning: /Stage[main]/Zulip::Postfix_localmail/Exec[postmap /etc/postfix/transport]: Skipping because of failed dependencies
zulip_1_72224365dae8 | 2019-04-11T12:18:09.100132280Z Notice: /Stage[main]/Zulip::App_frontend/File[/etc/nginx/sites-available/zulip-enterprise]/content: content changed '{md5}e6814e1bc9711cb25ac302391eed5b2e' to '{md5}99c6de0d02bfac9e6fe1e7b936d0ea9c'
zulip_1_72224365dae8 | 2019-04-11T12:18:09.185606378Z Notice: /Stage[main]/Zulip::Nginx/Service[nginx]: Triggered 'refresh' from 1 events
zulip_1_72224365dae8 | 2019-04-11T12:18:09.219167570Z Notice: Finished catalog run in 1.14 seconds
zulip_zulip_1_72224365dae8 exited with code 1

I believe the package lists just have to be updated. Running apt-get install nano also fails within the container, I first need to run apt-get update. That way I was also able to successfully run scripts/zulip-puppet-apply -f.

However, the update doesn't persist and Zulip will still exit with the same error on a container restart. Maybe this could simply be solved by updating in entrypoint.sh? I might also be totally wrong and just missing something.

Thanks

@timabbott
Copy link
Member

@aiveras thanks for the report. It isn't intended that you change what software is installed in the container image without rebuilding the container, which is why e.g. we don't do things like run apt update on startup.

It's possible the right model is for the postfix_localmail puppet rule to be enabled by default in the docker image, but I'm not sure and will need to think about it a bit. In the meantime I'd recommend for your use that you edit the Dockerfile to include that in /etc/zulip/zulip.conf and use docker build to rebuild the image.

@tranvansang
Copy link

Consider #382 to solve this issue without building a new image

@timabbott
Copy link
Member

Closing in favor of #237 which has more discussion.

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

No branches or pull requests

3 participants