On 3/12/25 16:55, Jean-Marc Annonier wrote:
What I am worried about is my older management systems (i.e. vSphere) that
only support basic authentication with SMTP.
I wonder if there's a command line tool that can "speak" this Graph API,
whilst reading an email from `stdin`.
You should be able to configure that in OpenSMTPD as a delivery agent.
I've got a bit of a hacky solution for delivering email via a poor man's
UUCP (using SCP), a shell script takes the email via `stdin`, passes it
through `gnupg2` and stashes the encrypted file in a spool directory. If
my home server is up, it'll attempt to `scp` the file to a spool
directory on the mail server, otherwise it just keeps it cloud-side.
My home server (Postfix/AlpineLinux) then periodically polls this
directory, downloading, deleting, then decrypting the emails and
re-injecting them.
I'll dig up the configuration settings I used for telling `opensmtpd` to
pass to the script, but from there, it's basically just passing the
email envelope to Microsoft's Graph API… might be possible with a bit of
`curl` magic, or maybe more sophistication is needed… but the pieces of
the puzzle should be out there.
--
Stuart Longland (aka Redhatter, VK4MSL)
I haven't lost my mind...
...it's backed up on a tape somewhere.