1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // \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 <string>
-
- /// 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
|