Kmail, Akonadi and user root

Hello,

1°) Akonadi can’t run when log as user root due to mysql protection :

[akonadiserver] Found mysql_install_db:  "/usr/bin/mysql_install_db"
[akonadiserver] Found mysqlcheck:  "/usr/bin/mysqlcheck"
[akonadiserver] Database process exited unexpectedly during initial connection!
[akonadiserver] executable: "/usr/sbin/mysqld"
[akonadiserver] arguments: ("--defaults-file=/root/.local/share/akonadi//mysql.conf", "--datadir=/root/.local/share/akonadi/db_data/", "--socket=/root/.local/share/akonadi/db_misc/mysql.socket")
[akonadiserver] stdout: ""
[akonadiserver] stderr: "110721 22:13:23 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
[akonadiserver] 
[akonadiserver] 110721 22:13:23 [ERROR] Aborting
[akonadiserver] 
[akonadiserver] 110721 22:13:23 [Note] /usr/sbin/mysqld: Shutdown complete
[akonadiserver] 
[akonadiserver] "
[akonadiserver] exit code: 1
[akonadiserver] process error: "Unknown error"

2°) Kmail seems to need Akonadi

So how to configure Kmail to read and delete local mail sent by other users or by system or apps ?

On 2011-07-21 23:36, jcdole wrote:
>
> Hello,
>
> 1°)AKONADI_CAN’T_RUN_WHEN_LOG_AS_USER_ROOT_DUE_TO_MYSQL_PROTECTION:

Do not log in as root.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

All these programs/tools of te Desktop Environment are made for normal users to run them. Never use them as *root. *Like Carlos says, NEVER log in as root in the GUI (and almost never in the CLI for that matter).

Hello.
Do you mean that in the third millenium, we have to manage linux server in text mode like fifty years ago ?

So how to read and delete local mail sent by other users, by system or by apps ?

On 2011-07-26 23:56, jcdole wrote:
>
> Hello.
> Do you mean that in the third millenium, we have to manage linux server
> in text mode like fifty years ago ?

No. Which doesn’t mean that you need to log in as root. Ever. Never.

> So how to read and delete local mail sent by other users, by system or
> by apps ?

Mail sent to root is redirected to a plain user. Root gets nothing.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

> Do you mean that in the third millenium, we have to manage linux server
> in text mode like fifty years ago ?

no, not at all…but, do not manage any linux/unix/aix/bsd server (or
desktop machine) by logging into the GUI as root…never!

log in as a plain user and then “become root” by using root powered
applications (like YaST, or File Manager Superuser Mode, or
kdesu/gnomesu kwrite, or opening a terminal and use “su -” to become
root, or or or…but never do it the zero-security-Microsoft-way of
logging into the GUI as root/superuser/Administrator etc…

it really is pretty simple to do it correctly, safely and securely–lots
more on that here:

http://tinyurl.com/593e4c
http://tinyurl.com/ydbwssh
http://tinyurl.com/6bo2cqg
http://tinyurl.com/4nsaqst
http://tinyurl.com/665h5ek
http://tinyurl.com/6ry6yd
http://tinyurl.com/DD-on-Root


DD
openSUSE®, the “German Engineered Automobiles” of operating systems!

On Wed, 27 Jul 2011 04:23:06 +0530, Carlos E. R.
<robin_listas@no-mx.forums.opensuse.org> wrote:

> On 2011-07-26 23:56, jcdole wrote:
>>
>> Hello.
>> Do you mean that in the third millenium, we have to manage linux server
>> in text mode like fifty years ago ?
>
> No. Which doesn’t mean that you need to log in as root. Ever. Never.
>
>> So how to read and delete local mail sent by other users, by system or
>> by apps ?
>
> Mail sent to root is redirected to a plain user. Root gets nothing.
>

it is if you agree to the default option when creating the first non-root
user during installation. otherwise one has to edit /etc/aliases, add a
normal user as an alias to root & run “newaliases” afterwards.


phani.

On 2011-07-27 09:29, phanisvara wrote:
> On Wed, 27 Jul 2011 04:23:06 +0530, Carlos E. R. <> wrote:

>> Mail sent to root is redirected to a plain user. Root gets nothing.
>>
>
> it is if you agree to the default option when creating the first non-root
> user during installation. otherwise one has to edit /etc/aliases, add a
> normal user as an alias to root & run “newaliases” afterwards.

Exactly :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Sorry guys,

But I don’t think that the root-issue is really the question here, even if the security advice is important.

Let’s just assume JCD sets up his config so that the system mails are being sent to his normal user account.

The question remains:

So how to configure Kmail to read and delete local mail sent by other users or by system or apps ?

I have tried it - a feeble attempt - and failed. I’d really like to know if/how that is possible especially for Kmail.

cu

kasi

One way is this:

  1. install cyrus-imapd and start the service
  2. install Postfix and configure it with Yast to send root mail to a normal user, adjust fetchmail to be started as a daemon and use as method of delivery “to cyrus imap sever”
  3. install fetchmail and fetchmailconf; use fetchmailconf as normal user to generate a config file that uses the imap server(never used kmail for local mail i use alpine, so this step may be optional)
  4. configure Kmail to use the imap server and retrieve mail

Another easy way (at least for me) is this one:

  1. install procmail
  2. install Postfix, set the local user for mail, use method of delivery “procmail”
  3. install alpine and enjoy the good ol` CLI way of reading local email.

Your choice :slight_smile:

Thank you very much everybody.

:good:

On 2011-07-27 12:46, kasi042 wrote:
>
> Sorry guys,
>
> But I don’t think that the root-issue is really the question here, even
> if the security advice is important.

It might not work for root. I know of some mail tools that simply will fail
in that case. That’s why I said not to use root.

> Let’s just assume JCD sets up his config so that the system mails are
> being sent to his normal user account.
>
> The question remains:
>> So how to configure Kmail to read and delete local mail sent by other
>> users or by system or apps ?

As I don’t use kmail nowdays, I don’t remember. But time ago I read how to
do it in kmail online help. I hope it is still there and works.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Same from me. I’ll try the imapd-solution when I find some time.