set correct time stamp for mails on postfix mailserver

The problem is that Postfix doesn't know what timezone you are in.
It's compounded by the fact that Postfix, for security reasons,
doesn't want to read things outside of it's directory. However you can
fix this by copying the timezone files to a directory in
/var/spool/postfix/

cd /var/spool/postfix/
sudo mkdir etc

now, take a look at /etc/localtime:

ls -la /etc/localtime
lrwxr-xr-x 1 root wheel 36 6 Aug 20:05 /etc/localtime ->
/usr/share/zoneinfo/America/New_York

copy /usr/share/zoneinfo/country/state to /var/spool/postfix/etc/

sudo cp -p /usr/share/zoneinfo/America/New_York \
/var/spool/postfix/etc/localtime

postfix check
postfix reload

Now take a look at your mail.log and see if all the times line up.


--

No comments:

Other Articles

Enter your email address: