Ask a Question related to FreeBSD, Design and Development.
-
Pat Maddox #1
Received mail timestamp is off by 7 hours
I've been having a weird problem lately...when I download an email
from my mailserver, the time is off by 7 hours. For example, if I
receive an email at 9:30pm, it lists the time as 2:30pm in my mail
client. I've determined that it's just a problem on received
messages, because if I use my client with a different mail server, the
time is fine, and if I send mail to another server, the time is fine.
It's annoying to me because messages will show up somewhere in the
middle of my 300+ message inbox, and users have been complaining about
it. What's going on, and how do I fix it? I'm using postfix and
courier-imap.
Pat Maddox Guest
-
int4 -> unix timestamp -> sql timestamp; abstime?
Hello, what is the opposite of cast(extract('epoch' from now()) as int)? The only thing I found that works is cast(cast(... as abstime) as... -
Any mail module dedicated to parsing 'Received: from'?
Hi folks The point of course is to try to automatically determine - as far aspossible - the point at which spam is first received by a mail... -
#22991 [Com]: PHP mail not being received by hotmail
ID: 22991 Comment by: rivera_karina at hotmail dot com Reported By: rcflyer at myself dot com Status: Bogus... -
#22969 [Com]: sent mail not received by some servers
ID: 22969 Comment by: iandbigejunk at yahoo dot com Reported By: yellowjacket at email dot com Status: Bogus... -
mail.app gives odd message for received mail
Today when I attempted to read some incoming mail I received the following instead of the normal message contents: The message from ... -
Kent Stewart #2
Re: Received mail timestamp is off by 7 hours
On Saturday 26 February 2005 08:38 pm, Pat Maddox wrote:
For starters, it looks like you are running PDT. You have a -0700 offset> I've been having a weird problem lately...when I download an email
> from my mailserver, the time is off by 7 hours. For example, if I
> receive an email at 9:30pm, it lists the time as 2:30pm in my mail
> client. I've determined that it's just a problem on received
> messages, because if I use my client with a different mail server,
> the time is fine, and if I send mail to another server, the time is
> fine. It's annoying to me because messages will show up somewhere in
> the middle of my 300+ message inbox, and users have been complaining
> about it. What's going on, and how do I fix it? I'm using postfix
> and courier-imap.
>
and it should be -800. It could be on gmail.com but you can test your
end :). So, I don't have any idea other than type "date" and see if you
have the right date and timezone.
Kent
--
Kent Stewart
Richland, WA
[url]http://users.owt.com/kstewart/index.html[/url]
Kent Stewart Guest
-
Pat Maddox #3
Re: Received mail timestamp is off by 7 hours
I forgot to give a bit of info. My local machine has the correct time
of 10:05PM, and the server has the correct time of 11:05PM. If I send
an email from a mail account on the server to gmail, it has the
correct time. If I send an email from gmail back to the server,
that's when it has the weird time offset.
On Sat, 26 Feb 2005 21:00:49 -0800, Kent Stewart <kstewart@owt.com> wrote:> On Saturday 26 February 2005 08:38 pm, Pat Maddox wrote:>> > I've been having a weird problem lately...when I download an email
> > from my mailserver, the time is off by 7 hours. For example, if I
> > receive an email at 9:30pm, it lists the time as 2:30pm in my mail
> > client. I've determined that it's just a problem on received
> > messages, because if I use my client with a different mail server,
> > the time is fine, and if I send mail to another server, the time is
> > fine. It's annoying to me because messages will show up somewhere in
> > the middle of my 300+ message inbox, and users have been complaining
> > about it. What's going on, and how do I fix it? I'm using postfix
> > and courier-imap.
> >
> For starters, it looks like you are running PDT. You have a -0700 offset
> and it should be -800. It could be on gmail.com but you can test your
> end :). So, I don't have any idea other than type "date" and see if you
> have the right date and timezone.
>
> Kent
>
> --
> Kent Stewart
> Richland, WA
>
> [url]http://users.owt.com/kstewart/index.html[/url]
>Pat Maddox Guest
-
Pat Maddox #4
Re: Received mail timestamp is off by 7 hours
It doesn't only happen when I receive mail from my gmail account -
it's with all email that passes through this server.
On Sun, 27 Feb 2005 17:54:56 +1000, Timothy Smith
<timothy@open-networks.net> wrote:> check your gmail account
> it's set to the wrong time zone or something. if "date" gives the
> correct time then thats what your server is using.
>
> Pat Maddox wrote:
>>> >I forgot to give a bit of info. My local machine has the correct time
> >of 10:05PM, and the server has the correct time of 11:05PM. If I send
> >an email from a mail account on the server to gmail, it has the
> >correct time. If I send an email from gmail back to the server,
> >that's when it has the weird time offset.
> >
> >
> >On Sat, 26 Feb 2005 21:00:49 -0800, Kent Stewart <kstewart@owt.com> wrote:
> >
> >> >_______________________________________________> >>On Saturday 26 February 2005 08:38 pm, Pat Maddox wrote:
> >>
> >>
> >>>I've been having a weird problem lately...when I download an email
> >>>from my mailserver, the time is off by 7 hours. For example, if I
> >>>receive an email at 9:30pm, it lists the time as 2:30pm in my mail
> >>>client. I've determined that it's just a problem on received
> >>>messages, because if I use my client with a different mail server,
> >>>the time is fine, and if I send mail to another server, the time is
> >>>fine. It's annoying to me because messages will show up somewhere in
> >>>the middle of my 300+ message inbox, and users have been complaining
> >>>about it. What's going on, and how do I fix it? I'm using postfix
> >>>and courier-imap.
> >>>
> >>>
> >>>
> >>For starters, it looks like you are running PDT. You have a -0700 offset
> >>and it should be -800. It could be on gmail.com but you can test your
> >>end :). So, I don't have any idea other than type "date" and see if you
> >>have the right date and timezone.
> >>
> >>Kent
> >>
> >>--
> >>Kent Stewart
> >>Richland, WA
> >>
> >>[url]http://users.owt.com/kstewart/index.html[/url]
> >>
> >>
> >>
> >freebsd-questions@freebsd.org mailing list
> >[url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
> >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> >
> >
> >
> >
>Pat Maddox Guest
-
Anthony Atkielski #5
Re: Received mail timestamp is off by 7 hours
Pat Maddox writes:
Can you post the complete headers of one of the messages that has the> I forgot to give a bit of info. My local machine has the correct time
> of 10:05PM, and the server has the correct time of 11:05PM. If I send
> an email from a mail account on the server to gmail, it has the
> correct time. If I send an email from gmail back to the server,
> that's when it has the weird time offset.
incorrect time?
--
Anthony
Anthony Atkielski Guest
-
Pat Maddox #6
Re: Received mail timestamp is off by 7 hours
I've included the headers of messages from both Gmail and Hotmail, to
show that it's not on Gmail's end. Also, here's the output from date:
%date
Sun Feb 27 02:42:21 CET 2005
They should show up in my inbox as being received at 1:40am or so, but
they show up as 6:40pm instead.
Return-Path: <pergesu@gmail.com>>From Gmail:
X-Original-To: [email]pergesu@javaspot.net[/email]
Delivered-To: [email]pergesu@javaspot.net[/email]
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198])
by cantona.dnswatchdog.com (Postfix) with ESMTP id 3161733C1B
for <pergesu@javaspot.net>; Sun, 27 Feb 2005 02:38:52 +0100 (CET)
Received: by wproxy.gmail.com with SMTP id 67so1650347wri
for <pergesu@javaspot.net>; Sun, 27 Feb 2005 00:37:53 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
s=beta; d=gmail.com;
h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;
b=hjLLSBpqixF9ZtT/yR/J0KR8cULmdWnOLmaYIsYKg99SQKXa7dEdESLtnPeg2N+mOL9Pf 9PWdu6tQMDHpg97lKTqEJuoBNNeYb6oqh55yJglvxbCSHCKf+p J6uKBdDlBXbK70uk9AKXugjD2VXjpYJN9jXploX3xgtWtU06wg VE=
Received: by 10.54.57.1 with SMTP id f1mr19787wra;
Sun, 27 Feb 2005 00:37:53 -0800 (PST)
Received: by 10.54.42.28 with HTTP; Sun, 27 Feb 2005 00:37:53 -0800 (PST)
Message-ID: <810a540e05022700376cfff9fa@mail.gmail.com>
Date: Sun, 27 Feb 2005 01:37:53 -0700
From: Pat Maddox <pergesu@gmail.com>
Reply-To: Pat Maddox <pergesu@gmail.com>
To: Pat Maddox <pergesu@javaspot.net>
Subject: test
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Return-Path: <pergesu@hotmail.com>>From Hotmail:
X-Original-To: [email]pergesu@javaspot.net[/email]
Delivered-To: [email]pergesu@javaspot.net[/email]
Received: from hotmail.com (bay103-f18.bay103.hotmail.com [65.54.174.28])
by cantona.dnswatchdog.com (Postfix) with ESMTP id A660C33C1B
for <pergesu@javaspot.net>; Sun, 27 Feb 2005 02:39:59 +0100 (CET)
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Sun, 27 Feb 2005 00:39:00 -0800
Message-ID: <BAY103-F180652D70B2D628DE95153AC670@phx.gbl>
Received: from 65.54.174.205 by by103fd.bay103.hotmail.msn.com with HTTP;
Sun, 27 Feb 2005 08:38:25 GMT
X-Originating-IP: [65.54.174.205]
X-Originating-Email: [pergesu@hotmail.com]
X-Sender: [email]pergesu@hotmail.com[/email]
From: "Patrick Maddox" <pergesu@hotmail.com>
To: [email]pergesu@javaspot.net[/email]
Subject: test from hotmail
Date: Sun, 27 Feb 2005 08:38:25 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 27 Feb 2005 08:39:00.0233 (UTC)
FILETIME=[C8B4B790:01C51CA7]
On Sun, 27 Feb 2005 09:34:17 +0100, Anthony Atkielski
<atkielski.anthony@wanadoo.fr> wrote:> Pat Maddox writes:
>>> > I forgot to give a bit of info. My local machine has the correct time
> > of 10:05PM, and the server has the correct time of 11:05PM. If I send
> > an email from a mail account on the server to gmail, it has the
> > correct time. If I send an email from gmail back to the server,
> > that's when it has the weird time offset.
> Can you post the complete headers of one of the messages that has the
> incorrect time?
>
> --
> Anthony
>
> _______________________________________________
> [email]freebsd-questions@freebsd.org[/email] mailing list
> [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>Pat Maddox Guest
-
Anthony Atkielski #7
Re: Received mail timestamp is off by 7 hours
Pat Maddox writes:
That can't be right. You sent your message in reply to a message I sent> I've included the headers of messages from both Gmail and Hotmail, to
> show that it's not on Gmail's end. Also, here's the output from date:
> %date
> Sun Feb 27 02:42:21 CET 2005
at 9:34 CET. The time on your local machine is incorrect by seven
hours. It should be one hour ahead of UTC right now.
And 1:40 is exactly seven hours later than 18:40.> They should show up in my inbox as being received at 1:40am or so, but
> they show up as 6:40pm instead.
The disparity is visible in the timestamps, too:
Notice that the timestamp on your local e-mail server corresponds to>>>From Gmail:
> Return-Path: <pergesu@gmail.com>
> X-Original-To: [email]pergesu@javaspot.net[/email]
> Delivered-To: [email]pergesu@javaspot.net[/email]
> Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198])
> by cantona.dnswatchdog.com (Postfix) with ESMTP id 3161733C1B
> for <pergesu@javaspot.net>; Sun, 27 Feb 2005 02:38:52 +0100 (CET)
1:38:52 UTC, but the timestamp on Gmail's server ...
.... corresponds to 8:37:53 UTC, which is correct. The other timestamps> Received: by wproxy.gmail.com with SMTP id 67so1650347wri
> for <pergesu@javaspot.net>; Sun, 27 Feb 2005 00:37:53 -0800 (PST)
for intermediate servers are also correct, but the timestamp generated
by your machine on the original message is not ...
-0700 corresponds to MST (Mountain Standard Time in the U.S.), not CET> Date: Sun, 27 Feb 2005 01:37:53 -0700
(Central European Time).
So the solution is to set the time and time _zone_ correctly on your
machine. For a UNIX machine, the CMOS real-time clock should be set to
UTC (what many people still call GMT), and then your time zone should be
set to whatever is appropriate for your location (CET would correspond
to most of Europe outside of the UK--here in France we are on CET).
Are you by any chance running a dual-boot configuration? Windows
expects the CMOS RTC to be set to local time. UNIX expects it to be set
to UTC. If you are running only FreeBSD, you can just reset the CMOS to
UTC and fix your time zone to match your location. If you are also
running a boot of Windows or something like that, you'll have to leave
the CMOS clock set to local time, and make appropriate adjustments.
Unfortunately, I'm not sure which variables to change in FreeBSD, as
I've always just set the time at installation time (when I'm asked if
the local clock is UTC and what time zone I'm in).
Maybe someone else can explain what needs to change in your FreeBSD
configuration to set it to the correct time.
In general, setting the time incorrectly on a local client machine in
the SMTP protocol will produce seemingly random errors in the time on
received messages, depending on the path they follow on their way to you
(this is true even for messages you send to yourself). The local
machine is almost always the one with the time set incorrectly
(incorrect time on mail servers tends to be noticed by users very
quickly, especially if more than one time zone is involved).
--
Anthony
Anthony Atkielski Guest
-
Pat Maddox #8
Re: Received mail timestamp is off by 7 hours
Alright, I got it all working now. Not sure how to change the time
zone with config files, so I just used sysinstall to change it to MST
(time zone is arbitrary, but since this is the zone I live in, it's
convenient for me). Then I used ntpdate to sync it, and it's working
well now.
Thanks for pointing that out to me. I just thought that CET was central time :)
On Sun, 27 Feb 2005 10:36:35 +0100, Anthony Atkielski
<atkielski.anthony@wanadoo.fr> wrote:> Pat Maddox writes:
>>> > I've included the headers of messages from both Gmail and Hotmail, to
> > show that it's not on Gmail's end. Also, here's the output from date:
> > %date
> > Sun Feb 27 02:42:21 CET 2005
> That can't be right. You sent your message in reply to a message I sent
> at 9:34 CET. The time on your local machine is incorrect by seven
> hours. It should be one hour ahead of UTC right now.
>>> > They should show up in my inbox as being received at 1:40am or so, but
> > they show up as 6:40pm instead.
> And 1:40 is exactly seven hours later than 18:40.
>
> The disparity is visible in the timestamps, too:
>>> >> >>From Gmail:
> > Return-Path: <pergesu@gmail.com>
> > X-Original-To: [email]pergesu@javaspot.net[/email]
> > Delivered-To: [email]pergesu@javaspot.net[/email]
> > Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198])
> > by cantona.dnswatchdog.com (Postfix) with ESMTP id 3161733C1B
> > for <pergesu@javaspot.net>; Sun, 27 Feb 2005 02:38:52 +0100 (CET)
> Notice that the timestamp on your local e-mail server corresponds to
> 1:38:52 UTC, but the timestamp on Gmail's server ...
>>> > Received: by wproxy.gmail.com with SMTP id 67so1650347wri
> > for <pergesu@javaspot.net>; Sun, 27 Feb 2005 00:37:53 -0800 (PST)
> ... corresponds to 8:37:53 UTC, which is correct. The other timestamps
> for intermediate servers are also correct, but the timestamp generated
> by your machine on the original message is not ...
>>> > Date: Sun, 27 Feb 2005 01:37:53 -0700
> -0700 corresponds to MST (Mountain Standard Time in the U.S.), not CET
> (Central European Time).
>
> So the solution is to set the time and time _zone_ correctly on your
> machine. For a UNIX machine, the CMOS real-time clock should be set to
> UTC (what many people still call GMT), and then your time zone should be
> set to whatever is appropriate for your location (CET would correspond
> to most of Europe outside of the UK--here in France we are on CET).
>
> Are you by any chance running a dual-boot configuration? Windows
> expects the CMOS RTC to be set to local time. UNIX expects it to be set
> to UTC. If you are running only FreeBSD, you can just reset the CMOS to
> UTC and fix your time zone to match your location. If you are also
> running a boot of Windows or something like that, you'll have to leave
> the CMOS clock set to local time, and make appropriate adjustments.
>
> Unfortunately, I'm not sure which variables to change in FreeBSD, as
> I've always just set the time at installation time (when I'm asked if
> the local clock is UTC and what time zone I'm in).
>
> Maybe someone else can explain what needs to change in your FreeBSD
> configuration to set it to the correct time.
>
> In general, setting the time incorrectly on a local client machine in
> the SMTP protocol will produce seemingly random errors in the time on
> received messages, depending on the path they follow on their way to you
> (this is true even for messages you send to yourself). The local
> machine is almost always the one with the time set incorrectly
> (incorrect time on mail servers tends to be noticed by users very
> quickly, especially if more than one time zone is involved).
>
> --
> Anthony
>
> _______________________________________________
> [email]freebsd-questions@freebsd.org[/email] mailing list
> [url]http://lists.freebsd.org/mailman/listinfo/freebsd-questions[/url]
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>Pat Maddox Guest
-
Anthony Atkielski #9
Re: Received mail timestamp is off by 7 hours
Pat Maddox writes:
Well, no, time zone isn't arbitrary, it needs to be chosen carefully.> Alright, I got it all working now. Not sure how to change the time
> zone with config files, so I just used sysinstall to change it to MST
> (time zone is arbitrary, but since this is the zone I live in, it's
> convenient for me).
Normally you set it to the time zone the machine is actually in (though
for remote servers one can set it for the time zone the machine actually
serves). Time zone can also influence the changeover dates and times
for Daylight Saving Time, if that is used (if you're in Arizona, it's
not). I'm not sure how this is handled in FreeBSD, but it always seems
to magically set itself on my machines at the appropriate time.
Even more important, however, is setting the real-time clock
to UTC.
I think Central Standard Time is CST.> Thanks for pointing that out to me. I just thought that CET was
> central time :)
--
Anthony
Anthony Atkielski Guest
-
Ian Smith #10
Re: Received mail timestamp is off by 7 hours
On Sun, 27 Feb 2005 03:10:12 -0700 Pat Maddox <pergesu@gmail.com> wrote:
Yes sysinstall's as good a way as any, it'll set your timezone and also> Alright, I got it all working now. Not sure how to change the time
> zone with config files, so I just used sysinstall to change it to MST
> (time zone is arbitrary, but since this is the zone I live in, it's
> convenient for me). Then I used ntpdate to sync it, and it's working
> well now.
>
> Thanks for pointing that out to me. I just thought that CET was central time :)
let you choose between running with a UTC or local time CMOS clock. Or
you can manually tun tzsetup(8) and create (or not) /etc/wall_cmos_clock
... see adjkerntz(8)
Take little notice of people opining that you must or even should run
CMOS UTC time; that's entirely up to you. I've always preferred local
time CMOS clocks personally; sysinstall creates /etc/wall_cmos_clock and
cron runs 'adjkerntz -a' halfhourly at times when daylight savings time
might come or go in your zone, and that's always worked fine here.
The only thing to watch running wall_cmos_clock is that if you boot to
single user mode, before /etc/rc has run 'adjkerntz -i' the system will
assume CMOS is UTC, so any files then modified show timestamps in UTC
(discovered the hard way in Jan 2000 on a box with a broken y2k BIOS :)
Cheers, Ian
Ian Smith Guest



Reply With Quote

