Service type
OpenSMTPD service
SMTP service that can send mail directly or integrate with third-party delivery services for reliable outbound email.
Use it in stacks that need provider-backed outbound email, while still keeping delivery setup and related secrets attached to the platform workflow.
Why teams use this service
On Wodby
How OpenSMTPD runs on Wodby
How applications reach it
- SMTP: host is the name of this app service inside the environment, port
25. No TLS, no username and no password; no token is generated. It accepts mail from any sender for any recipient, so its port is private and cannot be published; reach it only from inside the environment. - The service carries the
smtpdlabel, so it satisfies the mail link of application services. A linked PHP service, for example, receives the host and port asMSMTP_HOSTandMSMTP_PORTand PHP'smail()is delivered through it without code; other runtimes receive variables named by their own service, such asSMTP_HOSTandSMTP_PORT. Read those variables; do not hardcode the host. - SMTP provider credentials belong to this service, not to the application. Do not put a provider's host, user or password into application code or its variables.
Where the mail goes
- Without a relay, OpenSMTPD delivers straight to the recipients' mail servers from the cluster's address. Recipient providers often reject such mail or mark it as spam.
- The manifest declares an
smtpintegration ("Third-party SMTP server for Relay"). When an SMTP provider integration is attached to it, Wodby supplies the relay host, port, protocol, user and password, and all mail is forwarded through that provider. In the container these areRELAY_HOST,RELAY_PORT,RELAY_PROTO,RELAY_USERandRELAY_PASSWORD. - With a relay, the sender address must be one the provider accepts.
Generated configuration
On every start the container renders /etc/smtpd/smtpd.conf from environment variables and, when a relay user is set, the credentials table next to it. Never edit them. Other variables read by the template: OPENSMTPD_MAX_MESSAGE_SIZE (default 35M), OPENSMTPD_EXPIRE (how long undelivered mail stays queued, default 4d) and OPENSMTPD_BOUNCE_WARN.
Data
The mail queue is in /var/spool/smtpd. The spool volume is optional; without it, mail that is still queued is lost when the container is replaced. The manifest declares no backups, imports or actions.
Check the result
From this service's container:
printf 'Subject: test\n\nRelay test.\n' | sendmail -v -f <accepted sender> <recipient>shows whether the message was accepted.smtpctl show queuelists mail that has not been delivered yet. The service log shows the relay's answer for each delivery.
Overview
Technical profile and packaging
Versions
Source repository
Public Helm chart
Ports and protocols
Labels
Persistent volumes
Stacks
Use it inside ready-made stacks or your own
Relay outbound email through trusted providers
Runtime wiring
Reuse connectivity, storage, and runtime defaults
Endpoints
Volumes