Communication via STDIN/STDOUT #301
-
Hello, I'm prototyping a content filter that is intended to be initiated via Postfix's Basically what I'm asking is this: In its current form, is there any way to use STDIN/STDOUT with filter.py
The code above is an extremely basic example of how this can be accomplished, but it's ugly, clunky and likely error prone with all but the most basic input. Its only purpose is to demonstrate the use of an intermediary socket. example input
master.cf
Note: I've disabled the reinjection path since the filter in the first example doesn't actually pass the message content back to the server; I didn't have a need for this during testing but at some point the filter would handle passing the message back. The reinjection path configuration is included above, for sake of completeness. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
The biggest challenge is that aiosmtpd directly couples to In there, there are a HUGE number of hairy things So I don't think aiosmtpd can easily support native STDIN/STDOUT. |
Beta Was this translation helpful? Give feedback.
The biggest challenge is that aiosmtpd directly couples to
asyncio
's Transport feature.In there, there are a HUGE number of hairy things
asyncio
has to do to make TCP streams async.So I don't think aiosmtpd can easily support native STDIN/STDOUT.