Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have sendmail running on my CentOS server. The server is set to BST and tzdata is correct.

$ date
Tue Jul  2 10:53:56 BST 2013
$ ll /etc/localtime
lrwxrwxrwx 1 root root 33 Jun 28 17:07 /etc/localtime -> /usr/share/zoneinfo/Europe/London

I have a bash script running on this server which sends mail through a cronjob. The cronjob is set to run everyday at 7am.

00 07 * * * sh /root/

The log /var/log/cron shows that the server runs the job at specified time.

Jul  1 07:00:01 ukibimon01 crond[15407]: (root) CMD (sh /root/

The /etc/mail/ has the following settings:

# time zone handling:
#  if undefined, use system default
#  if defined but null, use TZ envariable passed in
#  if defined and non-null, use that info
#O TimeZoneSpec=

Also, no TZ variable is set on this machine.

The sendmail uses smart relay.

I also use smart relay to send mails to an Exchange server.

# "Smart" relay host (may be null)

The problem is, I receive the mail an hour later at 8am. The header information from Outlook is here:

Server (TLS) id 14.16.324.0; Tue, 2 Jul 2013 07:00:13 +0000
Received: from (IP) by (IP) with Microsoft SMTP

So, somehow sendmail is getting time from somewhere else and using

share|improve this question

3 Answers 3

For example you could set it as follows for Pacific Standard Time.

I would try

O TimeZoneSpec=PST8PDT

or in the

define(`confTIME_ZONE', `PST8PDT')dnl
share|improve this answer

Are you SURE you put the blame right?

with Microsoft SMTP - it does not indicate sendmail.

Are you SURE sendmail is accepting connection to at your CentOS?

share|improve this answer

The server runs on UTC. Your representation of the time as a user is in GMT/BST.

The 7am in the cron file is 0700 UTC, which right now (early October) is seen by you as 0800 BST. This corresponds to the time you receive the emails on Exchange.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.