[GH-ISSUE #232] Caddy example for proxy #150

Closed
opened 2026-03-15 12:52:09 +03:00 by kerem · 3 comments
Owner

Originally created by @lil5 on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/232

As per the documentation see link, I’ll show you how I added mailpit to caddy server.

Documentation ref: https://mailpit.axllent.org/docs/configuration/proxy/

Example:

/usr/local/bin/mailpit --smtp 127.0.0.1:8084 --listen 127.0.0.1:8085 --smtp-auth-allow-insecure --smtp-auth-accept-any --webroot /mailpit/

localhost {
	redir /mailpit /mailpit/
	handle_path /mailpit/* {
		rewrite * /mailpit{path}
		reverse_proxy 127.0.0.1:8085
	}
}

Original: https://github.com/the-clothing-loop/website/blob/main/devops/templates/Caddyfile

Originally created by @lil5 on GitHub (Jan 3, 2024). Original GitHub issue: https://github.com/axllent/mailpit/issues/232 As per the documentation see link, I’ll show you how I added mailpit to caddy server. Documentation ref: https://mailpit.axllent.org/docs/configuration/proxy/ Example: `/usr/local/bin/mailpit --smtp 127.0.0.1:8084 --listen 127.0.0.1:8085 --smtp-auth-allow-insecure --smtp-auth-accept-any --webroot /mailpit/` ```caddy localhost { redir /mailpit /mailpit/ handle_path /mailpit/* { rewrite * /mailpit{path} reverse_proxy 127.0.0.1:8085 } } ``` Original: https://github.com/the-clothing-loop/website/blob/main/devops/templates/Caddyfile
kerem closed this issue 2026-03-15 12:52:14 +03:00
Author
Owner

@axllent commented on GitHub (Jan 4, 2024):

Thank you for the information @lil5. Can you please confirm the websocket works too with this configuration (ie: the web UI shows the messages instantly when they are delivered to Mailpit)?

<!-- gh-comment-id:1876219507 --> @axllent commented on GitHub (Jan 4, 2024): Thank you for the information @lil5. Can you please confirm the websocket works too with this configuration (ie: the web UI shows the messages instantly when they are delivered to Mailpit)?
Author
Owner

@lil5 commented on GitHub (Jan 4, 2024):

Yes the web ui works great 👍

<!-- gh-comment-id:1876735808 --> @lil5 commented on GitHub (Jan 4, 2024): Yes the web ui works great 👍
Author
Owner

@axllent commented on GitHub (Jan 4, 2024):

I've updated the website instructions 👍 Hartstikke bedankt!

<!-- gh-comment-id:1876753503 --> @axllent commented on GitHub (Jan 4, 2024): I've updated the website instructions :+1: Hartstikke bedankt!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#150
No description provided.