2022-01-20 16:31:40 +00:00
|
|
|
FROM alpine:3.15
|
2019-08-28 14:41:35 +00:00
|
|
|
#
|
2017-10-13 18:58:14 +00:00
|
|
|
# Install packages
|
2021-09-23 21:50:37 +00:00
|
|
|
RUN apk -U --no-cache add \
|
2018-03-25 18:35:32 +00:00
|
|
|
git \
|
2021-09-23 21:50:37 +00:00
|
|
|
libcap \
|
2022-01-20 16:31:40 +00:00
|
|
|
python2 && \
|
2019-08-28 14:41:35 +00:00
|
|
|
#
|
2017-10-13 18:58:14 +00:00
|
|
|
# Install mailoney from git
|
2020-09-04 12:37:28 +00:00
|
|
|
git clone https://github.com/t3chn0m4g3/mailoney /opt/mailoney && \
|
|
|
|
cd /opt/mailoney && \
|
2019-08-28 14:41:35 +00:00
|
|
|
#
|
2017-10-13 18:58:14 +00:00
|
|
|
# Setup user, groups and configs
|
2021-09-23 21:50:37 +00:00
|
|
|
addgroup -g 2000 mailoney && \
|
|
|
|
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 mailoney && \
|
2017-10-13 18:58:14 +00:00
|
|
|
chown -R mailoney:mailoney /opt/mailoney && \
|
2018-05-23 07:58:01 +00:00
|
|
|
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
|
2019-08-28 14:41:35 +00:00
|
|
|
#
|
2017-10-13 18:58:14 +00:00
|
|
|
# Clean up
|
2022-01-20 16:31:40 +00:00
|
|
|
apk del --purge git && \
|
2022-03-08 23:36:03 +00:00
|
|
|
rm -rf /root/* /var/cache/apk/* /opt/mailoney/.git
|
2019-08-28 14:41:35 +00:00
|
|
|
#
|
2018-05-30 11:20:55 +00:00
|
|
|
# Set workdir and start mailoney
|
2018-09-11 12:19:26 +00:00
|
|
|
STOPSIGNAL SIGINT
|
2018-03-31 21:44:11 +00:00
|
|
|
USER mailoney:mailoney
|
2017-10-13 18:58:14 +00:00
|
|
|
WORKDIR /opt/mailoney/
|
2021-09-23 21:50:37 +00:00
|
|
|
CMD ["/usr/bin/python","mailoney.py","-i","0.0.0.0","-p","25","-s","mailrelay.local","-t","schizo_open_relay"]
|