E-MailRelay
|
An implementation of the MessageDelivery interface that delivers message files to mailboxes. More...
#include <gfiledelivery.h>
Classes | |
struct | Config |
A configuration structure for GStore::FileDelivery. More... | |
Public Member Functions | |
FileDelivery (FileStore &, const Config &) | |
Constructor. More... | |
FileDelivery (const FileDelivery &)=delete | |
FileDelivery (FileDelivery &&)=delete | |
FileDelivery & | operator= (const FileDelivery &)=delete |
FileDelivery & | operator= (FileDelivery &&)=delete |
![]() | |
virtual bool | deliver (const MessageId &, bool is_new)=0 |
Delivers a new or locked message to its local recipients' mailboxes. More... | |
virtual | ~MessageDelivery ()=default |
Destructor. | |
Static Public Member Functions | |
static void | deliverTo (FileStore &, std::string_view prefix, const G::Path &dst_dir, const G::Path &envelope_path, const G::Path &content_path, bool hardlink=false, bool pop_by_name=false) |
Low-level function to copy a single message into a mailbox sub-directory or a pop-by-name sub-directory. More... | |
An implementation of the MessageDelivery interface that delivers message files to mailboxes.
Also provides a low-level delivery function deliverTo().
The deliver() override takes a ".new" or ".busy" message from the file store and delivers it to its local recipient mailbox sub-directories and then deletes the original message files (unless configured with 'no_delete').
Definition at line 49 of file gfiledelivery.h.
Constructor.
The delivery base directory is an attribute of the FileStore.
Definition at line 36 of file gfiledelivery.cpp.
|
static |
Low-level function to copy a single message into a mailbox sub-directory or a pop-by-name sub-directory.
Throws on error (incorporating the given prefix).
If pop-by-name then only the envelope is copied and the given destination directory is expected to be an immediate sub-directory of the content file's directory.
Does "maildir" delivery if the mailbox directory contains tmp/new/cur sub-directories (if not pop-by-name).
The content file is optionally hard-linked.
The process umask is modified when creating files so that the new files have full group access. The destination directory should normally have sticky group ownership.
Definition at line 102 of file gfiledelivery.cpp.