Take the 2-minute tour ×
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/check_mail_process.sh

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/check_mail_process.sh)

The /etc/mail/sendmail.cf 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 BY2PRD0411HT003.namprd04.prod.outlook.com (IP) by BY2PRD0411HT005.namprd04.prod.outlook.com (IP) with Microsoft SMTP

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

share|improve this question

2 Answers 2

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

I would try insendmail.cf:

O TimeZoneSpec=PST8PDT

or in the sendmail.mc:

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

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.