Merge branch 'dev' of https://github.com/mailcow/mailcow-dockerized into dev
commit
b7a23a28fd
|
@ -1,7 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Wait for MySQL to warm-up
|
# Wait for MySQL to warm-up
|
||||||
while mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS}${DBPASS} --silent; do
|
while ! mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS} --silent; do
|
||||||
|
echo "Waiting for database to come up..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
# Wait until port becomes free and send sig
|
# Wait until port becomes free and send sig
|
||||||
until ! nc -z sogo-mailcow 20000;
|
until ! nc -z sogo-mailcow 20000;
|
||||||
|
@ -101,5 +104,3 @@ chown sogo:sogo -R /var/lib/sogo/
|
||||||
chmod 600 /var/lib/sogo/GNUstep/Defaults/sogod.plist
|
chmod 600 /var/lib/sogo/GNUstep/Defaults/sogod.plist
|
||||||
|
|
||||||
exec gosu sogo /usr/sbin/sogod
|
exec gosu sogo /usr/sbin/sogod
|
||||||
|
|
||||||
done
|
|
||||||
|
|
|
@ -73,6 +73,9 @@ if (!isset($autodiscover_config['sieve'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init records array
|
// Init records array
|
||||||
|
$spf_link = '<a href="http://www.openspf.org/SPF_Record_Syntax" target="_blank">SPF Record Syntax</a>';
|
||||||
|
$dmarc_link = '<a href="http://www.kitterman.com/dmarc/assistant.html" target="_blank">DMARC Assistant</a>';
|
||||||
|
|
||||||
$records = array();
|
$records = array();
|
||||||
$records[] = array(
|
$records[] = array(
|
||||||
$mailcow_hostname,
|
$mailcow_hostname,
|
||||||
|
@ -164,13 +167,13 @@ $records[] = array(
|
||||||
$records[] = array(
|
$records[] = array(
|
||||||
$domain,
|
$domain,
|
||||||
'TXT',
|
'TXT',
|
||||||
'<a href="http://www.openspf.org/SPF_Record_Syntax" target="_blank">SPF Record Syntax</a>',
|
$spf_link,
|
||||||
state_optional
|
state_optional
|
||||||
);
|
);
|
||||||
$records[] = array(
|
$records[] = array(
|
||||||
'_dmarc.' . $domain,
|
'_dmarc.' . $domain,
|
||||||
'TXT',
|
'TXT',
|
||||||
'<a href="http://www.kitterman.com/dmarc/assistant.html" target="_blank">DMARC Assistant</a>',
|
$dmarc_link,
|
||||||
state_optional
|
state_optional
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -337,16 +340,18 @@ foreach ($records as $record) {
|
||||||
foreach ($currents as &$current) {
|
foreach ($currents as &$current) {
|
||||||
if ($current['type'] == 'TXT' &&
|
if ($current['type'] == 'TXT' &&
|
||||||
stripos($current['txt'], 'v=dmarc') === 0 &&
|
stripos($current['txt'], 'v=dmarc') === 0 &&
|
||||||
stripos($current['host'], '_dmarc') === 0) {
|
$record[2] == $dmarc_link) {
|
||||||
$current['txt'] = str_replace(' ', '', $current['txt']);
|
$current['txt'] = str_replace(' ', '', $current['txt']);
|
||||||
$state = $current[$data_field[$current['type']]] . state_optional;
|
$state = $current[$data_field[$current['type']]] . state_optional;
|
||||||
}
|
}
|
||||||
elseif ($current['type'] == 'TXT' &&
|
elseif ($current['type'] == 'TXT' &&
|
||||||
stripos($current['txt'], 'v=spf') === 0) {
|
stripos($current['txt'], 'v=spf' &&
|
||||||
|
$record[2] == $spf_link) === 0) {
|
||||||
$state = $current[$data_field[$current['type']]] . state_optional;
|
$state = $current[$data_field[$current['type']]] . state_optional;
|
||||||
}
|
}
|
||||||
elseif ($current['type'] == 'TXT' &&
|
elseif ($current['type'] == 'TXT' &&
|
||||||
stripos($current['txt'], 'v=dkim') === 0) {
|
stripos($current['txt'], 'v=dkim') === 0 &&
|
||||||
|
stripos($record[2], 'v=dkim') === 0) {
|
||||||
$current['txt'] = str_replace(' ', '', $current['txt']);
|
$current['txt'] = str_replace(' ', '', $current['txt']);
|
||||||
if ($current[$data_field[$current['type']]] == $record[2]) {
|
if ($current[$data_field[$current['type']]] == $record[2]) {
|
||||||
$state = state_good;
|
$state = state_good;
|
||||||
|
|
Loading…
Reference in New Issue