E-MailRelay
|
A VerifierFactory implementation. More...
#include <gverifierfactory.h>
Public Member Functions | |
VerifierFactory () | |
Constructor. | |
![]() | |
virtual std::unique_ptr< Verifier > | newVerifier (GNet::EventState, const Verifier::Config &config, const Spec &spec)=0 |
Returns a Verifier on the heap. More... | |
virtual | ~VerifierFactoryBase ()=default |
Destructor. | |
Static Public Member Functions | |
static Spec | parse (std::string_view spec, const G::Path &base_dir={}, const G::Path &app_dir={}, G::StringArray *warnings_p=nullptr) |
Parses a verifier specification string like "/usr/bin/foo" or "net:127.0.0.1:99" or "net:/run/spamd.s", returning the type and value in a Spec tuple, eg. More... | |
Protected Member Functions | |
std::unique_ptr< GSmtp::Verifier > | newVerifier (GNet::EventState, const GSmtp::Verifier::Config &config, const GSmtp::VerifierFactoryBase::Spec &spec) override |
Returns a Verifier on the heap. More... | |
A VerifierFactory implementation.
Definition at line 42 of file gverifierfactory.h.
|
overrideprotectedvirtual |
Returns a Verifier on the heap.
Throws if an invalid or unsupported specification.
Implements GSmtp::VerifierFactoryBase.
Definition at line 76 of file gverifierfactory.cpp.
|
static |
Parses a verifier specification string like "/usr/bin/foo" or "net:127.0.0.1:99" or "net:/run/spamd.s", returning the type and value in a Spec tuple, eg.
("file","/usr/bin/foo") or ("net","127.0.0.1:99").
Any relative file paths are made absolute using the given base directory, if given. (This is normally from G::Process::cwd() called at startup).
Any "@app" sub-strings in file paths are substituted with the given application directory, if given.
Returns 'first' empty if a fatal parsing error, with the reason in 'second'.
Returns warnings by reference for non-fatal errors, such as missing files.
Definition at line 36 of file gverifierfactory.cpp.