Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
same box showing different timezones in maillog
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Mon Apr 05, 2004 12:33 am    Post subject: same box showing different timezones in maillog Reply with quote

For some reason whenever I sent mail to other people externally, the time was always some hours out of sync. I have since changed the link at /etc/localtime to /usr/share/zoneinfo/Greenwich as I am based in London.

When I now look in my maillogs, I see two different sets of date showing:

Code:

Apr  4 19:28:41 gandalf postfix/qmgr[965]: 75FF747DC4: from=<users-return-39929-jmf=cybertre
x.co.uk@httpd.apache.org>, size=4892, nrcpt=1 (queue active)
Apr  5 01:28:41 gandalf spamd[1056]: connection from 127.0.0.1 [127.0.0.1] at port 49424
Apr  5 01:28:41 gandalf spamd[1891]: info: setuid to jmf succeeded
Apr  5 01:28:41 gandalf spamd[1891]: processing message <000001c41aa4$52c3f830$3a5afea9@DELL
530> for jmf:1000.
Apr  5 01:28:42 gandalf postfix/smtpd[1885]: disconnect from daedalus.apache.org[208.185.179
.12]
Apr  5 01:28:47 gandalf spamd[1891]: clean message (-4.9/4.5) for jmf:1000 in 5.2 seconds, 4
997 bytes.
Apr  5 01:28:47 gandalf postfix/local[1887]: 75FF747DC4: to=<jmf@cybertrex.co.uk>, relay=loc
al, delay=7, status=sent (delivered to command: /usr/bin/procmail)
Apr  4 19:28:47 gandalf postfix/qmgr[965]: 75FF747DC4: removed


You will see references to both April 4 and 5. Does anyone know how I can "restart" local time to take account of the fact that I have changed the link to Greenwich?

The error I get in Postfix is:

Code:

/var/spool/postfix/etc/localtime and /etc/localtime differ


But I do not know how to restart the localtime service so that the systems defaults to GMT.

I have copied the link from /etc/localtime to /var/spool/postfix/etc and performed a full stop start of PF but no change. It would appear that the parts of the maillog which show mail leaving and entering the system will reflect the correct time:

Code:

Apr  5 01:53:17 gandalf postfix/smtpd[2378]: 980F947DD0: client=gandalf.cybertrex.co.uk[10.2
2.18.105]
Apr  5 01:53:17 gandalf postfix/cleanup[2381]: 980F947DD0: message-id=<ef1386e0bf17d871dd146
ca815539e83@the4.co.uk>
Apr  5 01:53:18 gandalf postfix/qmgr[2364]: 980F947DD0: from=<jmf@cybertrex.co.uk>, size=105
4, nrcpt=1 (queue active)
Apr  5 01:53:18 gandalf postfix/smtpd[2378]: disconnect from gandalf.cybertrex.co.uk[10.22.1
8.105]


But the other parts of the maillog which show the IMAP client sessions logging in and out will show yesterdays date:

[code]
Apr 4 19:53:18 gandalf imapd: LOGOUT, user=jmf, ip=[::ffff:10.22.18.105], headers=0, body=0
Apr 4 19:53:18 gandalf imapd: Connection, ip=[::ffff:10.22.18.105]
Apr 4 19:53:18 gandalf imapd: LOGIN, user=jmf, ip=[::ffff:10.22.18.105], protocol=IMAP
Apr 4 19:53:19 gandalf imapd: LOGOUT, user=jmf, ip=[::ffff:10.22.18.105], headers=786, body
=1119
[code]

Any ideas?


Last edited by trossachs on Mon Apr 05, 2004 11:35 pm; edited 2 times in total
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Apr 05, 2004 8:48 am    Post subject: Reply with quote

There's no such thing as a localtime service; it's just a bunch of symlinks to the correct timezone.
Symlink the postfix localtime to the same one as /etc/localtime (don't symlink them to each other!) and RESTART all systems.
IMAP is, obviously, another daemon altogether so it will not reflect the changes when you restart postfix - it has nothing to do with postfix.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
trossachs
Veteran
Veteran


Joined: 22 Jan 2004
Posts: 1204
Location: London

PostPosted: Mon Apr 05, 2004 7:16 pm    Post subject: Reply with quote

I must apologize for the unnecessary post. You are quite correct, I should have simply pointed the postfix localtime to the same place as /etc/localtime. thx. All sorted now.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Apr 07, 2004 7:56 am    Post subject: Reply with quote

So why was it unnecessary if it solved your problem ?
That's exactly what we're here for!
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum