E-MailRelay
|
A Filter class that passes the body of a message file to a remote process over the network and optionally stores the response back into the file. More...
#include <gspamfilter.h>
Public Member Functions | |
SpamFilter (GNet::ExceptionSink, FileStore &, const std::string &server_location, bool read_only, bool always_pass, unsigned int connection_timeout, unsigned int response_timeout) | |
Constructor. More... | |
~SpamFilter () override | |
Destructor. More... | |
SpamFilter (const SpamFilter &)=delete | |
SpamFilter (SpamFilter &&)=delete | |
void | operator= (const SpamFilter &)=delete |
void | operator= (SpamFilter &&)=delete |
![]() | |
virtual | ~Filter ()=default |
Destructor. | |
virtual std::string | id () const =0 |
Returns the id passed to the derived-class constructor. More... | |
virtual bool | simple () const =0 |
Returns true if the concrete filter class is one that can never change the file (eg. More... | |
virtual void | start (const MessageId &)=0 |
Starts the filter for the given message. More... | |
virtual G::Slot::Signal< int > & | doneSignal ()=0 |
Returns a signal which is raised once start() has completed or failed. More... | |
virtual void | cancel ()=0 |
Aborts any incomplete filtering. | |
virtual bool | abandoned () const =0 |
Returns true if the filter result was 'abandoned'. | |
virtual std::string | response () const =0 |
Returns a non-empty response string iff the filter failed, or an empty response if successful or abandoned. | |
virtual std::string | reason () const =0 |
Returns a non-empty reason string iff the filter failed, or an empty reason if successful or abandoned. | |
virtual bool | special () const =0 |
Returns true if the filter indicated special handling is required. | |
std::string | str (bool server_side) const |
Returns a diagnostic string for logging. More... | |
Additional Inherited Members | |
![]() | |
enum class | Result { f_ok = 0 , f_abandon = 1 , f_fail = 2 } |
A Filter class that passes the body of a message file to a remote process over the network and optionally stores the response back into the file.
It parses the response's "Spam:" header to determine the overall pass/fail result, or it can optionally always pass.
Definition at line 41 of file gspamfilter.h.
GSmtp::SpamFilter::SpamFilter | ( | GNet::ExceptionSink | es, |
FileStore & | file_store, | ||
const std::string & | server_location, | ||
bool | read_only, | ||
bool | always_pass, | ||
unsigned int | connection_timeout, | ||
unsigned int | response_timeout | ||
) |
Constructor.
Definition at line 26 of file gspamfilter.cpp.
|
override |
Destructor.
Definition at line 41 of file gspamfilter.cpp.