Thanks for the advice Michael. I have a question though.
Services from init.d start up under root, as far as i know. Root currently
has no TZ set, but all other services log correctly. If i set TZ in the
spamd init.d script, that would set TZ for root, wouldnt it? (TZ is
user-specific, i htink). Do you think this will still work? Would it impact
any other time-related things? 
I still find it strange that spamd is the only service that is logging and
ignoring the system time.

Dimitry

-----Original Message-----
From: Michael Barnes [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 November 2004 2:14 AM
To: users@spamassassin.apache.org
Subject: Re: spamd logging with wrong timestamp?



I've had servers log with incorrect time before and it was due to the
fact that I was in a different timezone than my server and I set my TZ
environment variable to reflect my timezone and not the timezone that
the server was located.  So, when I restarted the server, it inheireted
my TZ variable and started logging with that time and not the system
time.

If you might think that this is an issue, you could put the correct TZ
environment info in your spamd startup/shutdown script and that way it
will always be correct (or at least consistant).

Mike

On Thu, Nov 18, 2004 at 02:46:22PM +1100, Dimitry Peisakhov wrote:
> Mike, adding that switch to syslog didnt seem to work. I found some
> other posts through google which claim that stopping syslogd and spamd
> and starting them again fixes this up, but it hasnt worked for me.
>
> If anyone else has any ideas, they would be greately appreciated.
> 
> Thanks,
> Regards, Dimitry
> 
> -----Original Message-----
> From: Mike Kercher [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 18 November 2004 12:04 AM
> To: users@spamassassin.apache.org
> Subject: RE: spamd logging with wrong timestamp?
> 
> 
> Dimitry Peisakhov wrote:
> > Hi guys,
> > 
> >    I've recently discovered that my spamd is writing to the logs with
> > the incorrect timestamp. It looks like its using GMT to timestamp
> > instead of the actual time on the box (11hr difference). I fixed this
> > previously by restarting the service, but its not doing the trick
> > now.. Anyone have ideas about this? There doesnt seem to be any
> > switches for spamd to control timestamps or timezone config.     
> > 
> > thanks,
> > Regards,
> > 
> > Dimitry Peisakhov
> > Systems Administrator
> > 
> > HENRY WALKER ELTIN
> > 02 8875 4721
> > [EMAIL PROTECTED]
> 
> I had a similar problem a couple of weeks ago with a machine that had an
> older OS on it.  sendmail was logging the correct timestamp but
MailScanner
> was logging about 2 hours behind.  The way I resolved it was to add the
'-r'
> switch to my syslog initscript.
> 
> Mike

-- 
/-----------------------------------------\
| Michael Barnes <[EMAIL PROTECTED]> |
| UNIX Systems Administrator              |
| College of William and Mary             |
| Phone: (757) 879-3930                   |
\-----------------------------------------/

Reply via email to