public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Simple SMTP to cmd-line MTA relay?
Date: Fri, 19 Jan 2018 19:48:00 +0000 (UTC)	[thread overview]
Message-ID: <p3ti1g$ol7$1@blaine.gmane.org> (raw)
In-Reply-To: f00d3f26-7361-a3e5-c0f4-6c562a1e3fab@spamtrap.tnetconsulting.net

On 2018-01-19, Grant Taylor <gtaylor@tnetconsulting.net> wrote:
> On 01/19/2018 11:38 AM, Grant Edwards wrote:
>
>> I have a /usr/bin/sendmail emulator that transfers mail to an MTA
>> that will then worry about delivery.  I need an SMTP server that
>> will relay incoming mail by using that existing command-line
>> utility.
> …
>> I need something that accepts mail via SMTP (with SSL and AUTH
>> support), and then relays each received message by invoking a
>> command line utilty that has the same API as /usr/bin/sendmail.
>
> You want (what Sendmail calls) a custom mailer.

Yep, and it looks like the Postfix equivalent is a custom pipe
transport.  Once you know what phrases to google for, it's a lot
easier. :)

>> I would very much prefer that there is no queueing: the smtp server
>> should not acknowlege acceptance of the message until the smtp
>> server has invoked /usr/bin/sendmail and it has returned success.
>
> That's possible.  But it does add some additional constraints.  It
> also means that traditional MTAs likely won't operate the way that
> you want this to.

I could live with queueing/retrying as long as the eventual failures
generated messages that are sent back to the sender.  Those failure
messages would need to be sent via a normal SMTP smarthost/relayhost
(with AUTH) and not via the custom mailer.

> Have you tried putting ssltunnel (or the likes) in front of your
> existing SMTP server to see if it (they) can handle STARTTLS for
> you?  - Is it possible to augment your existing solution without
> needing to replace it?

Yes, I've been thinking about that.  I think I'll try that first -- if
my understanding of the failure mode is correct, it should work.

> Also, this sounds use case specific enough that I would consider
> going back to the person maintaining the scrip SMTP server that
> you're currently using and try to fix it.

I wrote the server I'm using now, but it uses somebody else's snmpd
module, and that's where the SSL breakage is.  I've filed a bug, and
I've been doing some reading toward attempting a fix, but it looks
like it might be a bit hairy: it involves Python's asyncore/asynchat
framework (and process pools).  What's missing is handling for ssl
"want read" and "want write" exceptions.

-- 
Grant Edwards               grant.b.edwards        Yow! FEELINGS are cascading
                                  at               over me!!!
                              gmail.com            



  reply	other threads:[~2018-01-19 19:50 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 18:03 [gentoo-user] Simple SMTP to cmd-line MTA relay? Grant Edwards
2018-01-19 18:19 ` Ralph Seichter
2018-01-19 18:31   ` [gentoo-user] " Grant Edwards
2018-01-19 18:51     ` Grant Taylor
2018-01-19 18:59       ` Grant Edwards
2018-01-19 19:10         ` Grant Taylor
2018-01-19 18:28 ` [gentoo-user] " Grant Taylor
2018-01-19 18:38   ` [gentoo-user] " Grant Edwards
2018-01-19 18:57     ` Grant Taylor
2018-01-19 19:48       ` Grant Edwards [this message]
2018-01-19 20:14         ` Grant Taylor
2018-01-19 20:29           ` Grant Edwards
2018-01-19 20:36             ` Grant Taylor
2018-01-19 18:46 ` Ian Zimmerman
2018-01-19 18:49   ` Grant Edwards
2018-01-19 19:43     ` Ian Zimmerman
2018-01-19 19:48       ` Alan McKinnon
2018-01-19 20:01         ` Grant Edwards
2018-01-19 20:05           ` Alan McKinnon
2018-01-19 20:04         ` Grant Taylor
2018-01-19 20:16           ` Grant Edwards
2018-01-19 19:54       ` Grant Edwards
2018-01-19 19:56         ` Alan McKinnon
2018-01-19 20:03           ` Grant Edwards
2018-01-19 20:06             ` Alan McKinnon
2018-01-19 20:19               ` Grant Edwards
2018-01-19 22:24                 ` Ian Zimmerman
2018-01-19 22:31                   ` Grant Taylor
2018-01-19 23:04                   ` Grant Edwards
2018-01-19 23:21                     ` Grant Taylor
2018-01-19 23:58                       ` Grant Edwards
2018-01-20  0:30                         ` Grant Taylor
2018-01-20  0:39                           ` Grant Taylor
2018-01-20  0:53                           ` Grant Edwards
2018-01-20  0:44                         ` Ian Zimmerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='p3ti1g$ol7$1@blaine.gmane.org' \
    --to=grant.b.edwards@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox