// \file PostfixMilterConf.hpp // // Copyright (C) 2011 ARM Research Labs, LLC. // See www.armresearch.com for the copyright terms. // // This file defines the PostfixMilterConf interface. // // $Id$ // /////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef PostfixMilterConfhpp_included #define PostfixMilterConfhpp_included #include /// Class to update smtpd_milters line in the postfix main.cf file. // ////////////////////////////////////////////////////////////////////////////////////////////////////////// class PostfixMilterConf { public: /// Constructor. // // \param[in] SocketSpeck specifies the value of the smtpd_milters // keyword in main.cf. // PostfixMilterConf(std::string SocketSpec); /// Load a new configuration line. void ConfLine(std::string Line); /// Check whether the configuration line indicates that SNFMilter is integrated. // // \returns true if the line indicates integration, false otherwise. // bool IsIntegrated(); /// Update the configuration line to integrate with SNFMilter. void AddIntegration(); /// Update the configuration line to remove integration with SNFMilter. void RemoveIntegration(); /// Get a copy of the configuration line. std::string ConfLine(); /// Check whether the configuration line is a milter specification. // // \returns true if the configuration line is a milter // specification, false otherwise. // bool IsMilterLine(); private: /// Check whether the configuration line contains a SNFMilter soecket specification. // // \returns true if the configuration line contains a SNFMilter // socket specification, false otherwise. // bool ContainsSnfMilterSocketSpec(); /// Configuration line. std::string ConfigurationLine; /// SNFMilter socket specification. std::string SnfMilterSocketSpec; }; #endif