On 01/19/2018 11:31 AM, Grant Edwards wrote:
I want to accept incoming email via SMTP (my computer is an SMTP server).

Okay.

So you don't need to accept mail via /usr/sbin/sendmail (et al).

Or rather, that's what you want email to leave the relay through.

I want to relay each of those messages by invoking a command-line utility that has the same "API" as /usr/bin/sendmail. That utility injects the mail into another machine's MTA.

Okay.

Aside: I don't know that I would consider that to be an API, but I do see why you consider it as such.

In this case, the /usr/bin/sendmail utility transfers the message to a different machine's MTA using mechanisms that are beyond the scope of my question.

Okay.

There is no local delivery. It is a relay that accepts mail via SMTP and transfers it to a different MTA. The usual way to do this is to accept mail as an SMTP server and then relay it to the next MTA by acting as an SMTP client (e.g. via postfix's 'relayhost' setting).

Instead of transfering mail to the next MTA by acting as an SMTP client, I want to transfer it by invoking a command-line utility like sendmail or msmtp.

So it sounds to me like you want a gateway of sorts that speaks SMTP (as a server to clients) on one side and <some custom non-SMTP method> (that acts as a client to other servers) on the other side. Is that accurate?

In Sendmail parlance, what you want is a custom mailer. Said custom mailer would then interface with your custom /usr/bin/sendmail (emulation wrapper).

Finally, configure Sendmail to use said custom mailer as the method to communicate with the smart host.



--
Grant. . . .
unix || die

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to