|
Revision 19beb87b09eead3ac023e509e8df964ec8d55566, 2.1 KB
(checked in by Antti-Juhani Kaijanaho <antti-juhani@…>, 2 years ago)
|
|
Implement #16: Posting by email is now possible (requires server setup)
User-visible points:
– a user may send email to group@…, and this email
will be processed as a posting to that group
– crossposting is not supported
– if the user is not allowed to post to the group, or some other
problem ensues, a bounce message is generated by the server MTA
Operator-visible points:
– There is a new configuration option (unix-socket) which names the
Unix domain socket to be used for injecting emails as posts.
– The operator should arrange for email sent to group@…
to be delivered to the new (alue-)inject-email command, with the
following environment variables defined:
LOCAL=group (the local part)
SENDER= (the envelope sender address)
– The command is built as inject-email but installed as
alue-inject-email.
Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@…>
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | #ifndef GUARD_LOCAL_CONNECTION_HH |
|---|
| 21 | #define GUARD_LOCAL_CONNECTION_HH |
|---|
| 22 | |
|---|
| 23 | #include "../server.hh" |
|---|
| 24 | |
|---|
| 25 | #include <boost/asio/local/stream_protocol.hpp> |
|---|
| 26 | #include <boost/system/system_error.hpp> |
|---|
| 27 | |
|---|
| 28 | namespace local |
|---|
| 29 | { |
|---|
| 30 | class connection : private boost::noncopyable |
|---|
| 31 | { |
|---|
| 32 | typedef boost::asio::local::stream_protocol sp; |
|---|
| 33 | |
|---|
| 34 | server::conn_cb cb; |
|---|
| 35 | boost::asio::io_service &ios; |
|---|
| 36 | sp::socket peer; |
|---|
| 37 | sp::endpoint ep; |
|---|
| 38 | |
|---|
| 39 | std::string loghead; |
|---|
| 40 | |
|---|
| 41 | void accept(sp::acceptor *acc, |
|---|
| 42 | boost::system::error_code ec); |
|---|
| 43 | |
|---|
| 44 | void read_complete(boost::asio::streambuf *sbp, |
|---|
| 45 | boost::system::error_code ec, |
|---|
| 46 | std::size_t); |
|---|
| 47 | |
|---|
| 48 | void abort(boost::system::error_code ec); |
|---|
| 49 | |
|---|
| 50 | static void end(connection *self); |
|---|
| 51 | |
|---|
| 52 | static void done(connection *self, |
|---|
| 53 | boost::asio::streambuf *sbp, |
|---|
| 54 | boost::system::error_code , |
|---|
| 55 | std::size_t); |
|---|
| 56 | |
|---|
| 57 | connection(boost::asio::local::stream_protocol::acceptor *acc, |
|---|
| 58 | server::conn_cb); |
|---|
| 59 | public: |
|---|
| 60 | static void start(boost::asio::io_service &, server::conn_cb); |
|---|
| 61 | }; |
|---|
| 62 | } |
|---|
| 63 | |
|---|
| 64 | #endif |
|---|