56 const std::string & remote ,
const G::StringMap & info_commands ,
57 const G::StringMap & config_commands ,
bool with_terminate ) ;
66 void notify(
const std::string & s0 ,
const std::string & s1 ,
67 const std::string & s2 ,
const std::string & s4 ) ;
72 void onSendComplete()
override ;
73 bool onReceive(
const char * , std::size_t , std::size_t , std::size_t ,
char )
override ;
74 void onDelete(
const std::string & )
override ;
75 void onSecure(
const std::string & ,
const std::string & ,
const std::string & )
override ;
84 void clientDone(
const std::string & ) ;
85 static bool is(
const std::string & ,
const std::string & ) ;
86 static std::pair<bool,std::string> find(
const std::string & line ,
const G::StringMap & map ) ;
87 static std::string argument(
const std::string & ) ;
92 std::shared_ptr<MessageStore::Iterator> spooled() ;
93 std::shared_ptr<MessageStore::Iterator> failures() ;
94 void sendList( std::shared_ptr<MessageStore::Iterator> ) ;
95 void sendLine( std::string ,
bool =
true ) ;
99 std::string eol()
const ;
101 void send_(
const std::string & ) ;
106 std::string m_prompt ;
108 std::string m_remote_address ;
113 bool m_with_terminate ;
126 const G::StringArray & interfaces ,
unsigned int port ,
bool allow_remote ,
127 const std::string & remote_address ,
unsigned int connection_timeout ,
129 bool with_terminate ) ;
164 void notify(
const std::string & s0 ,
const std::string & s1 ,
165 const std::string & s2 ,
const std::string & s3 ) ;
180 void onForwardTimeout() ;
189 bool m_allow_remote ;
190 std::string m_remote_address ;
191 unsigned int m_connection_timeout ;
194 bool m_with_terminate ;
An interface used by GAuth::SaslClient to obtain a client id and its authentication secret.
A potential ExceptionSink that is realised by bind()ing an exception source pointer.
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
A server that listens on more than one address using a facade pattern to multiple GNet::Server instan...
A structure that GNet::Server uses to configure its ServerPeer objects.
A structure used in GNet::Server::newPeer().
An abstract base class for the GNet::Server's connection to a remote client.
A timer class template in which the timeout is delivered to the specified method.
A derivation of ServerPeer for the administration interface.
bool notifying() const
Returns true if the remote user has asked for notifications.
void notify(const std::string &s0, const std::string &s1, const std::string &s2, const std::string &s4)
Called when something happens which the admin user might be interested in.
~AdminServerPeer() override
Destructor.
AdminServerPeer(GNet::ExceptionSinkUnbound, const GNet::ServerPeerInfo &, AdminServer &, const std::string &remote, const G::StringMap &info_commands, const G::StringMap &config_commands, bool with_terminate)
Constructor.
A server class which implements the emailrelay administration interface.
void report() const
Generates helpful diagnostics.
MessageStore & store()
Returns a reference to the message store, as passed in to the constructor.
AdminServer(GNet::ExceptionSink, MessageStore &store, FilterFactory &ff, G::Slot::Signal< const std::string & > &forward_request, const GNet::ServerPeerConfig &server_peer_config, const GNet::ServerConfig &server_config, const GSmtp::Client::Config &client_config, const GAuth::SaslClientSecrets &client_secrets, const G::StringArray &interfaces, unsigned int port, bool allow_remote, const std::string &remote_address, unsigned int connection_timeout, const G::StringMap &info_commands, const G::StringMap &config_commands, bool with_terminate)
Constructor.
void forward()
Called to trigger asynchronous forwarding.
FilterFactory & ff()
Returns a reference to the filter factory, as passed in to the constructor.
~AdminServer() override
Destructor.
GSmtp::Client::Config clientConfig() const
Returns the client configuration.
void notify(const std::string &s0, const std::string &s1, const std::string &s2, const std::string &s3)
Called when something happens which the admin users might be interested in.
unsigned int connectionTimeout() const
Returns the connection timeout, as passed in to the constructor.
const GAuth::SaslClientSecrets & clientSecrets() const
Returns a reference to the client secrets object, as passed in to the constructor.
std::unique_ptr< GNet::ServerPeer > newPeer(GNet::ExceptionSinkUnbound, GNet::ServerPeerInfo, GNet::MultiServer::ServerInfo) override
Override from GNet::MultiServer.
bool notifying() const
Returns true if the remote user has asked for notifications.
A factory interface for GSmtp::Filter message processors.
A class which allows SMTP messages to be stored and retrieved.
SMTP and message-store classes.
std::vector< std::string > StringArray
A std::vector of std::strings.
std::map< std::string, std::string > StringMap
A std::map of std::strings.
A structure used in GNet::MultiServer::newPeer().
A configuration structure for GNet::Server.
A structure containing GSmtp::Client configuration parameters.