28 Filter::Type filter_type ,
const Filter::Config & filter_config ,
const std::string & spec ) :
31 m_filter_type(filter_type) ,
32 m_filter_config(filter_config) ,
37GSmtp::Filter::Result GFilters::DeliveryFilter::run(
const GStore::MessageId & message_id ,
38 bool & , GStore::FileStore::State )
41 std::string_view spec = m_spec ;
44 if( t() ==
"h" || t() ==
"hardlink" ) config.hardlink = true ;
45 if( t() ==
"n" || t() ==
"no_delete" || t() ==
"nodelete" ) config.no_delete = true ;
46 if( t() ==
"p" || t() ==
"pop" ) config.pop_by_name = true ;
51 bool removed = delivery.
deliver( message_id , m_filter_type == Filter::Type::server ) ;
53 return removed ? Result::abandon : Result::ok ;
DeliveryFilter(GNet::EventState es, 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...
An implementation of the MessageDelivery interface that delivers message files to mailboxes.
A concrete implementation of the MessageStore interface dealing in paired flat files.
An interface to deliver a message to its local recipients' mailboxes.
virtual bool deliver(const MessageId &, bool is_new)=0
Delivers a new or locked message to its local recipients' mailboxes.
A somewhat opaque identifer for a GStore::MessageStore message id.
A zero-copy string token iterator where the token separators are runs of whitespace characters,...
A configuration structure for GStore::FileDelivery.