Try log redirection another way
This commit is contained in:
parent
8956bc8841
commit
16bd5e936f
@ -31,19 +31,5 @@ RUN chmod 755 /boot
|
||||
|
||||
ENV AMAVIS=true
|
||||
|
||||
# Redirect logs for Docker to pickup
|
||||
RUN ln -sf /dev/stdout /var/log/razor-agent.log && \
|
||||
ln -sf /dev/stdout /var/log/mail.log && \
|
||||
ln -sf /dev/stdout /var/log/mail.info && \
|
||||
ln -sf /dev/stdout /var/log/mail.warn && \
|
||||
ln -sf /dev/stderr /var/log/mail.err
|
||||
# Make logs writable for everyone
|
||||
RUN chmod 002 /var/log/razor-agent.log \
|
||||
/var/log/mail.log \
|
||||
/var/log/mail.info \
|
||||
/var/log/mail.warn \
|
||||
/var/log/mail.err
|
||||
|
||||
EXPOSE 10024
|
||||
|
||||
ENTRYPOINT ./boot; amavisd-new foreground
|
||||
|
@ -14,3 +14,10 @@ sed "/# DOCKERMAIL DOMAINS START/,/# DOCKERMAIL DOMAINS END/{//!d}" /etc/amavis/
|
||||
sed "/# DOCKERMAIL DOMAINS START/,/# DOCKERMAIL DOMAINS END/{//!d}" /etc/amavis/conf.d/50-user -i
|
||||
sed "/# DOCKERMAIL DOMAINS START/a $first_fqdn" /etc/amavis/conf.d/05-node_id -i
|
||||
sed "/# DOCKERMAIL DOMAINS START/a $domain_acl" /etc/amavis/conf.d/50-user -i
|
||||
|
||||
|
||||
ln -sf /dev/stdout /var/log/razor-agent.log
|
||||
ln -sf /dev/stdout /var/log/mail.log
|
||||
ln -sf /dev/stdout /var/log/mail.info
|
||||
ln -sf /dev/stdout /var/log/mail.warn
|
||||
ln -sf /dev/stderr /var/log/mail.err
|
||||
|
@ -43,16 +43,5 @@ VOLUME ["/vmail"]
|
||||
RUN groupadd -g 5000 vmail
|
||||
RUN useradd -g vmail -u 5000 vmail -d /vmail -m
|
||||
|
||||
# Redirect logs for Docker to pickup
|
||||
RUN ln -sf /dev/stdout /var/log/mail.log && \
|
||||
ln -sf /dev/stdout /var/log/mail.info && \
|
||||
ln -sf /dev/stdout /var/log/mail.warn && \
|
||||
ln -sf /dev/stderr /var/log/mail.err
|
||||
# Make logs writable for everyone
|
||||
RUN chmod 002 /var/log/mail.log \
|
||||
/var/log/mail.info \
|
||||
/var/log/mail.warn \
|
||||
/var/log/mail.err
|
||||
|
||||
EXPOSE 25 143 587
|
||||
ENTRYPOINT /boot; service postfix start; dovecot -F
|
||||
|
@ -47,6 +47,11 @@ chmod u+w /vmail
|
||||
# Add password file
|
||||
cp /mail_settings/passwords /etc/dovecot/passwd
|
||||
|
||||
ln -sf /dev/stdout /var/log/mail.log
|
||||
ln -sf /dev/stdout /var/log/mail.info
|
||||
ln -sf /dev/stdout /var/log/mail.warn
|
||||
ln -sf /dev/stderr /var/log/mail.err
|
||||
|
||||
# Run boot scripts
|
||||
for SCRIPT in /boot.d/*
|
||||
do
|
||||
|
@ -18,17 +18,5 @@ RUN chmod 755 /boot
|
||||
|
||||
ENV OPEN_DKIM=true
|
||||
|
||||
# Redirect logs for Docker to pickup
|
||||
RUN ln -sf /dev/stdout /var/log/mail.log && \
|
||||
ln -sf /dev/stdout /var/log/mail.info && \
|
||||
ln -sf /dev/stdout /var/log/mail.warn && \
|
||||
ln -sf /dev/stderr /var/log/mail.err
|
||||
# Make logs writable for everyone
|
||||
RUN chmod 002 /var/log/mail.log \
|
||||
/var/log/mail.info \
|
||||
/var/log/mail.warn \
|
||||
/var/log/mail.err
|
||||
|
||||
EXPOSE 8891
|
||||
|
||||
ENTRYPOINT /boot; opendkim -f -p inet:8891@0.0.0.0
|
||||
|
@ -5,3 +5,8 @@ cp /mail_settings/opendkim.conf /etc/opendkim.conf
|
||||
cp /mail_settings/mail.private /etc/dkim.key
|
||||
chown root:root /etc/dkim.key
|
||||
chmod 600 /etc/dkim.key
|
||||
|
||||
ln -sf /dev/stdout /var/log/mail.log
|
||||
ln -sf /dev/stdout /var/log/mail.info
|
||||
ln -sf /dev/stdout /var/log/mail.warn
|
||||
ln -sf /dev/stderr /var/log/mail.err
|
||||
|
Loading…
Reference in New Issue
Block a user