#ifndef ____IMAP_SUBSCRIBE_h__ # define ____IMAP_SUBSCRIBE_h__ # include "IMAPCommand.h" # include # include namespace mail { // Backed by a plain one-name-per-line ".subscriptions" file at the // mailbox root, alongside Inbox/Spam/Trash and .password. If that // file doesn't exist yet (nothing has ever called SUBSCRIBE/ // UNSUBSCRIBE on this mailbox), every existing folder is treated as // subscribed by default - matches how a freshly provisioned mailbox // should behave for a client that only ever calls LSUB. std::vector readSubscriptions(const std::string &mailboxPath, const std::vector &allFolders); void writeSubscriptions(const std::string &mailboxPath, const std::vector &subscriptions); class __IMAP_SUBSCRIBE : public IMAPCommand { int processCommand(coreutils::ZString &request, IMAPSession &session, IMAPServer &server) override; }; } #endif