More Mutt, Root Mail, No Mailbox Stuff

Marius Gedminas marius at pov.lt
Wed Nov 21 17:39:35 UTC 2007


On Wed, Nov 21, 2007 at 09:22:51AM -0800, Leonard Chatagnier wrote:
> --- Marius Gedminas <marius at pov.lt> wrote:
> 
> >.......
>  After
> > > bootup and logging into terminal, messages say I
> > have

Ouch.  Painful line wrapping.

> > > mail(there should be as there were many messages
> > from
> > > the upgrade that root should get) so I open mutt
> > and
> > > the status bar at bottom say "no mailbox".
> > However,
> > > there are two such mailboxes in /var/mail and
> > > /var/spool/mail.
> > 
> > What does echo $MAIL say for you?  Are you setting
> > the MAIL variable in
> > your .bashrc/.bash_profile?  Are you setting
> > $spoolfile in your
> > ~/.muttrc?
> > 
> Echo $MAIL says /var/spool/mail/lchata which is what I
> had setup in Feisty.

It looks correct (assuming your username is lchata).

> Never have looked at .bashrc as I
> recall nor do I have a .bash_profile or a ~/.muttrc
> according to cat and locate. There is an example file
> of .bash_profile in /esr/share/doc/*etc. My ~/.muttrc

Did you mean "~/.bashrc" here?

> has:

> # Sets the Mail Environment Variable
> export MAIL=var/spool/mail/lchata

This is not correct.  You need a leading "/" in front of "var":

  export MAIL=/var/spool/mail/lchata

although if you remove this line altogether, Ubuntu should set up $MAIL
correctly by default.

...
> I'm reading what you say(and have now read Muttrc
> again) so how does one get root mail?

Usually you set up /etc/aliases with

    root: yourusername

and run 'sudo newaliases' once, to redirect all root's mail to your user
account.

> Root mail is
> the main issue as I use Yahoo web mail and have no
> real need for multi user local mail delivery; just
> root mail delivery.

If you wish (and if you have a working MTA set up correctly to use your
ISP's SMTP server as the relay host), you can make the alias forward
root's mail to an external mailbox.

> Also, /var/log/mail.log has this
> interesting item(revalent I think):
> 
> Nov 21 11:17:16 ubuntu postfix/qmgr[1883]:
> 2E23C108017: to=<root at example.org>, relay=none,
> delay=9003, delays=9003/0.03/0/0, dsn=4.3.5,
> status=deferred (delivery temporarily suspended: Host
> or domain name not found. Name service error for
> name=gateway.2wire.net type=A: Host not found).

Why are you sending email to "root at example.org"?  Your
/etc/postfix/main.cf file might have an incorrect domain set.

> Anticipating your reply I have included my /etc/hosts:
> 
> chata at ubuntu:/var/log$ cat /etc/hosts
> 127.0.0.1 localhost ubuntu.examples.org
> 127.0.1.1 ubuntu.examples.org
> 192.168.1.64    ubuntu
> (Note: examples.org is not a real FQDN)

Okay.  I'm not sure inventing a fake domain that looks like a real
domain is a good idea (I usually use something like .home or .lan), but
on the other hand you don't really need it to receive root's mail.


My laptop's hostname is 'platonas' (it has no FQDN).  I have

  127.0.1.1       platonas

in my /etc/hosts (I'm skipping the localhost and those ipv6 entries),
and these options in /etc/postfix/main.cf:

  append_dot_mydomain = no
  myhostname = platonas
  mydestination = platonas, localhost.localdomain, localhost

(the rest are more or less defaults).

According to a comment in /etc/aliases, the installer added the root
alias for me by default.

This is sufficient for me to receive root's mail in /var/spool/$username.

HTH,
Marius Gedminas
-- 
We're sysadmins. To us, data is a protocol-overhead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20071121/7a71bea8/attachment.sig>


More information about the ubuntu-users mailing list