21#ifndef G_MESSAGE_ID_FILTER_H
22#define G_MESSAGE_ID_FILTER_H
32 class MessageIdFilter ;
42 G_EXCEPTION( Error ,
tx(
"failed to add message id to content file") )
45 Filter::Type ,
const Filter::Config & ,
const std::string & spec ) ;
48 static std::string
process(
const G::Path & ,
const std::string & domain ) ;
53 Result run(
const GStore::MessageId & ,
bool & , GStore::FileStore::State )
override ;
56 static bool isId( std::string_view ) noexcept ;
57 static std::string newId(
const std::string & ) ;
61 std::string m_domain ;
A filter that adds a RFC-822 Message-ID to the message content if it does not have one already.
static std::string process(const G::Path &, const std::string &domain)
Edits a content file by adding a message-id if necessary.
MessageIdFilter(GNet::EventState, GStore::FileStore &, Filter::Type, const Filter::Config &, const std::string &spec)
Constructor.
A GSmtp::Filter base class for filters that run synchronously.
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
A concrete implementation of the MessageStore interface dealing in paired flat files.
A somewhat opaque identifer for a GStore::MessageStore message id.
A Path object represents a file system path.
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().