Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-14-2012, 07:19 PM
|
#2
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
I'd check OS versions, update levels and env settings eg locale.
Maybe mail is symlinked to something else like mailx, nail etc
|
|
|
|
11-15-2012, 05:21 AM
|
#3
|
|
Member
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 574
Original Poster
Rep:
|
On the working server, this is the situation :
-rwxr-xr-x 1 root mail 84856 jan 7 2007 mail
lrwxrwxrwx 1 root root 4 nov 16 2011 mailx -> mail
On the not-working server, this is the situation :
lrwxrwxrwx. 1 root root 5 okt 10 15:07 mail -> mailx
-rwxr-xr-x. 1 root root 378784 aug 22 2010 mailx
|
|
|
|
11-15-2012, 07:50 PM
|
#4
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
Well, there you go  , you're actually using 2 different 'mail' programs.
In fact, in mailx, the -f switch says
Quote:
-f [file]
Read in the contents of the user's mbox (or the specified file) for processing; when mailx is quit, it writes undeleted messages back to this file. The string file is handled as described for the folder command below.
|
which is not what you want.
Either use the same prog on both systems OR use the correct flags in each case.
|
|
|
|
11-16-2012, 01:45 AM
|
#5
|
|
Member
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 574
Original Poster
Rep:
|
Chris,
is there an easy way to switch to using the mail-command also on server 2 ??
How can I reverse the symlink ?
|
|
|
|
11-18-2012, 08:24 AM
|
#6
|
|
LQ Newbie
Registered: Mar 2006
Posts: 5
Rep:
|
I'm not Chris, but I'm going to take a shot at this anyway.
"is there an easy way to switch to using the mail-command also on server 2 ??"
Yes. Remove the link on the second, "non-working" server that points the mail comand to mailx.
This will only work if the program "mail" is installed on the non-working server.
And it probably isn't. That's why there is a link from the command mail to the program mailx.
So my suggestion is to use mailx on the "non-working" server and mail on the other one.
Or, you can install mail on the second server.
Or (my preference, all other things being equal) you can install mailx on the first server and then only use mailx.
HTH, Jim
|
|
|
|
11-25-2012, 03:25 AM
|
#7
|
|
Member
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 574
Original Poster
Rep:
|
How do I install the program "mail" ?
What I have installed is sendmail and mailx.
When I remove mailx on the second server, there is no mail-command also.
I have re-installed sendmail and mailx in different sequences, but I do not get the situation as on the working server.
|
|
|
|
11-26-2012, 01:09 AM
|
#8
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
Quote:
|
When I remove mailx on the second server, there is no mail-command also.
|
That's because mail, is just a symlink on that system to mailx. If you remove mailx, obviously there's no mail(x) program to use.
Just install mailx on both and check you've actually got mailx as a program, not a symlink.
Maybe its a version issue; can you tell us what versions of Centos you have.
On my Centos 6.3, the default install is mailx as the real program and mail as a symlink thereto.
Last edited by chrism01; 11-26-2012 at 07:24 PM.
Reason: typo
|
|
|
|
11-26-2012, 08:28 AM
|
#9
|
|
Member
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 574
Original Poster
Rep:
|
You could be right.
Working CentOS : v5.8
Not-working CentOS : v6.3
I would like to use the simpel mail-command on both, not the mailx-command.
Is that possible ?
|
|
|
|
11-26-2012, 07:31 PM
|
#10
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,262
|
A quick look through my 6.3 implies mail is no longer available
Code:
yum search mail
yum info '*mail*'
FYI in mailx the switch you want is -r http://linux.die.net/man/1/mailx
Feel free to try those cmds on both your systems.
You can always check the Centos site and look into the rpm downloads to double check.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:37 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|