Postfix maillog在Centos 7 Docker中没有条目

我有一个centos docker容器内运行的postfix。 我可以得到它的电子邮件等,但我似乎无法得到它输出后缀日志任何地方。 我有一个精简的testing容器,试图得到这个包含postfix,rsyslog和supervisor的工作。

dockerfile是

FROM centos:7 RUN yum update -y \ && yum install -y epel-release \ && yum install -y \ postfix \ cyrus-sasl \ cyrus-sasl-plain \ cyrus-imapd \ rsyslog \ supervisor \ mailx \ && yum clean all \ && rm -rf /var/cache/yum ADD scripts/supervisord.conf /etc/supervisord.conf ADD scripts/postfix.sh / RUN chown -R root:root /etc/postfix/* \ && chmod 700 /postfix.sh WORKDIR /usr/local/bin CMD "/usr/bin/supervisord" 

supervisord.conf文件是

 [unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) [supervisord] logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) logfile_maxbytes=5MB ; (max main logfile bytes b4 rotation;default 50MB) pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) user=root nodaemon=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 [rpcinterface:supervisor] supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket [program:postfix] command = /postfix.sh process_name = postfix autorestart = false startsecs = 0 [program:rsyslog] command=rsyslogd -n stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stdout_events_enabled=true stderr_events_enabled=true 

postfix.sh包含:

 #!/usr/bin/env sh # call "postfix stop" when exiting trap "{ echo Stopping postfix; /usr/sbin/postfix stop; exit 0; }" EXIT # correct the hostname in the postfix config # check if instance exists in AWS, then get hostname from instance metadata if it is, else just use the hostname of the container status=$(curl -s -m 2 -o /dev/null -w "%{http_code}" http://169.254.169.254/latest/meta-data/local-hostname) if [ "$status" -eq 200 ]; then postfix_host=$(curl http://169.254.169.254/latest/meta-data/local-hostname) else postfix_host=$(hostname) fi sed -i "s/myorigin.*/myorigin = $postfix_host/g" /etc/postfix/main.cf # start postfix /usr/sbin/postfix -c /etc/postfix start # avoid exiting while true; do sleep 10000; done 

maillog文件被创build,但是没有被填充