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
/var/log/cron shows that the server runs the job at specified time.
Jul 1 07:00:01 ukibimon01 crond: (root) CMD (sh /root/check_mail_process.sh)
/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) DSexchange_server_address
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