Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
postfix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luiz.nunes
postfix
Commits
0783592c
Commit
0783592c
authored
Feb 20, 2019
by
luiz.nunes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docker-setup.sh
parent
35893848
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
docker-setup.sh
docker-setup.sh
+14
-14
No files found.
docker-setup.sh
View file @
0783592c
...
@@ -3,16 +3,16 @@
...
@@ -3,16 +3,16 @@
# configure postfix
# configure postfix
function
setup_conf_and_secret
{
function
setup_conf_and_secret
{
postconf
-e
'smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.trust.crt'
#
postconf -e 'smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.trust.crt'
postconf
-e
"relayhost = [
$MTP_RELAY
]:
$MTP_PORT
"
postconf
-e
"relayhost = [
$MTP_RELAY
]:
$MTP_PORT
"
postconf
-e
'smtp_sasl_auth_enable = yes'
#
postconf -e 'smtp_sasl_auth_enable = yes'
postconf
-e
'smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd'
#
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd'
postconf
-e
'smtp_sasl_security_options = noanonymous'
#
postconf -e 'smtp_sasl_security_options = noanonymous'
postconf
-e
'smtp_tls_security_level = encrypt'
#
postconf -e 'smtp_tls_security_level = encrypt'
postconf
-e
'mynetworks = 127.0.0.0/8 1
72.16.0.0/12 10.0.0.0/8
'
postconf
-e
'mynetworks = 127.0.0.0/8 1
92.168.32.0/19 172.19.0.0/16
'
echo
"
$MTP_RELAY
$MTP_USER
:
$MTP_PASS
"
>
/etc/postfix/relay_passwd
#
echo "$MTP_RELAY $MTP_USER:$MTP_PASS" > /etc/postfix/relay_passwd
postmap /etc/postfix/relay_passwd
#
postmap /etc/postfix/relay_passwd
}
}
if
[
-z
"
$MTP_INTERFACES
"
]
;
then
if
[
-z
"
$MTP_INTERFACES
"
]
;
then
...
@@ -37,10 +37,10 @@ if [ ! -z "$MTP_RELAY_DOMAINS" ]; then
...
@@ -37,10 +37,10 @@ if [ ! -z "$MTP_RELAY_DOMAINS" ]; then
postconf
-e
"relay_domains =
$MTP_RELAY_DOMAINS
"
postconf
-e
"relay_domains =
$MTP_RELAY_DOMAINS
"
fi
fi
if
[
!
-z
"
$MTP_RELAY
"
-a
!
-z
"
$MTP_PORT
"
-a
!
-z
"
$MTP_USER
"
-a
!
-z
"
$MTP_PASS
"
]
;
then
#
if [ ! -z "$MTP_RELAY" -a ! -z "$MTP_PORT" -a ! -z "$MTP_USER" -a ! -z "$MTP_PASS" ]; then
setup_conf_and_secret
#
setup_conf_and_secret
else
#
else
postconf
-e
'mynetworks = 127.0.0.1/32 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8'
#
postconf -e 'mynetworks = 127.0.0.1/32 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8'
fi
#
fi
newaliases
newaliases
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