#1132909 msmtp-mta: Make msmtp-mta co-installable with dma package

Package:
msmtp-mta
Source:
msmtp-mta
Description:
light SMTP client with support for server profiles - the regular MTA
Submitter:
martintxo
Date:
2026-04-07 09:33:03 UTC
Severity:
normal
#1132909#5
Date:
2026-04-07 09:30:13 UTC
From:
To:
Dear Maintainer,

I think that msmtp-mta and dma packages need to be co-installable. That is the rationale:
- dma is a simple mail "server" that does not have a daemon, but works well for send the
   mails to local users, and to remote ones by SMTP.
- Dma works well byself, without a daemon. But in some cases a daemon is neded to talk
   with some programs that isn't working without the daemon (in my case it is monit).
- msmtp-mta is providing the msmtpd daemon, that is capable to talk with msmtp but TOO
   with any other mail "server" that does not have a daemon. For this msmtpd use the --command option.
- But msmtp-mta is not coinstallable with dma. I try it in Debian Stable and this is the result:

$ sudo apt install msmtp-mta
Installing:
  msmtp-mta

Installing dependencies:
  gsasl-common  libgsasl18  libgssglue1  libntlm0  msmtp

REMOVING:
  dma

I think it is because msmtp-mta ships the sendmail command, that is too in the dma package.
If it is the cause, this bug report may be the right one, and mine a duplicate:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969198

So, maybe we need to change the msmtp-mta package with the alternatives mechanism,
made another package that be coinstallable with mda, or another solution...

For complete this report, I made it and is working. This is the howto:  I now have two,
msmtp-mta and dma packages conistalled and running, and msmtpd is talking with dma,
and sending the monit mails from it.

I need it for have all mails be mailed by smtp AND saved on a local mailbox for security.
For this I'm using the /etc/aliases mechanism that dma can use for send to local mailboxes
(and no msmtp)...

For this to happend, I made the following changes:
- Download the msmtp-mta package, uncompress, remove all the "sendmail" "newaliases" related
   files, and remake the package with another name. Install it.
- Change the msmtp-mta systemd unit to run with mda. Now my unit is as follow:
 [Unit]
 Description=msmtp daemon
 Documentation=man:msmtpd(1)
 [Service]
 User=root
 Group=root
 #User and group maybe is'nt needed, but I was madeing some probes with diferent users...
 Type=simple
 ExecStart=/usr/bin/msmtpd --interface=127.0.0.1 --port=25 --log=syslog --command='/usr/sbin/dma -f %%F --'
 Restart=always
 RestartSec=60
 [Install]
 WantedBy=multi-user.target

The inspiration for the --command option is from:
https://github.com/computator/smtp-proxy-container/blob/main/entrypoint.sh

Thats all. If you consider that this is a corner user case, you can close this bugreport without problem.
Many thanks for your work on Debian. Greetings. Martintxo.