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.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /// Directory containing the snfSniffer script.
  30. std::string SnfSnifferDirName;
  31. /// snfSniffer script file name, including the directory.
  32. std::string SnfSnifferFileName;
  33. /// Sample snfSniffer script file name, including the directory.
  34. std::string SnfSnifferSampleFileName;
  35. /// procmail system configuration file name.
  36. std::string ProcmailRcFileName;
  37. /// Integration lines for procmail configuration file.
  38. std::string ProcmailRcSnifferIntegration;
  39. /// Sendmail sendmail.mc file path.
  40. std::string SendmailSendmailMcPath;
  41. /// Sendmail sendmail.cf file path.
  42. std::string SendmailSendmailCfPath;
  43. /// Command to build and install the sendmail.cf file.
  44. std::string BuildInstallSendmailCfFile;
  45. /// Command to reload the MTA.
  46. std::string ReloadMtaCommand;
  47. /// True if integration is supported on this platform.
  48. bool IntegrationIsSupported;
  49. /// typedef for container of filenames to backup up before integrating or unintegrating.
  50. typedef std::vector<std::string> FileToBackupType;
  51. /// Files to back up before integrating or unintegrating.
  52. FileToBackupType FileToBackup;
  53. };
  54. #endif