11.x Install Options - "receives mail"

Hi,

During a clean install, at the setting up of the original user, there are two check boxes: “User Receives Mail” and “Automatic Login”.

What does “Receives Mail” do?

Regards, Martin

It is not an option I normally enable but I believe it directs all system-generated mail (e.g. from cron failures etc.), that would normally go to root, to the defined user’s account.

Regards,
Neil Darlow

Normally all the system mail go to the root user. This will forward the mail for the user you are creating also… so that you do not need to be root to check system mails. If you have scheduled some software to run at particular time, you will get a mail if that completed successfully or if that failed.

Thank you. Please for give my ignorance in the following questions!
Putting to one side, who & how the mail is sent, for now (I guess I may need to return to this later?).

How are these system mails received/read? In my naivety, I would assume that I would only see mail addressed to the email address that my email client is set to collect from my SMTP/POP servers? How does my SuSE 11.x workstation know that address? My email client (Thunderbird in my case), sits above and in many ways is separated from the OS (the environment that is asking “Receives Mail?”).

Regards, Martin

The system mail is usually not sent over the internet but is a file based
system. Don’t kill me if my memory is wrong but I think its somethin in
/var/spool/mail or so.
The command line tool mail should be preconfigured that you can read it. So
if you type mail in a terminal you should see this messages.
I am pretty sure you can configure your email client to use that mbox format
also if you are able to locate where the file is stored (I really simply do
not remeber).


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.1 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | Gnome 2.32 | nVidia
ION | 3GB Ram

The manuals
from Novell/the (probably Novell/SUSE GmbH paid) openSUSE documentation team
said also something like this:

Documentation, Section: Documentation, Guides & Manuals, Sub-Section: openSUSE 11.4 >
openSUSE Reference (Publication Date 28 Mar 2011) >
>
Chapter 9. Managing Users with YaST >
9.2. Managing User Accounts >

…]
Procedure 9.1. Adding or Modifying User Accounts

Open the YaST User and Group Administration dialog and click the Users tab.

With Set Filter define the set of users you want to manage. The dialog shows a list of users in the system and the groups the users belong to.

To modify options for an existing user, select an entry and click Edit.

To create a new user account, click Add.

Enter the appropriate user data on the first tab, such as Username (which is used for login) and Password. This data is sufficient to create a new user. If you click OK now, the system will automatically assign a user ID and set all other values according to the default.

Activate Receive System Mail if you want any kind of system notifications to be delivered to this user's mailbox. This creates a mail alias for root and the user can read the system mail without having to first log in as root.

…]

OR in the version of the manuals before the expanding, revamping and restructuring of them

Documentation >
Documentation for Previous openSUSE Versions | Section openSUSE 11.3 >
openSUSE Start-Up (Publication Date 28 Mar 2011) >
Chapter 1. Installation with YaST >
1.11. Create New User >

…]
Receive System Mail

Checking this box sends messages created by the system services to the user. These are usually only sent to root, the system administrator. This option is useful for the most frequently used account, because it is highly recommended to log in as root only in special cases.

The mails sent by system services are stored in the local mailbox /var/spool/mail/username, where username is the login name of the selected user. To read e-mails after installation, you can use any e-mail client, for example KMail or Evolution. 

…]

But I have the suspicion that I have not really understood all of this function (and how it is working/it is to be made working so that it is making sense:
The user for whom is not ed that option has no file /var/spool/mail but for the other users the text stored in that directory seems to me not really interesting/pointing to a functioning system mail receiving/storing:

…]
From root@linux-…].site Fri Mar 4 11:05:00 2011
Return-Path: <root@linux-…].site>
X-Original-To: root
Delivered-To: root@linux-…].site
…]
Subject: cronjob@linux-…].site - daily - FAILURE
…]

puzzled pistazienfresser
(Martin)

Hi Martin,

Thank you for all the links to the documentation. I have taken a few minutes to have a quick skim through to see if there may have been something that I had previously missed.

But, like you, I am puzzled!

I use my system as a user who has the checked for “Receive System Mail” for many months and I have never seen a mail message from my system? I’m sure that I have had enough problems to warrant a message or two?
With the help of the other Martin (thread #5 - I think?), I have run mail as both a user and root. Both environments return “No mail for <username>”.

Looking in /var/spool/mail/… shows no sign of a directory matching a username?

Lastly, which service is it that will be sending these system messages? I have confirmed that neither Postfix or Sendmail services are running.

Regards, Martin

On 2011-03-28 15:06, martinprowe wrote:

> Lastly, which service is it that will be sending these system messages?
> I have confirmed that neither Postfix or Sendmail services are running.

One of them have to be running.

As root, run in a terminal “rcpostfix start”, and in another terminal
“tailf /var/log/mail” to see if there are errors. You should not need to
configure anything.

Log into a terminal as any user (or root) and type “mail otherusername”. It
will prompt for a subject line, then the contents. The mail is fnished and
sent when you type a lone dot at the start of an empty line.

You should see the email being sent in the log that is openened on another
terminal; entering “mail” in a terminal of “otherusername” you should see
the email.

Finally, run “chkconfig postfix on” to leave it on always, as it should.
Then you should get system mail from commands like “cron”.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-03-28 12:24, martin_helm wrote:

> I am pretty sure you can configure your email client to use that mbox format
> also if you are able to locate where the file is stored (I really simply do
> not remeber).

Most clients have somewhere a help on how to receive system email.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

In/from
Michael Kofler: Linux 2001 : Debian, Ferora, openSUSE, Ubuntu, 10. Auflage, München; Boston, Mass. : Addison-Wesley 2011 , ISBN 978-3-8273-3025-3 see d-nb.info, Seite (page) 168-170 (de)
or
online in the same book from the previous year
Linux 2010: Debian, Fedora, openSUSE … - Google Bücher
page 159-160 (de)

is something written about installing an “E-Mail-server (MTA)” (MTA -> message transfer agent | en:Wikipedia, mta, mail transfer agent[2], mta or mail relay, and about sendmail and fetchmail.

Maybe I will test if I understood enough of it/will be lucky on my 11.4 system (which I going to reinstall in any way in the near future and would not make much trouble if it would become a bit ruined…)

Have a luck of fun,
Martin Seidler
(pistazienfresser)
;)]
(Maybe we with this given name should found a to be famous social group in this forums-> “The Martins”)
/;)]

Thanks (yet again) Carlos,

That was an excellent summery. Got it working in no time.
One last question. You mentioned “cron”. Do all system services send mail when in distress? Or (and I guess) is it - “it depends”!

Regards, Martin

On 2011-03-28 16:36, martinprowe wrote:
>
> robin_listas;2313598 Wrote:
>> Then you should get system mail from commands like “cron”.
>
> Thanks (yet again) Carlos,

Welcome.

> That was an excellent summery. Got it working in no time.
> One last question. You mentioned “cron”. Do all system services send
> mail when in distress? Or (and I guess) is it - “it depends”!

Yep - it depends :slight_smile:

Cron, at, are two that i remember. Smart, md daemons. When they have to
send long texts that do not fit as messages logs, mail is a solution. There
is also a security check script that sends daily, weekly and monthly
reports, if installed. Or mldonkey, can send an email when it fetches a file.

Time ago, YaST installation (DVD) sent emails with notes from rpm packages
just installed or upgraded - no more. I miss them.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-03-28 16:36, pistazienfresser wrote:
> Maybe I will test if I understood enough of it/will be lucky on my 11.4
> system (which I going to reinstall in any way in the near future and
> would not make much trouble if it would become a bit ruined…)

That’s the setup I use to send and fetch mail. It has advantages, but it is
not as easy as configuring thunderbird.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Dear Carlos!

Yes, even I seems to be able to follow it so it must be easy and well described.
Thanks a lot!!!

My remark had no relation to your description - just me being skeptical if I had understood all in the Kofler.
I had not read your messages from 16:03 before I sent mine from 16:15 (the one that you cited).
Do not know if it was the http<->nntp delay, me being slowly in searching things or me not looking for new messages between the beginning of writing and the sending of a message to avoid ‘infinite loops’ - but probably just all together.
So please pardon me (although I will not guarantee that it would not happen again :shame:).

Regards
Martin
(pistazienfresser)

On 2011-03-28 21:36, pistazienfresser wrote:

> So please pardon me (although I will not guarantee that it would not
> happen again :shame:).

No problem, I didn’t even notice :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)