pigdog's picture

Hi All,

I installed the lamp appliance.  I notice that the time stamp in the postfix logs are off by 4 hours.  Advice from other forums was to copy /etc/localtime to /var/spool/postfix/etc

I've done so, but still not working.  I find these "localtime" files on the system, and
they are identical:

e4ca381035a34b7a852184cc0dd89baa  /etc/localtime
e4ca381035a34b7a852184cc0dd89baa  /var/spool/postfix/etc/localtime
e4ca381035a34b7a852184cc0dd89baa  /var/spool/postfix/usr/lib/zoneinfo/localtime
e4ca381035a34b7a852184cc0dd89baa  /usr/share/zoneinfo/localtime

The date command returns the correct time for my timezone:

Thu May 17 12:35:15 EDT 2012

But the time stamps are wrong in

Best regards,

P.S.  Is there an email client that installs by default with the Lamp appliance?
I tried using "mail" from a shell prompt, for testing, but the "mail" command is not found.

Jeremy Davis's picture

Have a look at this blog post for setting the timezone:


As for a client I'd check the Ubuntu server guide and/or forums for info

pigdog's picture

Hello Jeremy,

And thank you for your reply.  I followed the instructions you shared for

dpkg-reconfigure tzdata

This confirmed that my timezone is "America" "New York" and it touched

Then I ran
postfix reload
which logged the following to /var/log/mail.info:

May 18 12:36:15 lamp postfix/postfix-script[6474]: refreshing the Postfix mail system
May 18 12:36:15 lamp postfix/master[1538]: reload -- version 2.7.0, configuration ...

But the logged time is 4 hours ahead of the current time:
root@lamp /var/log# date
Fri May 18 08:36:25 EDT 2012

I ran "postfix reload" again, but it still logs the incorrect time (4 hours ahead).

The problem seems to be with postfix, not Ubuntu.

I had copied /etc/localtime to   /var/spool/postfix/etc/localtime

This apparently fixed the problem for others who have experienced it.

I found this link to /etc/localtime:

root@lamp /var/log# find / -name localtime -exec ls -lut {} \;
-rw-r--r-- 1 root root 3519 May 18 08:33 /etc/localtime
-rw-r--r-- 1 root root 3519 May 17 12:06 /var/spool/postfix/etc/localtime
lrwxrwxrwx 1 root root 14 May 17 12:06 /var/spool/postfix/usr/lib/zoneinfo/localtime -> /etc/localtime
lrwxrwxrwx 1 root root 14 May 17 12:07 /usr/share/zoneinfo/localtime -> /etc/localtime

I broke the link, then copied /etc/localtime to


but still no luck.

Might there be some other directory where the "localtime" file should be copied to make postfix happy?


Jeremy Davis's picture

I have experienced appliances out of sync but setting the correct timezone has resolved it. ButI have never done much with postfix so I don't know where to from here. Only other thing I can think of is to set a local ntp time server. I did that before but it was a Win guest in my PVE setup setup so doubt it is directly relevant anyway.

pigdog's picture

Thank you again for helping.

It looks like the postfix startup in /etc/init.d goes out of its way to turn off the TZ variable. I edited the main.cf file, but then had trouble starting postfix. Since I'm afraid of doing more harm than good, I'll let this sleeping dog lie. The only problem is the date stamp in the log, and I'm the only one who has noticed.

Thanks again!


TurnKey Linux wrote:

Add new comment