Skip to content

Add mailcow subdomain sample config #756

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

Closed
wants to merge 3 commits into from

Conversation

petarvnikolov
Copy link
Contributor

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description

I made a sample reverse proxy config for mailcow. It is made according to the documentation and modified with some head-bashing :)

Benefits of this PR and context

Users, which host their mailcow mail server behind a SWAG reverse proxy will be able to easily set it up.

How Has This Been Tested?

The config was tested for a mailcow server I am hosting for myself. It took some time to unbreak the SOGo mail client Exchange ActiveSync functionality after I mistakenly appended the URI for it to the end of the proxy_pass directive in the corresponding location block.

Source / References

@LinuxServer-CI
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

Comment on lines +47 to +50
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are redundant, they should exist in proxy.conf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was that when i tried to overwrite values for proxy_buffers and etc., nginx detected duplicated directives in the same context. That is why I removed the proxy.conf include and wrote all the necessary directives manually in the location blocks. Would a more accurate solution be to define the proxy.conf include in the server block of the proxy-conf and overwrite the necessary directives in the location blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*The specific values for proxy_buffers, proxy_buffer_size, proxy_busy_buffers_size, proxy_connection_timeout, proxy_send_timeout and proxy_read_timeout are required as per the mailcow-dockerized documentation regarding reverse proxies.

@petarvnikolov
Copy link
Contributor Author

I mistakenly submitted the pull request from the master branch of my fork. I will close this PR and create a new one.

@LinuxServer-CI LinuxServer-CI moved this from PRs to Done in Issue & PR Tracker May 31, 2025
@petarvnikolov petarvnikolov mentioned this pull request May 31, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants