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
4080af0f
Commit
4080af0f
authored
Jan 21, 2016
by
Daniel Marinovici
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs #31595: add Chaperone; use Centos 7
parent
4ac9ede1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
5 deletions
+56
-5
Dockerfile
Dockerfile
+15
-5
chaperone.conf
chaperone.conf
+14
-0
docker-setup.sh
docker-setup.sh
+27
-0
No files found.
Dockerfile
View file @
4080af0f
FROM
centos:
6
FROM
centos:
7
RUN
yum
-y
install postfix mailx cyrus-sasl cyrus-sasl-plain python-setuptools python-pip rsyslog
RUN
rpm
--import
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
&&
\
yum updateinfo
-y
&&
\
yum install
-y
epel-release
&&
\
rpm
--import
/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
&&
\
yum install
-y
python34-devel postfix cyrus-sasl cyrus-sasl-plain mailx
&&
\
yum clean all
VOLUME
["/var/log"]
RUN
curl https://bootstrap.pypa.io/get-pip.py | python3.4
&&
\
pip3 install chaperone
ADD
postfix.sh /postfix.sh
RUN
mkdir
-p
/etc/chaperone.d
COPY
chaperone.conf /etc/chaperone.d/chaperone.conf
CMD
["sh", "-c", "/postfix.sh"]
COPY
docker-setup.sh /docker-setup.sh
RUN
chmod +x /docker-setup.sh
ENTRYPOINT
["/usr/bin/chaperone"]
chaperone.conf
0 → 100644
View file @
4080af0f
setup
.
service
: {
service_groups
:
INIT
,
command
:
"/docker-setup.sh"
}
postfix
.
service
: {
service_groups
:
IDLE
,
command
:
"postfix start"
}
console
.
logging
: {
selector
:
"*.warn"
,
stdout
:
true
}
docker-setup.sh
0 → 100755
View file @
4080af0f
#!/bin/bash
# configure postfix
function
setup_conf_and_secret
{
postconf
-e
'smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.trust.crt'
postconf
-e
"relayhost = [
$MTP_RELAY
]:
$MTP_PORT
"
postconf
-e
'smtp_sasl_auth_enable = yes'
postconf
-e
'smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd'
postconf
-e
'smtp_sasl_security_options = noanonymous'
postconf
-e
'smtp_tls_security_level = may'
postconf
-e
'mynetworks = 127.0.0.0/8 172.17.0.0/16'
echo
"
$MTP_RELAY
$MTP_USER
:
$MTP_PASS
"
>
/etc/postfix/relay_passwd
postmap /etc/postfix/relay_passwd
}
postconf
-e
"myhostname =
$MTP_HOST
"
postconf
-e
'inet_interfaces = all'
if
[
!
-z
"
$MTP_RELAY
"
-a
!
-z
"
$MTP_PORT
"
-a
!
-z
"
$MTP_USER
"
-a
!
-z
"
$MTP_PASS
"
]
;
then
setup_conf_and_secret
else
postconf
-e
'mynetworks = 127.0.0.1/32 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8'
fi
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