When a local mail relay beats direct SMTP for Redmine
If your self-hosted Redmine must send issue notifications and reminders from a server that already runs a local mail transfer agent or can reach one, you can point Redmine at that agent instead of opening a direct SMTP connection. Redmine supports this through its sendmail delivery method, and the choice moves queueing, retries and credential handling out of Redmine and into the MTA. Your mail team, not the Redmine administrator, then owns how long messages wait, how failed deliveries are retried and where relay credentials live.
Teams usually choose this route for a few concrete reasons. An existing relay already handles SPF, DKIM and sending limits for the organization, and Redmine can reuse it without a second set of credentials. Internal-only networks that block outbound port 25 or 587 from application servers often allow traffic to a local MTA only. Central logging also improves when Redmine's outgoing mail passes through the same MTA that logs the rest of the server's mail, which makes it easier to trace a missing notification. Confirm first that your relay accepts unauthenticated submission from the Redmine host, because that setting decides whether you gain much from this route.
Before you commit, confirm which Redmine line you will run. The Redmine download page lists 7.0.x as the fully supported line and 6.1.x as receiving only bug fixes and security updates, so plan your mail configuration against the version your upgrade path targets. Check the Redmine version you run against that page, and verify the sendmail options for your release in the installation and configuration documentation before you copy any settings into production.
Deciding between sendmail, a local relay and direct SMTP
Redmine can hand outgoing mail to a local MTA, relay it through a host you run, or connect straight to a corporate SMTP server. Each path shifts work between your Redmine host, your mail team and your network controls, so settle these points before you edit configuration.
Existing MTA on the host
Check whether the Redmine host already runs a working MTA such as Postfix or Exim, and whether it is managed by your team or by a platform group. Reusing it means Redmine depends on a service you may not patch or monitor with Redmine in mind. Installing a new MTA adds a component that needs its own updates, logs and queue checks. Confirm who owns that service before you choose sendmail mode.
Who owns relay authentication
A local MTA can hold the SMTP username and password for the corporate relay, which keeps credentials out of Redmine's configuration file. Direct SMTP puts those credentials in configuration.yml under the application's control. Decide who rotates the secret, where it is stored, and who is notified when the account is locked or the password expires.
IP allowlisting on the corporate server
Many corporate mail servers accept unauthenticated submission only from listed IP addresses. Relaying through a local MTA sends mail from the Redmine host's address, while some cloud or container setups change that address. Ask the mail team whether the relay is allowlisted by address, requires authentication, or both, and whether a NAT or proxy address must be added before testing.
Monitoring the mail queue
A local MTA holds messages in a queue when the upstream server is slow or refuses them, so Redmine can report success while mail waits on disk. Someone must watch queue depth, deferred messages and MTA logs, or delays go unnoticed for days. Direct SMTP surfaces most failures as errors inside Redmine's own logs, which is easier to alert on but gives less visibility into retries.
Offline and air-gapped networks
Where hosts have no route to a corporate relay or the internet, the realistic option is a local MTA that delivers to an internal mail server, or a relay inside the isolated segment. Confirm which internal hosts accept mail, whether DNS resolves them, and whether any approved relay exists at all. Direct SMTP only works if the network path to the mail server is permitted by policy.
Ownership of bounces and failures
Bounced messages, rejected recipients and spam blocks return to the sender address or to a queue on the MTA host, not to Redmine's users. Decide who reads these, who corrects the sender identity or SPF record, and who tells project managers when a notification never arrived. Name a mailbox or ticket queue for these replies before go-live.
How Redmine hands mail to sendmail
Redmine does not deliver mail itself. When it sends a notification, the Ruby mailer builds the message and passes it to a local binary, usually /usr/sbin/sendmail, instead of opening a connection to a remote SMTP server. Redmine's configuration.yml file selects this method under the email delivery section, with the delivery method set to sendmail and any binary path or arguments declared beside it. The local MTA then takes over. It accepts the message, places it in its queue, attempts delivery, retries on temporary failures, and forwards the message to a smart host or directly to the corporate mail server. Redmine's job ends at handoff, so a message that Redmine logs as sent has not necessarily reached a mailbox.
The key names, their nesting and the accepted values change between Redmine releases, so check them against the configuration.yml.example file shipped with the exact version you run before you copy any snippet, including the one in this guide. The Redmine installation guide is the reference for which setups Redmine supports, and it is the first place to confirm the sendmail option and its arguments for your release. Also confirm the Ruby and database versions that release supports, since the mail path is only one part of a working install.
Before you rely on this path, confirm three things in your environment: which user the Redmine process runs as and whether that user may execute the sendmail binary, which MTA package provides that binary on your host, and which smart host or relay accepts mail from that server. Those answers decide whether the arguments in configuration.yml are correct and where a failure will show up, either in the Redmine production log or in the MTA's own log. Record them in your deployment notes so the person troubleshooting a missing notification does not have to rediscover the path.
Sendmail configuration options and when each fits
This table compares the main choices when Redmine hands mail to a local agent instead of talking SMTP directly: the binary path, the arguments passed to it, whether the local agent delivers or forwards, and which mail agent runs it. Read each row as a decision you need to confirm against your own mail agent's documentation, since defaults differ between builds and distributions. The main takeaway is that the arguments and the forwarding model matter as much as the binary path.
| Choice | What it controls | When it fits | What to confirm |
|---|---|---|---|
| Sendmail binary path | Which executable Redmine calls, set under the sendmail delivery settings in configuration.yml | Use the path your distribution installs the sendmail compatibility command at, so the call matches the agent you run | The path on your host and that the Redmine service user can execute it |
| Arguments passed to sendmail | How the message is read and how recipients are handled, including the -i flag | Include -i on Debian exim so a lone dot line in a message body does not end the message early | The exact argument list your MTA accepts and its documented meaning for recipients |
| Local delivery versus smart host | Whether the local agent delivers to recipient domains itself or forwards everything to a relay | Local delivery suits hosts with direct outbound access and stable reverse DNS. A smart host suits sites that require mail to leave through the corporate server | Outbound port rules, reverse DNS, and whether your mail server accepts relay from this host address |
| Postfix as the local agent | Queueing, retries, TLS to the relay and sender rewriting | Common choice where a relay host, SASL credentials and queue inspection are needed on the same server | Relay host syntax, SASL and TLS settings, and the queue tools available in your version |
| Exim as the local agent | Routing, queueing and the sendmail compatibility interface | Default on some Debian-based hosts. Fits smart host routing with a minimal configuration | Router and transport configuration, and how the sendmail wrapper maps arguments on your release |
| Queueing and retries | Whether mail that fails to leave is held and retried by the MTA or lost at the application | Keep queueing on the MTA so temporary relay outages do not drop notifications | Retry intervals, queue size limits and where bounced mail is reported |
| Credentials and relay trust | How the MTA authenticates to the corporate server and which host addresses it accepts from | Needed when the corporate server requires authenticated submission or an allowed source address | Where credentials are stored, their file permissions, and the relay's allowed source list |
Setup sequence for Redmine through a local relay
This sequence takes Redmine mail off direct SMTP and onto a local MTA that hands messages to the corporate mail server, with a check at each stage so that a failure is isolated to one layer.
Confirm the MTA sends mail from the command line
Before touching Redmine, the administrator on the Redmine host sends a plain test message through the local MTA using the sendmail binary, outside any Ruby process. Use a test recipient your team controls and a simple subject so the message is easy to find. Run
sendmail -vwith the recipient address and a short body, then check the MTA log for the queue ID and final status. The step is done when the message reaches the test mailbox and the log shows a delivery or relay acceptance, not just a queued entry. If this fails, Redmine will fail the same way, so resolve it here first.Set the delivery method and sendmail location in Redmine
The Redmine administrator edits the email configuration in
configuration.ymlunder the production environment, setting the delivery method to sendmail and the sendmail location to the path of the binary confirmed in the previous step. Keep the file owned and readable only by the account that runs Redmine, and restart the application so the change loads. Consult the Redmine installation and configuration documentation for the exact key names in your release, because the structure has changed between versions. The step is done when Redmine starts without configuration errors and the email settings page or log reflects the new method.Apply the -i argument for Debian exim
On Debian systems where exim provides the sendmail interface, the sendmail invocation needs the
-iargument so that a lone period on a line does not end the message early. Add the argument to the arguments setting that Redmine passes to sendmail, following the version of Redmine you run, and confirm the setting name in its configuration reference. Then send a message from Redmine that contains a line with only a period, and check that the full body arrives. The step is done when the received message contains the complete body and the MTA log shows one message, not a truncated one.Align sender address and domain
The sender address Redmine uses must be an address the corporate mail platform accepts for the Redmine host, with a domain that the MTA and the receiving server treat as authorized. Ask the mail team which sender address and domain they expect, and confirm that the local MTA's envelope sender and the visible From header match that domain. Check that SPF and DKIM records for the sending domain cover the path the message takes, and confirm with the mail team, since their requirements decide what is accepted. The step is done when a test message shows the expected From address and passes the authentication checks reported by the receiving server.
Configure the MTA to relay to the corporate server
The local MTA is configured to forward all outbound mail to the corporate mail server as a smart host, with the relay hostname, port and TLS settings the mail team provides. Whether the corporate server requires authentication, and by which mechanism, must be confirmed with that team, and any credentials are stored in the MTA's protected configuration rather than in Redmine. Restart the MTA, then send another command-line test message to an external address. The step is done when the MTA log shows a successful handoff to the corporate relay and the message is delivered to the external mailbox.
Send a test notification from Redmine
An administrator sends a test email from Redmine's email settings, or triggers a real notification by updating a test issue in a test project whose watcher is a mailbox the team controls. Use an account whose notification preferences are known so the expected recipients are clear. Check the mailbox for the message, its subject, its sender and the link back to the issue. The step is done when the notification arrives in the watcher mailbox, with the body and headers matching what you expected from the earlier checks.
Check the MTA queue and Redmine logs
Review the MTA queue to confirm no messages from Redmine are stuck or deferred, and review Redmine's production log for delivery errors around the test send. Look for deferred or bounced entries in the MTA log and for any exceptions raised by the mailer in Redmine's log. Repeat the test once or twice to confirm the result is consistent rather than a single lucky send. The step is done when the queue is empty of Redmine messages, the logs show clean delivery for each test, and the team has recorded the settings in its runbook for the next change.
Mail flow from Redmine to the corporate mail server
Redmine notifications start in the Rails application or a background job, which hands each message to the sendmail binary instead of opening an SMTP connection itself. The local MTA queues the message on the Redmine host, then relays it to the smart host or corporate relay, which delivers it to the recipient mailbox. Check each hand-off separately: the binary path and arguments on the Redmine side, the queue on the MTA side, and the relay's acceptance of the sending host.
How Redmine mail moves from the application to the recipient through a local MTA.
Securing the local relay path
A local MTA handling Redmine mail is a small relay with its own attack surface, credentials and logs. The cards below cover the controls that keep that relay from being abused, keep corporate credentials protected, and leave evidence that mail was sent as intended.
Listen on loopback only
Redmine should hand mail to the MTA over the local sendmail binary, so the MTA has no reason to accept connections from other hosts. Check the MTA's listening sockets and interface bindings after every package update, because a default configuration that listens on all interfaces turns the server into an open relay for anyone who can reach it. Confirm with a port scan from another host that port 25 is closed to the network.
Restrict who can submit mail
Only the Redmine service account and the processes that legitimately need to send mail should be able to hand messages to the MTA. Verify that the sendmail binary and submission path are readable and executable only by the intended user or group, and that no other local account can inject messages with arbitrary envelope senders. Record the account names in your change documentation so reviewers can confirm the list.
Protect relay credentials stored by the MTA
When the MTA authenticates to the corporate server, its credential file, often a SASL password map, holds a usable secret. Keep that file owned by root or the MTA user with mode 600, avoid placing the same password in Redmine's configuration.yml, and rotate it when staff change. Ask whether the corporate relay can allow this host by IP address so that a stolen password alone is not enough.
Encrypt the hop to the corporate server
The connection between the local MTA and the corporate mail server should use STARTTLS or implicit TLS with certificate verification enabled, so that notification content and credentials are not exposed on the network path. Confirm that the MTA checks the server certificate against the expected hostname and that the CA bundle it uses is maintained. A hostname mismatch usually shows up as a deferred queue, not a clear error, so check the MTA log after the first test message.
Align sender domain with SPF and DKIM
Notifications leaving the relay should use a sender address in a domain your organization controls, and the corporate DNS must list the relay host in SPF and sign outgoing mail with DKIM for that domain. Without this alignment, receiving servers may quarantine Redmine notifications or reject them outright. Ask your mail team to confirm the relay host is authorized before go-live, and send a test to an external mailbox to check the headers.
Keep logs as delivery evidence
The MTA log records when Redmine handed off a message, the queue ID, the recipient status and any deferral or bounce. Decide how long to keep these logs and where they live, and make sure they are included in the Redmine backup and log rotation policy so that a dispute about a missed notification can be traced. Set retention with your compliance or records team rather than picking a default, and confirm that log access is restricted because logs can contain recipient addresses.
Operating the queue, logs and upgrades
How do I monitor the mail queue on a local MTA used by Redmine?
Check the queue on the MTA host itself, because Redmine does not show whether a message was accepted, deferred or dropped. On Debian with exim, exim -bp lists queued messages and exim -bpc prints a count, so a rising count points to a relay or upstream problem. Set an alert on queue size and on the age of the oldest message, since a stalled queue often looks healthy from the Redmine side. Confirm the exact commands and queue directory layout for your MTA version before you write the alert.
How are retries and bounces handled when Redmine mail goes through sendmail?
The MTA retries deferred messages on its own schedule, and Redmine does not resend them. A bounce, meaning a permanent rejection such as an unknown recipient, comes back to the envelope sender, which is the address the MTA uses for return mail. Decide who receives those bounces, usually a monitored administrator mailbox, and make sure the envelope sender is a real, reachable address. Note that a bounce about a user who has left the organization is a directory cleanup task, not a Redmine fault. Confirm your MTA's retry intervals and bounce routing in its own documentation.
Where are the MTA and Redmine logs I need when mail fails?
Look at two places, and match them by time and recipient. The MTA keeps its own delivery log, and on Debian exim usually writes to files under /var/log/exim4/, with mainlog recording each delivery attempt and rejectlog recording refused messages. Redmine logs to its production log under the application's log/ directory, and background job output goes to the job runner's log, which depends on how you run it. Confirm the file names and rotation settings on your own host, since packages and containers differ.
What changes in mail delivery after a Redmine upgrade?
The Redmine upgrade itself usually leaves the sendmail path alone, but it can change the configuration file and the mail code that calls the MTA. Compare your configuration.yml email section with the new release's example before restarting, because the delivery method keys and their structure can change between versions. The upgrade guide asks you to copy configuration to the new installation and run database migrations, so repeat your test message once the new instance is running. Check the Redmine upgrade guide for the steps that apply to your version.
Does an MTA package update break Redmine mail delivery?
It can, because a package update may change the sendmail binary path, the default options, or the way the MTA handles the -i argument and sender headers. Read the package changelog before applying it, and keep the current configuration files in version control or a backup. Test in a staging environment first where possible. Confirm with your distribution's release notes which settings changed, since the answer depends on the package version you run.
How do I test Redmine mail after an upgrade or MTA change?
Send a test message from Redmine and confirm it reaches an external mailbox, not only an internal one. Then check the MTA log for the message ID, confirm the envelope sender and headers, and verify that the queue is empty. Trigger a real notification too, such as a status change on a test issue, because the test email path does not always exercise the same code. Keep a short checklist with these steps so the test is repeatable after each change.
Can my own team handle queue monitoring and upgrade testing?
Yes, if you have someone who administers the mail host and the Redmine server, and who can read both logs. The work is mostly recurring: alerts, log review, and a test after each Redmine or MTA update. A partner is more useful when the setup is new, the relay is shared with other systems, or your team lacks mail administration experience. Ask any provider to put monitoring, runbook and test steps in the written scope so the handover is clear.
Limits to confirm in your environment
A local MTA changes which settings matter and where failures show up. The items below are the points where a Redmine sendmail setup most often differs from the documentation or from the host it runs on, so confirm each one on the actual server before relying on it.
Configuration keys for your version
The mail delivery method and its options live in config/configuration.yml, and the key names and accepted values can change between Redmine releases. Confirm the exact structure in the configuration template shipped with your installed version, not in notes written for an older release. Check the delivery method name, the sendmail location and any arguments the version accepts, then send a test message from the Redmine administration pages and read the production log to confirm the path taken.
Distribution MTA behavior
The sendmail command on your host is usually a compatibility wrapper for the MTA the distribution installed, such as exim, Postfix or sendmail itself. Each one reads flags differently, and some arguments that work on one platform are rejected or ignored on another. Confirm which binary sendmail resolves to, which version it is, and whether the arguments Redmine passes produce the expected envelope and headers. Record the result so a future package update does not silently change the behavior.
Relay permission on the corporate server
Your local MTA can only hand mail to the corporate server if that server accepts relay from the host's address. Ask the mail team whether the Redmine host's IP or subnet is allowed to relay, whether this requires authentication or a dedicated connector, and whether a sender domain or envelope address must match a registered domain. A relay that works for test messages may still reject notifications sent to external recipients, so test both internal and external addresses.
Container networking and DNS
If Redmine runs in Docker or another container runtime, the container may not have a working MTA, may not reach the relay host on the expected port, or may see a different source address than the host does. Confirm which binary the container image provides, whether the relay hostname resolves from inside the container, and whether firewall rules allow outbound traffic from the container network. Mail accepted by the local MTA but queued without delivery usually points to a network path problem.
Background job user permissions
Notifications are often sent from background jobs rather than the web process, and those jobs may run under a different service account. That account needs permission to execute the sendmail binary and to write to the local mail queue, and it must not depend on a login shell environment variable that exists only in interactive sessions. Confirm the account that runs the job, test sendmail as that account, and check that a scheduled run produces the same delivery result as a manual one.
Queue visibility and ownership
Once the local MTA accepts a message, Redmine has no further view of its delivery, so queue monitoring becomes the team's responsibility. Identify who can inspect the mail queue, how deferred messages are retried, and where bounce notices are sent. Ask whether the mail team wants to receive these alerts, and confirm that queue backlogs appear in the same monitoring used for other production services.
Questions teams ask before setting up a sendmail relay for Redmine
Is a sendmail relay harder to run than direct SMTP for Redmine?
Usually yes, because it adds a local mail transfer agent that someone must install, configure, monitor and keep patched. Direct SMTP only needs Redmine to reach one authenticated submission server. A local relay moves that responsibility onto the host: the MTA needs its own queue settings, logs, retry behaviour and a route to the corporate mail server. The extra work is mostly one-time setup, but the ongoing burden is real: someone must notice when the queue backs up, when a certificate expires on the relay, or when a Debian package update changes how the MTA reads its arguments. Ask whether your team already runs an MTA for other servers. If it does, the added cost is small. If it does not, the learning curve is the main driver.
What decides how much effort the relay setup takes?
The main drivers are the state of your existing mail infrastructure, how much your mail team must approve, and how many test cases you need to cover. Effort rises when the corporate relay requires new IP allowlisting, a new sender identity, or changes to SPF and DKIM records for the domain Redmine sends from. It rises again when mail must be checked for delivery to several recipient domains, or when bounces and auto-replies must be handled. Effort falls when a mail administrator already has a documented relay for other internal applications and can add the Redmine host to it. Ask any provider to split its quote into configuration, approval and coordination, and testing, so you can see where the time goes.
Can our internal team set up a sendmail relay for Redmine alone?
Often yes, if one or two engineers already know Linux mail services and can work with the corporate mail team. The configuration itself is short: Redmine's configuration.yml points its delivery method at sendmail, and the MTA hands messages to the corporate relay. The harder parts are outside Redmine. You need a mail administrator to approve the relay path, a working understanding of how the MTA queues and retries messages, and someone who can read bounce logs. Teams without that experience usually take longer, and mistakes often appear only as mail that silently never arrives. A partner can carry the configuration and testing, while your mail team keeps ownership of the relay policy.
How long does a sendmail relay setup take with existing mail infrastructure?
The duration depends mostly on how quickly your mail team can approve and document the relay, not on Redmine. If the corporate mail server already accepts relayed mail from your application network, the change is a configuration and test exercise. If the relay needs a new allowlist entry, a service account, a change window or a DNS update, the schedule is set by those approvals. Ask your mail team how long their change process takes for a new relay client, and how often they update allowlists. Those two answers will shape your timeline more than the Redmine configuration will. No single duration applies to every organization, so confirm the figure against your own change calendar.
What do we need to provide before a sendmail relay engagement starts?
You will need access and information from three groups. First, mail administrators must confirm the corporate relay hostname, the networks allowed to relay, and whether authentication is required. Second, DNS owners must be ready to review SPF and DKIM records for the sending domain, and to publish changes if the relay requires them. Third, you should provide test mailboxes inside and outside your organization, so delivery can be checked for internal and external recipients. The Redmine host also needs a sudo-capable account for installing and configuring the MTA, plus access to logs. Agree on who approves each change in writing before work begins.
What testing should a sendmail relay go through before go-live?
Testing should prove that Redmine can send, that the relay accepts the message, and that the message reaches real inboxes with correct headers. Start with a test message from the Redmine console, then trigger a notification from a real issue update. Check the MTA queue and logs for each message, and confirm that failed deliveries produce a visible error rather than disappearing. Send to at least one internal and one external mailbox, and inspect the headers for the sender domain and authentication results. Retest after any change to the MTA package or relay settings. Testing effort rises with the number of recipient domains and the number of notification types your users rely on.
When is direct SMTP simpler than a sendmail relay for Redmine?
Direct SMTP is simpler when your corporate mail system offers an authenticated submission endpoint that accepts mail from your Redmine network, and your team does not already operate an MTA. In that case Redmine connects to one hostname, authenticates, and sends. There is no queue on the Redmine host to monitor. Choose a local relay when policy requires an internal MTA, when several applications must share one outbound path, or when you need local queuing so that a brief mail outage does not drop notifications. Whichever route you pick, confirm the choice with your mail team, because the approval path often decides the outcome.
What security checks apply when Redmine relays mail through a local MTA?
The main checks cover who can send mail through the relay, how the relay authenticates to the corporate server, and what the logs reveal. Restrict relaying to the Redmine host's address, and avoid an open relay that accepts mail from any network. Confirm that the connection from the MTA to the corporate server uses TLS where the server supports it, and that any credentials are stored with restricted file permissions. Keep MTA logs for an agreed period, and make sure they do not capture message bodies you are not permitted to retain. Ask your security team to review the relay configuration as part of your normal change process.
How DeployOpen scopes Redmine mail delivery work
DeployOpen deploys self-hosted Redmine inside your own infrastructure, and the mail path is scoped in writing before any configuration starts. The scope names the Redmine host, the local MTA that will accept mail from Redmine (sendmail or a compatible interface on the same server), the corporate mail server or relay that will carry outbound messages, and the sender address Redmine will use. It also records who owns each hop, which network paths must be opened between the Redmine host and the relay, and whether any mail is expected to come back in through email-based issue creation. Writing these decisions down early prevents the common situation where Redmine appears to send mail while the relay silently drops it, or where a local MTA accepts messages that nobody downstream is allowed to forward.
Once the scope is agreed, the work covers the Redmine side of config/configuration.yml, the delivery method and sendmail settings, the local MTA configuration including relaying to the corporate server, and the specific Debian exim behavior that requires the correct sendmail argument handling for Redmine to pass messages correctly. DeployOpen then tests delivery end to end, checks queueing and retry behavior on the local MTA, confirms that messages reach the intended mailboxes with the expected headers, and verifies failure paths such as a relay that is briefly unavailable. Your team should confirm the relay's policy on sender addresses, required authentication or IP allow lists, and any sending limits before the scope is signed, because those settings sit outside Redmine and are often owned by a different team.
Most DeployOpen engagements are fixed-scope, so the deliverables, the test cases and the handover documentation are agreed in writing before work starts. The documentation is written for your operations team: where the settings live, how to read the MTA queue, which logs to check when notifications stop, and what to change if the corporate relay is replaced. Ongoing support, upgrades and continuous testing are available as a retainer, which suits teams that expect Redmine upgrades or mail infrastructure changes to touch this path again. Ask for the written scope to list each component, its owner and its test evidence, so the handover can be checked against it.

