Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
c9fa7a41
Commit
c9fa7a41
authored
Aug 18, 2014
by
Florian Schaal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed some logics
parent
02ff2682
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
server/plugins-available/mail_plugin_dkim.inc.php
server/plugins-available/mail_plugin_dkim.inc.php
+4
-3
No files found.
server/plugins-available/mail_plugin_dkim.inc.php
View file @
c9fa7a41
...
...
@@ -152,7 +152,7 @@ class mail_plugin_dkim {
}
}
else
{
$app
->
log
(
'Unable to write DKIM settings - no DKIM-Path defined'
,
LOGLEVEL_ERROR
);
$app
->
log
(
'Unable to write DKIM settings - no
or invalid
DKIM-Path defined'
,
LOGLEVEL_ERROR
);
$check
=
false
;
}
return
$check
;
...
...
@@ -174,6 +174,7 @@ class mail_plugin_dkim {
break
;
}
}
if
(
$initfile
==
''
)
$initfile
=
'service amavis'
;
$app
->
log
(
'Restarting amavis: '
.
$initfile
.
'.'
,
LOGLEVEL_DEBUG
);
exec
(
escapeshellarg
(
$initfile
)
.
' restart'
,
$output
);
foreach
(
$output
as
$logline
)
$app
->
log
(
$logline
,
LOGLEVEL_DEBUG
);
...
...
@@ -189,7 +190,7 @@ class mail_plugin_dkim {
function
write_dkim_key
(
$key_file
,
$key_value
,
$key_domain
)
{
global
$app
,
$mailconfig
;
$success
=
false
;
if
(
!
$app
->
system
->
file_put_contents
(
$key_file
.
'.private'
,
$key_value
)
===
false
)
{
if
(
$app
->
system
->
file_put_contents
(
$key_file
.
'.private'
,
$key_value
)
)
{
$app
->
log
(
'Saved DKIM Private-key to '
.
$key_file
.
'.private'
,
LOGLEVEL_DEBUG
);
$success
=
true
;
/* now we get the DKIM Public-key */
...
...
@@ -197,7 +198,7 @@ class mail_plugin_dkim {
$public_key
=
''
;
foreach
(
$pubkey
as
$values
)
$public_key
=
$public_key
.
$values
.
"
\n
"
;
/* save the DKIM Public-key in dkim-dir */
if
(
!
$app
->
system
->
file_put_contents
(
$key_file
.
'.public'
,
$public_key
)
===
false
)
if
(
$app
->
system
->
file_put_contents
(
$key_file
.
'.public'
,
$public_key
)
)
$app
->
log
(
'Saved DKIM Public to '
.
$key_domain
.
'.'
,
LOGLEVEL_DEBUG
);
else
$app
->
log
(
'Unable to save DKIM Public to '
.
$key_domain
.
'.'
,
LOGLEVEL_DEBUG
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment