How to safely download root mail from a Linux Server?
How to safely download root mail from a Linux Server?
Author
Discussion

TheExcession

Original Poster:

11,669 posts

281 months

Thursday 9th November 2006
quotequote all
What's the best way to deal with mail in the root account of a Linux Server.

I'd like to down load it to my desk-top email client (Thunderbird) but obviously since it is the root mail file the pop server refuses to allow access for UIDs less than 500 and GIDs less than 1.

So what to do?

Do I setup a different user and have all root mail delivered to that account? How to do this redirection?

Do I lower the GID and UID settings on the dovecot mail server? We do only allow connection via SSL so it is reasonably secure?

What are the security implications of these methods?

What do other people do?

Many thanks
Ex

fredf

267 posts

264 months

Thursday 9th November 2006
quotequote all
It's usual to have all root mail delivered to a normal users account.

The redirection is handled by the /etc/aliases file. On my system (standardish debian system) I have:
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: fredf

TheExcession

Original Poster:

11,669 posts

281 months

Thursday 9th November 2006
quotequote all
perfect.... thatworks a treat, thanks

Now, is there an easy way to forward all the existing root mail to my newly created account.

There are about 800 messages in the root account mail file.

fredf

267 posts

264 months

Thursday 9th November 2006
quotequote all
I've no sensible ideas but you could try renaming the root mbox file to your user account (In /var/mail or /var/spool/mail)

Edit: If you're read them they are saved somewhere in else (/root/mbox ???) try moving this to a user account

Edited by fredf on Thursday 9th November 11:14

TheExcession

Original Poster:

11,669 posts

281 months

Thursday 9th November 2006
quotequote all
perfect...

Can't believe I didn't think of that

thanks for your help

ThePassenger

6,962 posts

266 months

Thursday 9th November 2006
quotequote all
Depending on the mail system, just moving the files manually will do the job as well.