Package: msmtp-mta
Severity: normal

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.

-- System Information:
Debian Release: 13.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 6.18.21-gnu (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=eu_ES.UTF-8, LC_CTYPE=eu_ES.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to eu_ES.UTF-8), LANGUAGE=eu_ES:eu:es_ES:es:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages msmtp-mta depends on:
ii  adduser              3.152
ii  init-system-helpers  1.69~deb13u1
ii  libc6                2.41-12+deb13u2
ii  libsecret-1-0        0.21.7-1
pn  msmtp                <none>

Versions of packages msmtp-mta recommends:
ii  libsecret-tools  0.21.7-1

msmtp-mta suggests no packages.

Reply via email to