1 |
On 2018-01-19, Grant Taylor <gtaylor@××××××××××××××.net> wrote: |
2 |
> On 01/19/2018 11:38 AM, Grant Edwards wrote: |
3 |
> |
4 |
>> I have a /usr/bin/sendmail emulator that transfers mail to an MTA |
5 |
>> that will then worry about delivery. I need an SMTP server that |
6 |
>> will relay incoming mail by using that existing command-line |
7 |
>> utility. |
8 |
> … |
9 |
>> I need something that accepts mail via SMTP (with SSL and AUTH |
10 |
>> support), and then relays each received message by invoking a |
11 |
>> command line utilty that has the same API as /usr/bin/sendmail. |
12 |
> |
13 |
> You want (what Sendmail calls) a custom mailer. |
14 |
|
15 |
Yep, and it looks like the Postfix equivalent is a custom pipe |
16 |
transport. Once you know what phrases to google for, it's a lot |
17 |
easier. :) |
18 |
|
19 |
>> I would very much prefer that there is no queueing: the smtp server |
20 |
>> should not acknowlege acceptance of the message until the smtp |
21 |
>> server has invoked /usr/bin/sendmail and it has returned success. |
22 |
> |
23 |
> That's possible. But it does add some additional constraints. It |
24 |
> also means that traditional MTAs likely won't operate the way that |
25 |
> you want this to. |
26 |
|
27 |
I could live with queueing/retrying as long as the eventual failures |
28 |
generated messages that are sent back to the sender. Those failure |
29 |
messages would need to be sent via a normal SMTP smarthost/relayhost |
30 |
(with AUTH) and not via the custom mailer. |
31 |
|
32 |
> Have you tried putting ssltunnel (or the likes) in front of your |
33 |
> existing SMTP server to see if it (they) can handle STARTTLS for |
34 |
> you? - Is it possible to augment your existing solution without |
35 |
> needing to replace it? |
36 |
|
37 |
Yes, I've been thinking about that. I think I'll try that first -- if |
38 |
my understanding of the failure mode is correct, it should work. |
39 |
|
40 |
> Also, this sounds use case specific enough that I would consider |
41 |
> going back to the person maintaining the scrip SMTP server that |
42 |
> you're currently using and try to fix it. |
43 |
|
44 |
I wrote the server I'm using now, but it uses somebody else's snmpd |
45 |
module, and that's where the SSL breakage is. I've filed a bug, and |
46 |
I've been doing some reading toward attempting a fix, but it looks |
47 |
like it might be a bit hairy: it involves Python's asyncore/asynchat |
48 |
framework (and process pools). What's missing is handling for ssl |
49 |
"want read" and "want write" exceptions. |
50 |
|
51 |
-- |
52 |
Grant Edwards grant.b.edwards Yow! FEELINGS are cascading |
53 |
at over me!!! |
54 |
gmail.com |