LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to get root mail? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-root-mail-163834/)

nepcw 03-29-2004 01:46 PM

How to get root mail?
 
when i log onto my server through ssh and su - to root and run the mail command i see there are over 125 emails there.
how do i download them to my outlook client?
I have tried all possible combos but it just doesnt seem to work.
Any ideas?

skel 03-29-2004 01:51 PM

you need a pop3 or imap server installed on your mail server in order to download to an email client.

nepcw 03-29-2004 02:01 PM

I have a dedicated server with a company and I have setup multiple sites on it. They all have mail servers on them and I can get mail from them no problem.
The address to the main server is server1.nepcw.com and I have tried every combo I can think of to download the root mail but no luck.
I can get mail from nepcw.com no problem, im just stuck getting the mail from root@server1.nepcw.com.
Does this mean that main server doesn’t have mail server on it? Im just a confused newbie.

zombyLINUX 03-29-2004 02:02 PM

You can setup your mail client to use imap or pop3 to communicate with the mailserver. I think you can also get all your mail in /var/mail/<username>. You could copy this to a file and put that on your system and I am sure there is some way to import that into outlook or have outlook process it. Or you could probably use pine or something equivalent. I am not so sure, just throwing suggestions out there...

skel 03-29-2004 02:12 PM

Quote:

Originally posted by nepcw
I have a dedicated server with a company and I have setup multiple sites on it. They all have mail servers on them and I can get mail from them no problem.
The address to the main server is server1.nepcw.com and I have tried every combo I can think of to download the root mail but no luck.
I can get mail from nepcw.com no problem, im just stuck getting the mail from root@server1.nepcw.com.
Does this mean that main server doesn’t have mail server on it? Im just a confused newbie.

Can you download the messages of another user from server1.nepcw.com
if not then it does not have the proper daemons. another way to check is telnet/ssh/login to the server and type
ps ax |grep pop3 and ps ax |grep imap

if anything (other than grep pop3 or grep imap) is displayed for either of those then you have the proper server
if something is displayed then you have the proper daemon running but probably cannot log in as root to the mail server.

but if you can receive email you probably have sendmail running, so you can forward the emails to another address/account
edit ~root/.forward and put another email address in there, then all emails will automatically be moved to a different account/address (they will not appear in the inbox of root)

so you could put your email address in the ~root/.forward and then all messages to root will be forwarded to your email address

nepcw 03-29-2004 02:41 PM

i dont have any users that use that address to download mail.
that is the name i gave the server when i signed up with the company.
i setup nepcw.com and i can get mail from mail.nepcw.com no problem.
When i log into the ensim panel of the main site there are no options to setup users, it is just to setup sites and site plans.
im just a little confused on what to do.
i tried to edit that ~root/.forward but i dont know where that is,lol. i would rather the emails be forwarded to my other account anyways.
when i type this i get the following:
[root@Server1 /]# ps ax |grep pop3
1596 pts/2 R 0:00 grep pop3
and
[root@Server1 /]# ps ax |grep imap
1598 pts/2 S 0:00 grep imap

nepcw 03-29-2004 02:55 PM

i just want to see what they all are about, make sure im getting any errors from the server ,,etc,,

skel 03-29-2004 03:03 PM

~root/ is a shortcut for the home directory for root, so it is most likely /root

looking at the results from your ps commands you do not have a pop3 or imap daemon running on that server.

so just edit the file /root/.forward on the server and add one line with the email address that you want them to be forwarded to.

it probably doesn't exist so you will have to create it.

to test, just send an email to root@server1.nepcw.com and it should show up in the inbox of your email account.

nepcw 03-29-2004 03:15 PM

so i have to create a file called '.forward' and in that file i put
test@test.com
and that is it? that will forward that mail to whatever i say?

skel 03-29-2004 03:16 PM

that's right

nepcw 03-29-2004 03:18 PM

why cant i ftp as root? should i be able to? i want to upload the file

skel 03-29-2004 03:23 PM

root should never be able to log in to an ftp server

nepcw 03-29-2004 03:29 PM

im having such a b@*tch of a time with vim editor. I can create the file, add the line i want, but have no idea how to save it!!
I dont have nano or pico so i cant use those. VIM is not user friedly

Genesee 03-29-2004 03:37 PM

hit ESC to go to command mode after editing

type ZZ to write and quit (those are capital letters)

nepcw 03-29-2004 04:40 PM

Thank you all for your help. I craete that file and it is there and it has just one line with a email address on it but it is still not working.
Also now i have a .forward.swp file and i dont know how to delete it. Do i have to use VIM or is there a command line option like del .forward.swp? Thanks again!


All times are GMT -5. The time now is 11:45 PM.