34 const GAuth::Secrets & client_secrets ,
const std::string & version_number )
42 extra_commands_map.insert( std::make_pair(std::string(
"version"),version_number) ) ;
43 extra_commands_map.insert( std::make_pair(std::string(
"warranty"),
45 extra_commands_map.insert( std::make_pair(std::string(
"credit"),
47 extra_commands_map.insert( std::make_pair(std::string(
"copyright"),
Legal::copyright()) ) ;
49 std::auto_ptr<GSmtp::AdminServer> server ;
66 const std::string & p2 ,
const std::string & p3 )
static AddressList addressList(const Address &)
A trivial convenience fuction that returns the given addresses as a single-element list...
static std::string copyright()
Returns the copyright text.
A server class which implements the emailrelay administration interface.
std::string serverAddress() const
Returns the downstream server's address string.
void notify(const std::string &s0, const std::string &s1, const std::string &s2)
Called when something happens which the admin user might be interested in.
static std::string warranty(const std::string &prefix, const std::string &eol)
Returns the warranty text.
The Address class encapsulates an IP transport address.
void report() const
Generates helpful diagnostics.
bool allowRemoteClients() const
Returns true if allowing remote clients to connect.
G::Strings listeningInterfaces(const std::string &protocol=std::string()) const
Returns the listening interface(s).
static bool enabled()
Returns true if newServer() is fully implemented.
A class which allows SMTP messages (envelope+content) to be stored and retrieved. ...
A simple interface to a store of secrets as used in authentication.
static std::auto_ptr< GSmtp::AdminServer > newServer(const Configuration &, GSmtp::MessageStore &store, const GSmtp::Client::Config &, const GAuth::Secrets &client_secrets, const std::string &version_number)
A factory function for creating a new GSmtp::AdminServer instance on the heap.
static std::string credit(const std::string &prefix, const std::string &eol, const std::string &final)
Returns a credit string.
unsigned int connectionTimeout() const
Returns the client-side connection timeout value.
A structure containing GSmtp::Client configuration parameters.
bool withTerminate() const
Returns true if the admin interface should support the terminate command.
std::string clientInterface() const
Returns the sending interface.
static void report(const GSmtp::AdminServer &server)
Calls report() on the given server.
std::map< std::string, std::string > StringMap
A std::map of std::strings.
unsigned int adminPort() const
Returns the admin port number.
An interface for returning application configuration information.
static void notify(GSmtp::AdminServer &server, const std::string &, const std::string &, const std::string &)
Calls notify() on the given server.