-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,130 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
if (!defined('IN_WEBADMIN')) | ||
exit(); | ||
|
||
// Request variables | ||
$DomainId = hmailGetVar("domainid", 0, true); | ||
$AccountId = hmailGetVar("accountid", 0, true); | ||
$FolderId = hmailGetVar("folderid", 0, true); | ||
//$SubFolderId = hmailGetVar("subfolderid", 0, true); | ||
$Action = hmailGetVar("action", ""); | ||
|
||
$obDomain = $obBaseApp->Domains->ItemByDBID($DomainId); | ||
|
||
// Not domain admin | ||
if (hmailGetAdminLevel() == 0) | ||
hmailHackingAttemp(); | ||
|
||
// Domain admin but not for this domain | ||
if (hmailGetAdminLevel() == 1 && $DomainId != hmailGetDomainID()) | ||
hmailHackingAttemp(); | ||
|
||
// Request variables | ||
$FolderName = hmailGetVar("foldername", "Unnamed"); | ||
//$FolderParent = hmailGetVar("folderparentid", -1); | ||
$FolderSubscribed = hmailGetVar("folderissubscribed", 0); | ||
|
||
$obAccount = $obDomain->Accounts->ItemByDBID($AccountId); | ||
$Folders = $obAccount->IMAPFolders(); | ||
|
||
// Actions | ||
if ($Action == "edit") | ||
$Folder = $Folders->ItemByDBID($FolderId); | ||
elseif ($Action == "add") { | ||
$Folders->Add($FolderName); | ||
header("Location: index.php?page=account&action=edit&domainid=$DomainId&accountid=$AccountId"); | ||
exit(); | ||
} elseif ($Action == "delete") { | ||
$Folders->DeleteByDBID($FolderId); | ||
header("Location: index.php?page=account&action=edit&domainid=$DomainId&accountid=$AccountId"); | ||
exit(); | ||
} | ||
|
||
// Save the changes | ||
$Folder->Name = $FolderName; | ||
//$Folder->ParentID = $FolderParent; | ||
$Folder->Subscribed = $FolderSubscribed; | ||
|
||
$Folder->Save(); | ||
|
||
header("Location: index.php?page=account&action=edit&domainid=$DomainId&accountid=$AccountId"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
if (!defined('IN_WEBADMIN')) | ||
exit(); | ||
|
||
if (hmailGetAdminLevel() != 2) | ||
hmailHackingAttemp(); | ||
|
||
$dmarcfilename = hmailGetVar("dfn", ""); | ||
|
||
if(file_exists($dmarcfilename)) unlink($dmarcfilename); | ||
|
||
header("Location: index.php?page=dmarcreports"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
<?php | ||
if (!defined('IN_WEBADMIN')) | ||
exit(); | ||
if (!defined('IN_WEBADMIN')) | ||
exit(); | ||
|
||
if (hmailGetAdminLevel() != ADMIN_SERVER) | ||
hmailHackingAttemp(); // The user is not server administrator. | ||
|
||
$action = hmailGetVar("action",""); | ||
$id = hmailGetVar("id",0); | ||
$Active = hmailGetVar("Active",0); | ||
$DNSHost = hmailGetVar("DNSHost",""); | ||
$RejectMessage = hmailGetVar("RejectMessage",""); | ||
$Score = hmailGetVar("Score",0); | ||
|
||
$surblServers = $obBaseApp->Settings->AntiSpam->SURBLServers; | ||
|
||
if ($action == "edit") | ||
$surblServer = $surblServers->ItemByDBID($id); | ||
elseif ($action == "add") | ||
$surblServer = $surblServers->Add(); | ||
elseif ($action == "delete") | ||
{ | ||
$surblServers->DeleteByDBID($id); | ||
header("Location: index.php?page=surblservers"); | ||
} | ||
if (hmailGetAdminLevel() != ADMIN_SERVER) | ||
hmailHackingAttemp(); // The user is not server administrator. | ||
|
||
// Save the changes | ||
$surblServer->Active = $Active; | ||
$surblServer->DNSHost = $DNSHost; | ||
$surblServer->RejectMessage = $RejectMessage; | ||
$surblServer->Score = $Score; | ||
$action = hmailGetVar("action",""); | ||
$id = hmailGetVar("id",0); | ||
$Active = hmailGetVar("Active",0); | ||
$DNSHost = hmailGetVar("DNSHost",""); | ||
$RejectMessage = hmailGetVar("RejectMessage",""); | ||
$Score = hmailGetVar("Score",0); | ||
|
||
$surblServer->Save(); | ||
|
||
header("Location: index.php?page=surblservers"); | ||
?> | ||
$surblServers = $obBaseApp->Settings->AntiSpam->SURBLServers; | ||
|
||
if ($action == "edit") | ||
$surblServer = $surblServers->ItemByDBID($id); | ||
elseif ($action == "add") | ||
$surblServer = $surblServers->Add(); | ||
elseif ($action == "delete") { | ||
$surblServers->DeleteByDBID($id); | ||
header("Location: index.php?page=surblservers"); | ||
} | ||
|
||
// Save the changes | ||
$surblServer->Active = $Active; | ||
$surblServer->DNSHost = $DNSHost; | ||
$surblServer->RejectMessage = $RejectMessage; | ||
$surblServer->Score = $Score; | ||
|
||
$surblServer->Save(); | ||
|
||
header("Location: index.php?page=surblservers"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,5 +120,51 @@ | |
|
||
$hmail_config['datepicker_weekStart'] = 1; | ||
|
||
$hmail_config['version'] = 1.4; | ||
/* | ||
DMARC report analyser. | ||
Download new reports from IMAP. | ||
Unpack and / or save in dmarcreport directory. | ||
REQUIRED: IMAP extension | ||
The directory "dmarcreports" must exist and have write permission to it. | ||
*/ | ||
|
||
$hmail_config['dmarc_enable'] = false; | ||
|
||
/* | ||
IMAP account user name | ||
*/ | ||
|
||
$hmail_config['dmarc_username'] = '[email protected]'; | ||
|
||
/* | ||
IMAP account password | ||
*/ | ||
|
||
$hmail_config['dmarc_password'] = 'password'; | ||
|
||
/* | ||
IMAP server IP | ||
*/ | ||
|
||
$hmail_config['dmarc_hostip'] = '127.0.0.1'; | ||
|
||
/* | ||
IMAP server port | ||
*/ | ||
|
||
$hmail_config['dmarc_port'] = 993; | ||
|
||
/* | ||
IMAP server encryption | ||
Possible values: | ||
ssl - ssl encryption | ||
tsl - tsl encryption | ||
notls - no encryption | ||
*/ | ||
|
||
$hmail_config['dmarc_encryption'] = 'ssl'; | ||
?> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.