generated from smedev/Template-for-SMEServer-Contribs-Package
Add in software files and templates
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
cd /opt/dmarc-srg
|
||||
php80 utils/fetch_reports.php source=email
|
||||
php80 utils/summary_report.php domain=bjsystems.co.uk period=lastweek
|
@@ -0,0 +1,2 @@
|
||||
CREATE database dmarc;
|
||||
GRANT all on dmarc.* to dmarc_user@localhost identified by '32katy55';
|
@@ -0,0 +1,27 @@
|
||||
Alias /dmarc-srg /opt/dmarc-srg
|
||||
ErrorLog /var/log/httpd/dmarc-srg-error.log
|
||||
<Location /dmarc-srg>
|
||||
AuthName "dmarc-srg"
|
||||
AuthType Basic
|
||||
AuthBasicProvider external
|
||||
AuthExternal pwauth
|
||||
require user admin
|
||||
</Location>
|
||||
<Directory /opt/dmarc-srg>
|
||||
SSLRequireSSL
|
||||
Options -Indexes
|
||||
AllowOverride None
|
||||
<RequireAll>
|
||||
Require ip 127.0.0.1 192.168.100.0/255.255.255.0
|
||||
</RequireAll>
|
||||
|
||||
AddType application/x-httpd-php .php
|
||||
<FilesMatch .php$>
|
||||
SetHandler "proxy:unix:/var/run/php-fpm/php80.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
</Directory>
|
||||
|
||||
<Directory /opt/dmarc-srg/utils/>
|
||||
Require all denied
|
||||
</Directory>
|
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
// Set 1 to enable debug messages
|
||||
$debug = 1;
|
||||
|
||||
// Settings for assessing the database in which reports will be saved
|
||||
$database = [
|
||||
'host' => 'localhost',
|
||||
'type' => 'mysql',
|
||||
'name' => 'dmarc',
|
||||
'user' => 'dmarc_user',
|
||||
'password' => '32katy55',
|
||||
/**
|
||||
* This pamemeter can be usefull if the database is shared with other applications
|
||||
* to avoid conflicting table names. You do not need to specify this parameter
|
||||
* if you use a dedicated database.
|
||||
* Example value: dmarc_
|
||||
* Caution! Do not use an empty string as the table prefix value if you share the database with
|
||||
* other applications.
|
||||
* Caution! Do not change this parameter if you have already created the tables in the database
|
||||
* because the tables will not be renamed automatically.
|
||||
*/
|
||||
'table_prefix' => ''
|
||||
];
|
||||
|
||||
/**
|
||||
* It is only required if you want to get reports from a mailbox automatically.
|
||||
* In order to collect reports from several mailboxes, you should put each
|
||||
* mailbox settings in an array.
|
||||
*/
|
||||
$mailboxes = [
|
||||
// Just for displaying in web-admin. Not necessary.
|
||||
'name' => 'Dmarc@bjsystems',
|
||||
// Host of the email server. You can specify a port separated by a colon.
|
||||
'host' => 'mail.bjsystems.co.uk',
|
||||
// Connection encryption method. The valid values are:
|
||||
// 'none' - without encryption (strongly not recommend).
|
||||
// 'ssl' - SSL/TLS on a separate port, for IMAP it is usually port 993.
|
||||
// 'starttls' - STARTTLS method, usually on the standard IMAP port 143. Default value.
|
||||
'encryption' => 'ssl',
|
||||
// Set true if you want to connect to the IMAP server without certificate validation
|
||||
'novalidate-cert' => false,
|
||||
// Mailbox user name.
|
||||
'username' => 'dmarc',
|
||||
// Mailbox password.
|
||||
'password' => '32katy55',
|
||||
// Mailbox name
|
||||
'mailbox' => 'INBOX'
|
||||
];
|
||||
|
||||
/**
|
||||
* It is only required if you want to get reports from a server directory.
|
||||
* In order to collect report from several directories, you should put each
|
||||
* directory settings in an array. Processing of the directories is not recursive.
|
||||
* It is recommended to use atomic methods for adding files to these directories.
|
||||
* Attention! All successfully processed files will be deleted from the directories
|
||||
* and all others will be moved to subdirectory `failed`, that will be created
|
||||
* automatically if it does not exist.
|
||||
*/
|
||||
$directories = [
|
||||
// Just for displaying in web-admin. Not necessary.
|
||||
'name' => 'Rua-Dir',
|
||||
// The directory location
|
||||
'location' => '/var/spool/dmarc-srg/rua'
|
||||
];
|
||||
|
||||
$admin = [
|
||||
// Set this value to null or remove this parameter to disable authentication
|
||||
// Note: The authentication is always failed with an empty password. Change it if you want to use the web ui.
|
||||
];
|
||||
|
||||
//
|
||||
$fetcher = [
|
||||
'mailboxes' => [
|
||||
// How many messages will be fetched at once maximum. 0 to disable any limiting.
|
||||
'messages_maximum' => 0
|
||||
],
|
||||
'directories' => [
|
||||
// How many report files will be processed at once maximum. 0 to disable any limiting.
|
||||
'files_maximum' => 50
|
||||
],
|
||||
/**
|
||||
* Domains matching this regular expression will be automatically added to the database from processed
|
||||
* reports. This option does not affect domains that have already been added to the database.
|
||||
* It is not necessary to use this option in most cases. The option can be useful if you have many domains
|
||||
* or subdomains and do not want to add them manually in the GUI. An empty string or null doesn't match any domain.
|
||||
* Note: The first domain from the first report will be automatically added anyway.
|
||||
* Some examples:
|
||||
* '.+\\.example\\.net$' - Matches any subdomain of the domain example.net
|
||||
* '^mymail[0-9]+\\.net$' - Matches the domains mymail01.net, mymail02.net, mymail99999.net, etc.
|
||||
*/
|
||||
'allowed_domains' => ''
|
||||
];
|
||||
|
||||
// Settings for sending summary reports if it is necessary.
|
||||
// It uses in utils/summary_report.php
|
||||
$mailer = [
|
||||
'from' => 'postmaster@bjsystems.co.uk',
|
||||
'default' => 'dmarc@bjsystems.co.uk'
|
||||
];
|
||||
|
||||
//
|
||||
$cleaner = [
|
||||
// It is used in utils/mailbox_cleaner.php
|
||||
'mailboxes' => [
|
||||
// Will remove messages older than (days)
|
||||
'days_old' => 30,
|
||||
// How many messages will be removed at once maximum.
|
||||
'delete_maximum' => 50,
|
||||
// How many messages must be leave in the mailbox minimum.
|
||||
'leave_minimum' => 100,
|
||||
// Cleaning up the mailbox that failed reports are moved to. This box is also subject
|
||||
// to the restrictions mentioned above. The valid values are:
|
||||
// 'none' - no action with it. Default value.
|
||||
// 'seen' - only seen messages will be removed
|
||||
// 'any' - all messages will be removed
|
||||
'failed' => 'none'
|
||||
],
|
||||
// It is used in utils/reports_cleaner.php
|
||||
'reports' => [
|
||||
'days_old' => 30,
|
||||
'delete_maximum' => 50,
|
||||
'leave_minimum' => 100
|
||||
],
|
||||
// It is used in utils/reportlog_cleaner.php
|
||||
'reportlog' => [
|
||||
'days_old' => 30,
|
||||
'delete_maximum' => 50,
|
||||
'leave_minimum' => 100
|
||||
]
|
||||
];
|
Reference in New Issue
Block a user