Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

PostfixMilterConf.hpp 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // \file PostfixMilterConf.hpp
  2. //
  3. // Copyright (C) 2011 ARM Research Labs, LLC.
  4. // See www.armresearch.com for the copyright terms.
  5. //
  6. // This file defines the PostfixMilterConf interface.
  7. //
  8. // $Id$
  9. //
  10. ///////////////////////////////////////////////////////////////////////////////////////////////////
  11. #ifndef PostfixMilterConfhpp_included
  12. #define PostfixMilterConfhpp_included
  13. #include <string>
  14. /// Class to update smtpd_milters line in the postfix main.cf file.
  15. //
  16. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  17. class PostfixMilterConf {
  18. public:
  19. /// Constructor.
  20. //
  21. // \param[in] SocketSpeck specifies the value of the smtpd_milters
  22. // keyword in main.cf.
  23. //
  24. PostfixMilterConf(std::string SocketSpec);
  25. /// Load a new configuration line.
  26. void ConfLine(std::string Line);
  27. /// Check whether the configuration line indicates that SNFMilter is integrated.
  28. //
  29. // \returns true if the line indicates integration, false otherwise.
  30. //
  31. bool IsIntegrated();
  32. /// Update the configuration line to integrate with SNFMilter.
  33. void AddIntegration();
  34. /// Update the configuration line to remove integration with SNFMilter.
  35. void RemoveIntegration();
  36. /// Get a copy of the configuration line.
  37. std::string ConfLine();
  38. /// Check whether the configuration line is a milter specification.
  39. //
  40. // \returns true if the configuration line is a milter
  41. // specification, false otherwise.
  42. //
  43. bool IsMilterLine();
  44. private:
  45. /// Check whether the configuration line contains a SNFMilter soecket specification.
  46. //
  47. // \returns true if the configuration line contains a SNFMilter
  48. // socket specification, false otherwise.
  49. //
  50. bool ContainsSnfMilterSocketSpec();
  51. /// Configuration line.
  52. std::string ConfigurationLine;
  53. /// SNFMilter socket specification.
  54. std::string SnfMilterSocketSpec;
  55. };
  56. #endif