mirror of
https://github.com/decke/smtprelay.git
synced 2026-04-25 04:45:52 +03:00
[GH-ISSUE #149] doc: Full Usage Guide w/ Working Examples #35
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/smtprelay#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @coolaj86 on GitHub (Jan 27, 2024).
Original GitHub issue: https://github.com/decke/smtprelay/issues/149
I just set this up for a client. This is the config we ended up going with.
Directory Structure
caddy(for automated TLS certificates via Let's Encrypt)smtprelayLet's Encrypt TLS Certs via caddy
go,xcaddy, and (optional)servicemanvia https://webinstall.devcaddywith DNS support (no webserver required). Example w/ DNSimple:~/.config/caddy/Caddyfile:~/.config/caddy/caddy.env:caddyas a service withserviceman(Linux, macOS, & Windows) (--cap-net-bindis only necessary if using default ports 80 & 443)smtprelay config
~/.config/smtprelay/smtprelay.ini:~/.config/smtprelay/allowed_users.txt:serviceman:@joshuataylor commented on GitHub (Jun 21, 2024):
This is great, thanks!
Also, if you want to test SMTP directly, swaks is a great tool for this, comes in most distro repositories I believe.
When using startls (port 587 etc), you need to add
--tls:When testing user authentication:
When testing a specific IP/interface, add
--server 127.0.0.1, where127.0.0.1is the IP.@airbornelamb commented on GitHub (Oct 15, 2024):
@coolaj86 How are you shipping logs? This is the first time i've used serviceman and
journalctl -xef --unit smtprelay.serviceis showing great output but strangely/var/log/smtprelayis an empty folder.@joshuataylor commented on GitHub (Oct 15, 2024):
If it works with systemd you could just use StandardOutput/Standard error in your service file to log to file.
Depending what you mean by shipping logs but depending what you're trying to do it might be easier to hook into joirnalctl vs writing to file.
@airbornelamb commented on GitHub (Oct 15, 2024):
Thanks! Here's what I did if it helps other people:
sudo vi /etc/systemd/system/smtprelay.servicetouch /var/log/smtprelay/service.logtouch /var/log/smtprelay/service_error.logsudo systemctl reload smtprelay.serviceThen added /var/log/smtprelay/*.log as a folder to look for in my collector configuration and it started picking it up
@schtritoff commented on GitHub (Feb 28, 2025):
Didn't find documentation how to run in container (docker) so I created a repo containing some example workflow https://github.com/schtritoff/docker-smtprelay