E-MailRelay
|
A server class which implements the emailrelay administration interface. More...
#include <gadminserver.h>
Public Member Functions | |
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. More... | |
~AdminServer () override | |
Destructor. More... | |
void | report () const |
Generates helpful diagnostics. More... | |
MessageStore & | store () |
Returns a reference to the message store, as passed in to the constructor. More... | |
FilterFactory & | ff () |
Returns a reference to the filter factory, as passed in to the constructor. More... | |
const GAuth::SaslClientSecrets & | clientSecrets () const |
Returns a reference to the client secrets object, as passed in to the constructor. More... | |
GSmtp::Client::Config | clientConfig () const |
Returns the client configuration. More... | |
unsigned int | connectionTimeout () const |
Returns the connection timeout, as passed in to the constructor. More... | |
void | forward () |
Called to trigger asynchronous forwarding. More... | |
bool | notifying () const |
Returns true if the remote user has asked for notifications. More... | |
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. More... | |
AdminServer (const AdminServer &)=delete | |
AdminServer (AdminServer &&)=delete | |
void | operator= (const AdminServer &)=delete |
void | operator= (AdminServer &&)=delete |
![]() | |
MultiServer (ExceptionSink listener_exception_sink, const G::StringArray &addresses, unsigned int port, const std::string &server_type, ServerPeerConfig server_peer_config, ServerConfig server_config) | |
Constructor. More... | |
~MultiServer () override | |
Destructor. More... | |
bool | hasPeers () const |
Returns true if peers() is not empty. More... | |
std::vector< std::weak_ptr< ServerPeer > > | peers () |
Returns the list of ServerPeer-derived objects. More... | |
std::unique_ptr< ServerPeer > | doNewPeer (ExceptionSinkUnbound, const ServerPeerInfo &, const ServerInfo &) |
Pseudo-private method used by the pimple class. More... | |
MultiServer (const MultiServer &)=delete | |
MultiServer (MultiServer &&)=delete | |
void | operator= (const MultiServer &)=delete |
void | operator= (MultiServer &&)=delete |
Protected Member Functions | |
std::unique_ptr< GNet::ServerPeer > | newPeer (GNet::ExceptionSinkUnbound, GNet::ServerPeerInfo, GNet::MultiServer::ServerInfo) override |
Override from GNet::MultiServer. More... | |
![]() | |
virtual std::unique_ptr< ServerPeer > | newPeer (ExceptionSinkUnbound, ServerPeerInfo, ServerInfo)=0 |
A factory method which new()s a ServerPeer-derived object. More... | |
void | serverCleanup () |
Should be called from all derived classes' destructors so that peer objects can use their Server objects safely during their own destruction. More... | |
void | serverReport () const |
Writes to the system log a summary of the underlying server objects and their addresses. More... | |
Additional Inherited Members | |
![]() | |
using | AddressList = std::vector< Address > |
![]() | |
static bool | canBind (const AddressList &listening_address_list, bool do_throw) |
Checks that all the specified addresses can be bound. More... | |
A server class which implements the emailrelay administration interface.
Definition at line 119 of file gadminserver.h.
GSmtp::AdminServer::AdminServer | ( | GNet::ExceptionSink | es, |
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.
Definition at line 342 of file gadminserver.cpp.
|
override |
Destructor.
Definition at line 366 of file gadminserver.cpp.
GSmtp::Client::Config GSmtp::AdminServer::clientConfig | ( | ) | const |
Returns the client configuration.
Definition at line 455 of file gadminserver.cpp.
const GAuth::SaslClientSecrets & GSmtp::AdminServer::clientSecrets | ( | ) | const |
Returns a reference to the client secrets object, as passed in to the constructor.
This is a client-side secrets file, used to authenticate ourselves with a remote server.
Definition at line 445 of file gadminserver.cpp.
unsigned int GSmtp::AdminServer::connectionTimeout | ( | ) | const |
Returns the connection timeout, as passed in to the constructor.
Definition at line 450 of file gadminserver.cpp.
GSmtp::FilterFactory & GSmtp::AdminServer::ff | ( | ) |
Returns a reference to the filter factory, as passed in to the constructor.
Definition at line 440 of file gadminserver.cpp.
void GSmtp::AdminServer::forward | ( | ) |
Called to trigger asynchronous forwarding.
Definition at line 394 of file gadminserver.cpp.
|
overrideprotectedvirtual |
Override from GNet::MultiServer.
Implements GNet::MultiServer.
Definition at line 371 of file gadminserver.cpp.
void GSmtp::AdminServer::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.
Definition at line 417 of file gadminserver.cpp.
bool GSmtp::AdminServer::notifying | ( | ) | const |
Returns true if the remote user has asked for notifications.
Definition at line 460 of file gadminserver.cpp.
void GSmtp::AdminServer::report | ( | ) | const |
Generates helpful diagnostics.
Definition at line 412 of file gadminserver.cpp.
GSmtp::MessageStore & GSmtp::AdminServer::store | ( | ) |
Returns a reference to the message store, as passed in to the constructor.
Definition at line 435 of file gadminserver.cpp.