#ifndef ____POP3_CAPA_h__ # define ____POP3_CAPA_h__ # include "POP3Command.h" namespace mail { // RFC 2449: CAPA is the standard way a POP3 client discovers what a // server actually supports before trying it - this server had no way // to advertise anything at all before. USER (the only login // mechanism __POP3_USER.h/__POP3_PASS.h implement), PIPELINING // (already true of every protocol built on this framework - // TCPSocket::onDataReceived() loops over every complete line already // buffered, not just the first one read), and now UIDL (real as of // __POP3_UIDL.cpp). Still nothing claiming APOP, STLS, or SASL, // since none of those have a real handler behind them. class __POP3_CAPA : public POP3Command { int processCommand(coreutils::ZString request, POP3Session &session, POP3Server &server) override { session.out << "+OK Capability list follows" << CRLF; session.out << "USER" << CRLF; session.out << "UIDL" << CRLF; session.out << "PIPELINING" << CRLF; session.out << "." << CRLF; return 1; } }; } #endif