You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SendmailIntegrate.hpp 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // \file SendmailIntegrate.hpp
  2. //
  3. // Copyright (C) 2012 ARM Research Labs, LLC.
  4. // See www.armresearch.com for the copyright terms.
  5. //
  6. // This file defines the SendmailIntegrate interface.
  7. //
  8. // $Id$
  9. //
  10. ///////////////////////////////////////////////////////////////////////////////////////////////////
  11. #ifndef SendmailIntegratehpp_included
  12. #define SendmailIntegratehpp_included
  13. #include <vector>
  14. #include "MtaIntegrate.hpp"
  15. /// Class to manage the SNFServer integration with sendmail.
  16. //
  17. // This class implements the MtaIntegrate interface for sendmail.
  18. //
  19. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  20. class SendmailIntegrate : public MtaIntegrate {
  21. public:
  22. virtual void SetOperatingSystem(std::string OperatingSystemType);
  23. virtual void Integrate(FileBackup *SaveFile);
  24. virtual void Unintegrate(FileBackup *SaveFile);
  25. private:
  26. virtual bool MtaIsRunningDetected();
  27. virtual bool ReloadMta();
  28. virtual bool IsIntegrated();
  29. bool MtaConfigurationHasProcmailForLda();
  30. /// Directory containing the snfSniffer script.
  31. std::string SnfSnifferDirName;
  32. /// snfSniffer script file name, including the directory.
  33. std::string SnfSnifferFileName;
  34. /// Sample snfSniffer script file name, including the directory.
  35. std::string SnfSnifferSampleFileName;
  36. /// procmail system configuration file name.
  37. std::string ProcmailRcFileName;
  38. /// Integration lines for procmail configuration file.
  39. std::string ProcmailRcSnifferIntegration;
  40. /// Sendmail sendmail.mc file path.
  41. std::string SendmailSendmailMcPath;
  42. /// Sendmail sendmail.cf file path.
  43. std::string SendmailSendmailCfPath;
  44. /// Command to build and install the sendmail.cf file.
  45. std::string BuildInstallSendmailCfFile;
  46. /// Command to reload the MTA.
  47. std::string ReloadMtaCommand;
  48. /// True if integration is supported on this platform.
  49. bool IntegrationIsSupported;
  50. /// typedef for container of filenames to backup up before integrating or unintegrating.
  51. typedef std::vector<std::string> FileToBackupType;
  52. /// Files to back up before integrating or unintegrating.
  53. FileToBackupType FileToBackup;
  54. };
  55. #endif