mail doesn't read mail from /var/mail/root

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

mail doesn't read mail from /var/mail/root

ivpgbe
Hello,

I must be missing something obvious, but since installing 6.4-current (on a few versions in a row), I can't get mail to read /var/mail/root.

After logging in, I see:

>-------<
OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4

[... skipped ...]

You have mail.
thor# mail
No mail for root
thor# mail -f /var/mail/root
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/root": 0 messages
thor# ls -l /var/mail/root
-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
thor# head /var/mail/root
From [hidden email] Sun Nov 1 06:30:00 MDT 2018
Return-Path: root
Date: Nov 1 06:30:00 MDT 2018
From: [hidden email] (Theo de Raadt)
To: root
Subject: Welcome to OpenBSD 6.4!

This message attempts to describe the most basic initial questions that a
system administrator of an OpenBSD box might have.  You are urged to save
this message for later reference.
>------<

I also remember that I had this problem since the first time I installed 6.4-current on my new laptop.

I do receive local mail (e.g., from crontab) for a non-priveleged user created during setup.

Any ideas of what might be going on?

Best,
ivpgbe

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

trondd-2


On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:

>Hello,
>
>I must be missing something obvious, but since installing 6.4-current
>(on a few versions in a row), I can't get mail to read /var/mail/root.
>
>After logging in, I see:
>
>>-------<
>OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
>
>[... skipped ...]
>
>You have mail.
>thor# mail
>No mail for root
>thor# mail -f /var/mail/root
>Mail version 8.1.2 01/15/2001.  Type ? for help.
>"/var/mail/root": 0 messages
>thor# ls -l /var/mail/root
>-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
>thor# head /var/mail/root
>From [hidden email] Sun Nov 1 06:30:00 MDT 2018
>Return-Path: root
>Date: Nov 1 06:30:00 MDT 2018
>From: [hidden email] (Theo de Raadt)
>To: root
>Subject: Welcome to OpenBSD 6.4!
>
>This message attempts to describe the most basic initial questions that
>a
>system administrator of an OpenBSD box might have.  You are urged to
>save
>this message for later reference.
>>------<
>
>I also remember that I had this problem since the first time I
>installed 6.4-current on my new laptop.
>
>I do receive local mail (e.g., from crontab) for a non-priveleged user
>created during setup.
>
>Any ideas of what might be going on?
>
>Best,
>ivpgbe

It's because the Welcome email that gets sent to root and the user created during install is dated in the future.  It has the initial planned release date of Nov. 1st.  Mail(1) can't seem to see into the future.

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

ivpgbe
On Thu, Nov 8, 2018, at 6:03 AM, TronDD wrote:

> On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:
> >Hello,
> >
> >I must be missing something obvious, but since installing 6.4-current
> >(on a few versions in a row), I can't get mail to read /var/mail/root.
> >
> >After logging in, I see:
> >
> >>-------<
> >OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
> >
> >[... skipped ...]
> >
> >You have mail.
> >thor# mail
> >No mail for root
> >thor# mail -f /var/mail/root
> >Mail version 8.1.2 01/15/2001.  Type ? for help.
> >"/var/mail/root": 0 messages
> >thor# ls -l /var/mail/root
> >-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
> >thor# head /var/mail/root
> >From [hidden email] Sun Nov 1 06:30:00 MDT 2018
> >Return-Path: root
> >Date: Nov 1 06:30:00 MDT 2018
> >From: [hidden email] (Theo de Raadt)
> >To: root
> >Subject: Welcome to OpenBSD 6.4!
> >
> >This message attempts to describe the most basic initial questions that
> >a
> >system administrator of an OpenBSD box might have.  You are urged to
> >save
> >this message for later reference.
> >>------<
> >
> >I also remember that I had this problem since the first time I
> >installed 6.4-current on my new laptop.
> >
> >I do receive local mail (e.g., from crontab) for a non-priveleged user
> >created during setup.
> >
> >Any ideas of what might be going on?
> >
> >Best,
> >ivpgbe
>
> It's because the Welcome email that gets sent to root and the user
> created during install is dated in the future.  It has the initial
> planned release date of Nov. 1st.  Mail(1) can't seem to see into the
> future.

Good catch - that explains why I would not see it after the install. But today is Nov 8 (as confirmed by date(1), and it still doesn't see it, even after I touch(1) the file. Should I report it as a bug?

The mismatch between Nov 1 and the actual release is probably another bug. Should I report as well?

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

ivpgbe
I also tested on 6.4-release, and can confirm the same behavior.

On Thu, Nov 8, 2018, at 7:13 AM, [hidden email] wrote:

> On Thu, Nov 8, 2018, at 6:03 AM, TronDD wrote:
> > On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:
> > >Hello,
> > >
> > >I must be missing something obvious, but since installing 6.4-current
> > >(on a few versions in a row), I can't get mail to read /var/mail/root.
> > >
> > >After logging in, I see:
> > >
> > >>-------<
> > >OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
> > >
> > >[... skipped ...]
> > >
> > >You have mail.
> > >thor# mail
> > >No mail for root
> > >thor# mail -f /var/mail/root
> > >Mail version 8.1.2 01/15/2001.  Type ? for help.
> > >"/var/mail/root": 0 messages
> > >thor# ls -l /var/mail/root
> > >-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
> > >thor# head /var/mail/root
> > >From [hidden email] Sun Nov 1 06:30:00 MDT 2018
> > >Return-Path: root
> > >Date: Nov 1 06:30:00 MDT 2018
> > >From: [hidden email] (Theo de Raadt)
> > >To: root
> > >Subject: Welcome to OpenBSD 6.4!
> > >
> > >This message attempts to describe the most basic initial questions that
> > >a
> > >system administrator of an OpenBSD box might have.  You are urged to
> > >save
> > >this message for later reference.
> > >>------<
> > >
> > >I also remember that I had this problem since the first time I
> > >installed 6.4-current on my new laptop.
> > >
> > >I do receive local mail (e.g., from crontab) for a non-priveleged user
> > >created during setup.
> > >
> > >Any ideas of what might be going on?
> > >
> > >Best,
> > >ivpgbe
> >
> > It's because the Welcome email that gets sent to root and the user
> > created during install is dated in the future.  It has the initial
> > planned release date of Nov. 1st.  Mail(1) can't seem to see into the
> > future.
>
> Good catch - that explains why I would not see it after the install. But
> today is Nov 8 (as confirmed by date(1), and it still doesn't see it,
> even after I touch(1) the file. Should I report it as a bug?
>
> The mismatch between Nov 1 and the actual release is probably another
> bug. Should I report as well?
>
> Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

Otto Moerbeek
On Thu, Nov 08, 2018 at 07:18:57AM -0800, [hidden email] wrote:

> I also tested on 6.4-release, and can confirm the same behavior.

Is you MAIL environment var set?

        -Otto

>
> On Thu, Nov 8, 2018, at 7:13 AM, [hidden email] wrote:
> > On Thu, Nov 8, 2018, at 6:03 AM, TronDD wrote:
> > > On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:
> > > >Hello,
> > > >
> > > >I must be missing something obvious, but since installing 6.4-current
> > > >(on a few versions in a row), I can't get mail to read /var/mail/root.
> > > >
> > > >After logging in, I see:
> > > >
> > > >>-------<
> > > >OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
> > > >
> > > >[... skipped ...]
> > > >
> > > >You have mail.
> > > >thor# mail
> > > >No mail for root
> > > >thor# mail -f /var/mail/root
> > > >Mail version 8.1.2 01/15/2001.  Type ? for help.
> > > >"/var/mail/root": 0 messages
> > > >thor# ls -l /var/mail/root
> > > >-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
> > > >thor# head /var/mail/root
> > > >From [hidden email] Sun Nov 1 06:30:00 MDT 2018
> > > >Return-Path: root
> > > >Date: Nov 1 06:30:00 MDT 2018
> > > >From: [hidden email] (Theo de Raadt)
> > > >To: root
> > > >Subject: Welcome to OpenBSD 6.4!
> > > >
> > > >This message attempts to describe the most basic initial questions that
> > > >a
> > > >system administrator of an OpenBSD box might have.  You are urged to
> > > >save
> > > >this message for later reference.
> > > >>------<
> > > >
> > > >I also remember that I had this problem since the first time I
> > > >installed 6.4-current on my new laptop.
> > > >
> > > >I do receive local mail (e.g., from crontab) for a non-priveleged user
> > > >created during setup.
> > > >
> > > >Any ideas of what might be going on?
> > > >
> > > >Best,
> > > >ivpgbe
> > >
> > > It's because the Welcome email that gets sent to root and the user
> > > created during install is dated in the future.  It has the initial
> > > planned release date of Nov. 1st.  Mail(1) can't seem to see into the
> > > future.
> >
> > Good catch - that explains why I would not see it after the install. But
> > today is Nov 8 (as confirmed by date(1), and it still doesn't see it,
> > even after I touch(1) the file. Should I report it as a bug?
> >
> > The mismatch between Nov 1 and the actual release is probably another
> > bug. Should I report as well?
> >
> > Thanks!
>

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

ivpgbe
Yes, and I didn't change any defaults:

# set | grep MAIL
MAIL=/var/mail/root
MAILCHECK=600

On Thu, Nov 8, 2018, at 7:23 AM, Otto Moerbeek wrote:

> On Thu, Nov 08, 2018 at 07:18:57AM -0800, [hidden email] wrote:
>
> > I also tested on 6.4-release, and can confirm the same behavior.
>
> Is you MAIL environment var set?
>
> -Otto
>
> >
> > On Thu, Nov 8, 2018, at 7:13 AM, [hidden email] wrote:
> > > On Thu, Nov 8, 2018, at 6:03 AM, TronDD wrote:
> > > > On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:
> > > > >Hello,
> > > > >
> > > > >I must be missing something obvious, but since installing 6.4-current
> > > > >(on a few versions in a row), I can't get mail to read /var/mail/root.
> > > > >
> > > > >After logging in, I see:
> > > > >
> > > > >>-------<
> > > > >OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
> > > > >
> > > > >[... skipped ...]
> > > > >
> > > > >You have mail.
> > > > >thor# mail
> > > > >No mail for root
> > > > >thor# mail -f /var/mail/root
> > > > >Mail version 8.1.2 01/15/2001.  Type ? for help.
> > > > >"/var/mail/root": 0 messages
> > > > >thor# ls -l /var/mail/root
> > > > >-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
> > > > >thor# head /var/mail/root
> > > > >From [hidden email] Sun Nov 1 06:30:00 MDT 2018
> > > > >Return-Path: root
> > > > >Date: Nov 1 06:30:00 MDT 2018
> > > > >From: [hidden email] (Theo de Raadt)
> > > > >To: root
> > > > >Subject: Welcome to OpenBSD 6.4!
> > > > >
> > > > >This message attempts to describe the most basic initial questions that
> > > > >a
> > > > >system administrator of an OpenBSD box might have.  You are urged to
> > > > >save
> > > > >this message for later reference.
> > > > >>------<
> > > > >
> > > > >I also remember that I had this problem since the first time I
> > > > >installed 6.4-current on my new laptop.
> > > > >
> > > > >I do receive local mail (e.g., from crontab) for a non-priveleged user
> > > > >created during setup.
> > > > >
> > > > >Any ideas of what might be going on?
> > > > >
> > > > >Best,
> > > > >ivpgbe
> > > >
> > > > It's because the Welcome email that gets sent to root and the user
> > > > created during install is dated in the future.  It has the initial
> > > > planned release date of Nov. 1st.  Mail(1) can't seem to see into the
> > > > future.
> > >
> > > Good catch - that explains why I would not see it after the install. But
> > > today is Nov 8 (as confirmed by date(1), and it still doesn't see it,
> > > even after I touch(1) the file. Should I report it as a bug?
> > >
> > > The mismatch between Nov 1 and the actual release is probably another
> > > bug. Should I report as well?
> > >
> > > Thanks!
> >

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

ivpgbe
And regardless, /usr/src/usr.bin/mail/main.c:95 unsets MAIL environment variable when an '-u' flag is present, and the problem I'm reporting persists even when I run

mail -u root

as root.

On Thu, Nov 8, 2018, at 7:29 AM, [hidden email] wrote:

> Yes, and I didn't change any defaults:
>
> # set | grep MAIL
> MAIL=/var/mail/root
> MAILCHECK=600
>
> On Thu, Nov 8, 2018, at 7:23 AM, Otto Moerbeek wrote:
> > On Thu, Nov 08, 2018 at 07:18:57AM -0800, [hidden email] wrote:
> >
> > > I also tested on 6.4-release, and can confirm the same behavior.
> >
> > Is you MAIL environment var set?
> >
> > -Otto
> >
> > >
> > > On Thu, Nov 8, 2018, at 7:13 AM, [hidden email] wrote:
> > > > On Thu, Nov 8, 2018, at 6:03 AM, TronDD wrote:
> > > > > On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:
> > > > > >Hello,
> > > > > >
> > > > > >I must be missing something obvious, but since installing 6.4-current
> > > > > >(on a few versions in a row), I can't get mail to read /var/mail/root.
> > > > > >
> > > > > >After logging in, I see:
> > > > > >
> > > > > >>-------<
> > > > > >OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
> > > > > >
> > > > > >[... skipped ...]
> > > > > >
> > > > > >You have mail.
> > > > > >thor# mail
> > > > > >No mail for root
> > > > > >thor# mail -f /var/mail/root
> > > > > >Mail version 8.1.2 01/15/2001.  Type ? for help.
> > > > > >"/var/mail/root": 0 messages
> > > > > >thor# ls -l /var/mail/root
> > > > > >-rw-------  1 root  wheel   3.9K Oct 20 00:37 /var/mail/root
> > > > > >thor# head /var/mail/root
> > > > > >From [hidden email] Sun Nov 1 06:30:00 MDT 2018
> > > > > >Return-Path: root
> > > > > >Date: Nov 1 06:30:00 MDT 2018
> > > > > >From: [hidden email] (Theo de Raadt)
> > > > > >To: root
> > > > > >Subject: Welcome to OpenBSD 6.4!
> > > > > >
> > > > > >This message attempts to describe the most basic initial questions that
> > > > > >a
> > > > > >system administrator of an OpenBSD box might have.  You are urged to
> > > > > >save
> > > > > >this message for later reference.
> > > > > >>------<
> > > > > >
> > > > > >I also remember that I had this problem since the first time I
> > > > > >installed 6.4-current on my new laptop.
> > > > > >
> > > > > >I do receive local mail (e.g., from crontab) for a non-priveleged user
> > > > > >created during setup.
> > > > > >
> > > > > >Any ideas of what might be going on?
> > > > > >
> > > > > >Best,
> > > > > >ivpgbe
> > > > >
> > > > > It's because the Welcome email that gets sent to root and the user
> > > > > created during install is dated in the future.  It has the initial
> > > > > planned release date of Nov. 1st.  Mail(1) can't seem to see into the
> > > > > future.
> > > >
> > > > Good catch - that explains why I would not see it after the install. But
> > > > today is Nov 8 (as confirmed by date(1), and it still doesn't see it,
> > > > even after I touch(1) the file. Should I report it as a bug?
> > > >
> > > > The mismatch between Nov 1 and the actual release is probably another
> > > > bug. Should I report as well?
> > > >
> > > > Thanks!
> > >

Reply | Threaded
Open this post in threaded view
|

Re: mail doesn't read mail from /var/mail/root

ivpgbe
Mystery solved! The very first line is missing a space between ‘Nov’
and ‘1’ (should be two spaces). After adding it back, mail can now
parse the file.
(Also, Nov 1 is Thu, not Sun, but that wouldn’t have prevented mail from
parsing the file).
I will send a patch to tech@ adding that space back  - it would be cool
to make a contribution of a single character ;).

On Thu, Nov 8, 2018, at 7:32 AM, [hidden email] wrote:

> And regardless, /usr/src/usr.bin/mail/main.c:95 unsets MAIL
> environment> variable when an '-u' flag is present, and the problem I'm reporting
> persists even when I run
>
> mail -u root
>
> as root.
>
> On Thu, Nov 8, 2018, at 7:29 AM, [hidden email] wrote:
> > Yes, and I didn't change any defaults:
> >
> > # set | grep MAIL
> > MAIL=/var/mail/root
> > MAILCHECK=600
> >
> > On Thu, Nov 8, 2018, at 7:23 AM, Otto Moerbeek wrote:
> > > On Thu, Nov 08, 2018 at 07:18:57AM -0800, [hidden email] wrote:
> > >
> > > > I also tested on 6.4-release, and can confirm the same behavior.> > >
> > > Is you MAIL environment var set?
> > >
> > >  -Otto
> > >
> > > >
> > > > On Thu, Nov 8, 2018, at 7:13 AM, [hidden email] wrote:
> > > > > On Thu, Nov 8, 2018, at 6:03 AM, TronDD wrote:
> > > > > > On November 8, 2018 1:39:13 AM CST, [hidden email] wrote:
> > > > > > >Hello,
> > > > > > >
> > > > > > >I must be missing something obvious, but since installing
> > > > > > >6.4-current> > > > > > >(on a few versions in a row), I can't get mail to read
> > > > > > >/var/mail/root.> > > > > > >
> > > > > > >After logging in, I see:
> > > > > > >
> > > > > > >>-------<
> > > > > > >OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov 4
> > > > > > >
> > > > > > >[... skipped ...]
> > > > > > >
> > > > > > >You have mail.
> > > > > > >thor# mail
> > > > > > >No mail for root
> > > > > > >thor# mail -f /var/mail/root
> > > > > > >Mail version 8.1.2 01/15/2001.  Type ? for help.
> > > > > > >"/var/mail/root": 0 messages
> > > > > > >thor# ls -l /var/mail/root
> > > > > > >-rw-------  1 root  wheel   3.9K Oct 20 00:37
> > > > > > >/var/mail/root> > > > > > >thor# head /var/mail/root
> > > > > > >From [hidden email] Sun Nov 1 06:30:00
> > > > > > >MDT 2018> > > > > > >Return-Path: root
> > > > > > >Date: Nov 1 06:30:00 MDT 2018
> > > > > > >From: [hidden email] (Theo de Raadt)
> > > > > > >To: root
> > > > > > >Subject: Welcome to OpenBSD 6.4!
> > > > > > >
> > > > > > >This message attempts to describe the most basic initial
> > > > > > >questions that> > > > > > >a
> > > > > > >system administrator of an OpenBSD box might have.  You are
> > > > > > >urged to> > > > > > >save
> > > > > > >this message for later reference.
> > > > > > >>------<
> > > > > > >
> > > > > > >I also remember that I had this problem since the first
> > > > > > >time I> > > > > > >installed 6.4-current on my new laptop.
> > > > > > >
> > > > > > >I do receive local mail (e.g., from crontab) for a non-
> > > > > > >priveleged user> > > > > > >created during setup.
> > > > > > >
> > > > > > >Any ideas of what might be going on?
> > > > > > >
> > > > > > >Best,
> > > > > > >ivpgbe
> > > > > >
> > > > > > It's because the Welcome email that gets sent to root and
> > > > > > the user> > > > > > created during install is dated in the future.  It has the
> > > > > > initial> > > > > > planned release date of Nov. 1st.  Mail(1) can't seem to see
> > > > > > into the> > > > > > future.
> > > > >
> > > > > Good catch - that explains why I would not see it after the
> > > > > install. But> > > > > today is Nov 8 (as confirmed by date(1), and it still doesn't
> > > > > see it,> > > > > even after I touch(1) the file. Should I report it as a bug?
> > > > >
> > > > > The mismatch between Nov 1 and the actual release is probably
> > > > > another> > > > > bug. Should I report as well?
> > > > >
> > > > > Thanks!
> > > >
>