|
|
|
@ -8,9 +8,8 @@ |
|
|
|
|
using namespace std; |
|
|
|
|
using namespace util; |
|
|
|
|
|
|
|
|
|
//config|smtpd-version|6.6.1
|
|
|
|
|
//config|smtp-session-timeout|300
|
|
|
|
|
//config|subsystem|smtp-in
|
|
|
|
|
// OpenSMTPD filter protocol documentation:
|
|
|
|
|
// https://man7.org/linux/man-pages/man7/smtpd-filters.7.html
|
|
|
|
|
|
|
|
|
|
const bool debug = true; |
|
|
|
|
|
|
|
|
@ -24,10 +23,10 @@ namespace protocol { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
max_pattern_length = length; |
|
|
|
|
debug && cerr << "Maximum handler pattern length is " << length << endl; |
|
|
|
|
|
|
|
|
|
this->handlers = handlers; |
|
|
|
|
max_pattern_length = length; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void protocol_t::send(const token::list_t& tokens) { |
|
|
|
@ -59,6 +58,10 @@ namespace protocol { |
|
|
|
|
send_result(session_key, {"proceed"}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void protocol_t::junk(const session_key_t& session_key) { |
|
|
|
|
send_result(session_key, {"junk"}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void protocol_t::fail(const session_key_t& session_key) { |
|
|
|
|
send_result(session_key, {"disconnect", "451 Aborted"}); |
|
|
|
|
} |
|
|
|
|