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
Issues
489
Issues
489
List
Boards
Labels
Service Desk
Milestones
Merge Requests
25
Merge Requests
25
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISPConfig
ISPConfig 3
Commits
44ae080a
Commit
44ae080a
authored
Jan 31, 2014
by
Florian Schaal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed templates for dkim-integration
parent
17c10825
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
38 deletions
+84
-38
install/dist/lib/centos52.lib.php
install/dist/lib/centos52.lib.php
+17
-5
install/dist/lib/centos53.lib.php
install/dist/lib/centos53.lib.php
+17
-5
install/dist/lib/fedora.lib.php
install/dist/lib/fedora.lib.php
+17
-5
install/dist/lib/gentoo.lib.php
install/dist/lib/gentoo.lib.php
+15
-4
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+18
-6
install/tpl/master_cf_amavis.master
install/tpl/master_cf_amavis.master
+0
-13
No files found.
install/dist/lib/centos52.lib.php
View file @
44ae080a
...
...
@@ -141,13 +141,25 @@ class installer extends installer_dist {
}
// Append the configuration for amavisd to the master.cf file
if
(
is_file
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
))
copy
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
,
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
);
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
))
copy
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
// Only add the content if we had not addded it before
if
(
!
stristr
(
$content
,
"127.0.0.1:10025"
))
{
if
(
!
stristr
(
$content
,
'amavis'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
"tpl/master_cf_amavis.master"
);
af
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
,
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10025.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10027'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10027.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
}
unset
(
$content
);
...
...
install/dist/lib/centos53.lib.php
View file @
44ae080a
...
...
@@ -142,13 +142,25 @@ class installer extends installer_dist {
}
// Append the configuration for amavisd to the master.cf file
if
(
is_file
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
))
copy
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
,
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
);
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
))
copy
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
// Only add the content if we had not addded it before
if
(
!
stristr
(
$content
,
"127.0.0.1:10025"
))
{
if
(
!
stristr
(
$content
,
'amavis'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
"tpl/master_cf_amavis.master"
);
af
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
,
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10025.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10027'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10027.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
}
unset
(
$content
);
...
...
install/dist/lib/fedora.lib.php
View file @
44ae080a
...
...
@@ -497,13 +497,25 @@ class installer_dist extends installer_base {
}
// Append the configuration for amavisd to the master.cf file
if
(
is_file
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
))
copy
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
,
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
);
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
))
copy
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
// Only add the content if we had not addded it before
if
(
!
stristr
(
$content
,
"127.0.0.1:10025"
))
{
if
(
!
stristr
(
$content
,
'amavis'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10025.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10027'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
"tpl/master_cf_amavis.master"
);
af
(
$conf
[
"postfix"
][
"config_dir"
]
.
'/master.cf'
,
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10027.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
}
unset
(
$content
);
...
...
install/dist/lib/gentoo.lib.php
View file @
44ae080a
...
...
@@ -332,14 +332,25 @@ class installer extends installer_base
caselog
(
$command
.
' &> /dev/null'
,
__FILE__
,
__LINE__
,
"EXECUTED:
$command
"
,
"Failed to execute the command
$command
"
);
}
//*
Append the configuration for amavisd to the master.cf file
//
Append the configuration for amavisd to the master.cf file
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
//* Only add the content if we had not addded it before
{
// Only add the content if we had not addded it before
if
(
!
stristr
(
$content
,
'amavis'
))
{
unset
(
$content
);
$content
=
$this
->
get_template_file
(
'master_cf_amavis'
,
true
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
{
unset
(
$content
);
$content
=
$this
->
get_template_file
(
'master_cf_amavis10025'
,
true
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10027'
))
{
unset
(
$content
);
$content
=
$this
->
get_template_file
(
'master_cf_amavis10027'
,
true
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
}
unset
(
$content
);
...
...
install/lib/installer_base.lib.php
View file @
44ae080a
...
...
@@ -669,11 +669,11 @@ class installer_base {
//* postfix-dkim
$full_file_name
=
$config_dir
.
'/tag_as_originating.re'
;
if
(
is_file
(
$full_file_name
))
copy
(
$full_file_name
,
$
config_dir
.
$configfil
e
.
'~'
);
if
(
is_file
(
$full_file_name
))
copy
(
$full_file_name
,
$
$full_file_nam
e
.
'~'
);
wf
(
$full_file_name
,
'/^/ FILTER amavis:[127.0.0.1]:10026'
);
$full_file_name
=
$config_dir
.
'/tag_as_foreign.re'
;
if
(
is_file
(
$full_file_name
))
copy
(
$full_file_name
,
$
config_dir
.
$configfil
e
.
'~'
);
if
(
is_file
(
$full_file_name
))
copy
(
$full_file_name
,
$
$full_file_nam
e
.
'~'
);
wf
(
$full_file_name
,
'/^/ FILTER amavis:[127.0.0.1]:10024'
);
//* Changing mode and group of the new created config files.
...
...
@@ -1040,10 +1040,22 @@ class installer_base {
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
))
copy
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf~'
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
// Only add the content if we had not addded it before
if
(
!
stristr
(
$content
,
'
127.0.0.1:10025
'
))
{
if
(
!
stristr
(
$content
,
'
amavis
'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10025'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10025.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
$content
=
rf
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
);
}
if
(
!
stristr
(
$content
,
'127.0.0.1:10027'
))
{
unset
(
$content
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/master_cf_amavis.master'
,
'tpl/master_cf_amavis10027.master'
);
af
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/master.cf'
,
$content
);
}
unset
(
$content
);
...
...
@@ -1051,18 +1063,18 @@ class installer_base {
exec
(
'adduser clamav amavis'
);
// Create the director for DKIM-Keys
mkdir
(
"/var/lib/amavis/dkim"
,
0750
);
if
(
!
is_dir
(
'/var/lib/amavis/dkim'
))
mkdir
(
'-p /var/lib/amavis/dkim'
,
0750
);
// get shell-user for amavis
$amavis_user
=
exec
(
'grep -o "^amavis:\|^vscan:" /etc/passwd'
);
if
(
!
empty
(
$amavis_user
))
{
$amavis_user
=
rtrim
(
$amavis_user
,
":"
);
exec
(
'chown '
.
$amavis_user
.
'/var/lib/amavis/dkim'
);
exec
(
'chown '
.
$amavis_user
.
'
/var/lib/amavis/dkim'
);
}
// get shell-group for amavis
$amavis_group
=
exec
(
'grep -o "^amavis:\|^vscan:" /etc/group'
);
if
(
!
empty
(
$amavis_group
))
{
$amavis_group
=
rtrim
(
$amavis_group
,
":"
);
exec
(
'chgrp '
.
$amavis_group
.
'/var/lib/amavis/dkim'
);
exec
(
'chgrp '
.
$amavis_group
.
'
/var/lib/amavis/dkim'
);
}
}
...
...
install/tpl/master_cf_amavis.master
View file @
44ae080a
...
...
@@ -3,16 +3,3 @@ amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
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