0

Is there any way to install the sendmail client, only, without installing the sendmail MTA at all?

What I mean by this is the sendmail -t command that is frequently used by processes such as cron to submit outgoing email. Most such programs expect some kind of sendmail API compatible program called sendmail to which they can send their outgoing mail.

Currently on my mail server, I don't have any sendmail binary, and as such I see things like this in cron:

(CRON) info (No MTA installed, discarding output)

Actually, I do have an MTA installed - one that I wrote myself (so not Postfix, exim, etc.) - but I don't have any sendmail program written to interface to that. I'm wondering if it's possible to install and use the sendmail program in isolation to just receive anything given to it and then open an SMTP connection localhost:25 and feed that into the MTA using an SMTP transaction. This way, I don't need to write my own sendmail program that has the same interface to do that.

Is this possible? I would assume something like this already exists, so I don't want to reinvent the wheel. Default installation of sendmail also installs the sendmail MTA, which I don't want; I don't want to install any MTA package that would clobber or interfere with the real MTA already on the system.

In the research I've done, there seems to be very little separation between the two. All the tutorials seem to assume you're using one of the "standard" MTAs. If the answer is "no", then equivalently is there documentation on the full sendmail binary API that needs to be implemented for program compatibility?

1 Answer 1

1

Option 1: Install (simple) "sendmail look alike"
As I understand you can use ssmtp (or msmtp) program/package to get "sendmail look alike" capable to pass messages to SMTP server (e.g. localhost:25).

https://wiki.archlinux.org/title/SSMTP
https://packages.debian.org/source/stable/ssmtp

Option 2: Use sendmail without starting sendmail daemon
Install sendmail package but block starting sendmail daemon. Modern sendmail installations by default pass messages submitted by sendmail command via SMTP to localhost:25.
[It has been introduced to avoid security risks of installing sendmail as set root uid]

3
  • Thanks, looks like msmtp is the currently maintained alternative, and importantly it is sendmail interface compatible so it can just be symlinked. I guess it seems like sendmail itself can't be use to provide the sendmail interface in a non-invasive way, ironically... Feb 17 at 1:09
  • ....or mutt, or nullmailer, or about 20 lines of bash script.
    – symcbean
    Feb 17 at 1:16
  • @InterLinked You can use sendmail too. Install it but do not start sendmail daemon (block starting sendmail daemon). Modern sendmail by default passes messages submitted by sendmail command to SMTP daemon localhost:25.
    – AnFi
    Feb 17 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .