|
|
@@ -40,50 +40,41 @@ SendmailIntegrate::SetOperatingSystem(std::string OperatingSystemType) { |
|
|
|
|
|
|
|
if ("OpenBSD" == OperatingSystemType) {
|
|
|
|
|
|
|
|
SendmailSendmailMcPath = "/etc/mail/sendmail.mc";
|
|
|
|
SendmailSendmailCfPath = "/etc/mail/localhost.cf";
|
|
|
|
ReloadMtaCommand = "kill -HUP `head -1 /var/run/sendmail.pid`";
|
|
|
|
ReloadMtaCommand = "pkill -HUP sendmail";
|
|
|
|
|
|
|
|
FileToBackup.push_back(SendmailSendmailMcPath);
|
|
|
|
FileToBackup.push_back(SendmailSendmailCfPath);
|
|
|
|
IntegrationIsSupported = false;
|
|
|
|
|
|
|
|
} else if ("FreeBSD" == OperatingSystemType) {
|
|
|
|
|
|
|
|
SendmailSendmailMcPath = "/etc/mail/freebsd.mc";
|
|
|
|
SendmailSendmailCfPath = "/etc/mail/sendmail.cf";
|
|
|
|
BuildInstallSendmailCfFile = "(cd /etc/mail && make cf && make install)";
|
|
|
|
ReloadMtaCommand = "/etc/rc.d/sendmail restart";
|
|
|
|
|
|
|
|
FileToBackup.push_back(SendmailSendmailMcPath);
|
|
|
|
FileToBackup.push_back(SendmailSendmailCfPath);
|
|
|
|
IntegrationIsSupported = false;
|
|
|
|
|
|
|
|
} else if ("Ubuntu" == OperatingSystemType) {
|
|
|
|
|
|
|
|
IntegrationIsSupported = true;
|
|
|
|
SendmailSendmailMcPath = "/etc/mail/sendmail.mc";
|
|
|
|
SendmailSendmailCfPath = "/etc/mail/sendmail.cf";
|
|
|
|
BuildInstallSendmailCfFile = "(cd /etc/mail && make)";
|
|
|
|
ReloadMtaCommand = "/usr/sbin/service sendmail reload";
|
|
|
|
ReloadMtaCommand = "/etc/init.d/sendmail reload";
|
|
|
|
|
|
|
|
FileToBackup.push_back(SendmailSendmailMcPath);
|
|
|
|
FileToBackup.push_back(SendmailSendmailCfPath);
|
|
|
|
|
|
|
|
} else if ("RedHat" == OperatingSystemType) {
|
|
|
|
|
|
|
|
IntegrationIsSupported = true;
|
|
|
|
SendmailSendmailMcPath = "/etc/mail/sendmail.mc";
|
|
|
|
SendmailSendmailCfPath = "/etc/mail/sendmail.cf";
|
|
|
|
BuildInstallSendmailCfFile = "(cd /etc/mail && make)";
|
|
|
|
ReloadMtaCommand = "/sbin/service sendmail reload";
|
|
|
|
ReloadMtaCommand = "/etc/init.d/sendmail reload";
|
|
|
|
|
|
|
|
FileToBackup.push_back(SendmailSendmailMcPath);
|
|
|
|
FileToBackup.push_back(SendmailSendmailCfPath);
|
|
|
|
|
|
|
|
} else if ("Suse" == OperatingSystemType) {
|
|
|
|
|
|
|
|
IntegrationIsSupported = true;
|
|
|
|
SendmailSendmailMcPath = "/etc/mail/linux.mc";
|
|
|
|
SendmailSendmailCfPath = "/etc/mail/sendmail.cf";
|
|
|
|
BuildInstallSendmailCfFile = "(cd /etc/mail && rm -f sendmail.cf && m4 /etc/mail/linux.mc > sendmail.cf)";
|
|
|
|
ReloadMtaCommand = "/sbin/service sendmail reload";
|
|
|
|
ReloadMtaCommand = "/etc/init.d/sendmail reload";
|
|
|
|
|
|
|
|
FileToBackup.push_back(SendmailSendmailMcPath);
|
|
|
|
FileToBackup.push_back(SendmailSendmailCfPath);
|
|
|
@@ -104,6 +95,12 @@ SendmailIntegrate::SetOperatingSystem(std::string OperatingSystemType) { |
|
|
|
void
|
|
|
|
SendmailIntegrate::Integrate(FileBackup *SaveFile) {
|
|
|
|
|
|
|
|
if (!IntegrationIsSupported) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (IsIntegrated()) {
|
|
|
|
|
|
|
|
return;
|
|
|
@@ -185,6 +182,12 @@ SendmailIntegrate::Integrate(FileBackup *SaveFile) { |
|
|
|
void
|
|
|
|
SendmailIntegrate::Unintegrate(FileBackup *SaveFile) {
|
|
|
|
|
|
|
|
if (!IntegrationIsSupported) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!IsIntegrated()) {
|
|
|
|
|
|
|
|
return;
|