Howto set and fix postfix timezone to your local timezone

undefined

Symptoms

If you look at /usr/local/psa/var/log/maillog, you may find your postfix/smtpd time stamp is switched by several hours:

Feb 15 05:24:33 server postfix/smtpd[11984]
Feb 15 14:24:44 server postfix/smtpd[12001]
Feb 15 05:24:44 server postfix/smtpd[11984]
Feb 15 05:24:44 server postfix/smtpd[12001]
Feb 15 14:24:45 server before-remote[12000]

Resolution

It is compounded by the fact that a part of Postfix processes, for security reasons, runs in chrooted environment and /etc/localtime is not accessible for them, so that records are written into maillog with UTC time zone.

To resolve the issue create directory /var/spool/postfix/etc :

# mkdir /var/spool/postfix/etc

and copy file /etc/localtime to that directory:

# cp /etc/localtime /var/spool/postfix/etc/

Then restart mail service.

If You Appreciate What We Do Here On Mimastech, You Should Consider:

  1. Stay Connected to: Facebook | Twitter | Google+
  2. Support us via PayPal Donation
  3. Subscribe to our email newsletters.
  4. Tell other sysadmins / friends about Us - Share and Like our posts and services

We are thankful for your never ending support.

One Comment to Howto set and fix postfix timezone to your local timezone

  1. mahesh.m says:

    t is compounded by the fact that a part of Postfix processes, for security reasons, runs in chrooted environment and /etc/localtime is not accessible for them, so that records are written into maillog with UTC time zone.

    To resolve the issue create directory /var/spool/postfix/etc :

    # mkdir /var/spool/postfix/etc
    and copy file /etc/localtime to that directory:

    # cp /etc/localtime /var/spool/postfix/etc/

    Thank you it’s working

Leave a Reply

Your email address will not be published. Required fields are marked *