Change log redirect permissions

This commit is contained in:
Val 2015-07-26 20:02:11 +01:00
parent e3a66629c3
commit 8956bc8841
3 changed files with 29 additions and 13 deletions

View File

@ -32,11 +32,17 @@ RUN chmod 755 /boot
ENV AMAVIS=true ENV AMAVIS=true
# Redirect logs for Docker to pickup # Redirect logs for Docker to pickup
RUN ln -sf /dev/stdout /var/log/razor-agent.log RUN ln -sf /dev/stdout /var/log/razor-agent.log && \
RUN ln -sf /dev/stdout /var/log/mail.log ln -sf /dev/stdout /var/log/mail.log && \
RUN ln -sf /dev/stdout /var/log/mail.info ln -sf /dev/stdout /var/log/mail.info && \
RUN ln -sf /dev/stdout /var/log/mail.warn ln -sf /dev/stdout /var/log/mail.warn && \
RUN ln -sf /dev/stderr /var/log/mail.err 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 EXPOSE 10024

View File

@ -44,10 +44,15 @@ RUN groupadd -g 5000 vmail
RUN useradd -g vmail -u 5000 vmail -d /vmail -m RUN useradd -g vmail -u 5000 vmail -d /vmail -m
# Redirect logs for Docker to pickup # Redirect logs for Docker to pickup
RUN ln -sf /dev/stdout /var/log/mail.log RUN ln -sf /dev/stdout /var/log/mail.log && \
RUN ln -sf /dev/stdout /var/log/mail.info ln -sf /dev/stdout /var/log/mail.info && \
RUN ln -sf /dev/stdout /var/log/mail.warn ln -sf /dev/stdout /var/log/mail.warn && \
RUN ln -sf /dev/stderr /var/log/mail.err 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 EXPOSE 25 143 587
ENTRYPOINT /boot; service postfix start; dovecot -F ENTRYPOINT /boot; service postfix start; dovecot -F

View File

@ -19,10 +19,15 @@ RUN chmod 755 /boot
ENV OPEN_DKIM=true ENV OPEN_DKIM=true
# Redirect logs for Docker to pickup # Redirect logs for Docker to pickup
RUN ln -sf /dev/stdout /var/log/mail.log RUN ln -sf /dev/stdout /var/log/mail.log && \
RUN ln -sf /dev/stdout /var/log/mail.info ln -sf /dev/stdout /var/log/mail.info && \
RUN ln -sf /dev/stdout /var/log/mail.warn ln -sf /dev/stdout /var/log/mail.warn && \
RUN ln -sf /dev/stderr /var/log/mail.err 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 EXPOSE 8891