LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-29-2003, 01:07 PM   #1
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Rep: Reputation: 15
stop sending internal mail to root?


If this has already been addressed, please forgive me (and link me to the thread .

How do I get my rh9 linux box to stop sending messages (such as cron job outputs, etc) to /var/spool/mail/root? I hate that. Is there some setting where I can have all of those message mailed to a real email account? Or turned off all together? I'd like to know how to do both.

I did some reading on cron, and I know about the MAILTO= thing, but when I put in MAILTO=whatever@foo.com, it never actually mails it there.

So how do I redirect these internal messages?

Last edited by paperdiesel; 10-29-2003 at 01:14 PM.
 
Old 10-29-2003, 03:30 PM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You can edit your /etc/aliases file and specify to which real user account (yours, I suppose) you want the mails to go to. To make sure the changes take effect execute the command newaliases when you're done.

Here are a couple of lines from my aliases file:
Code:
postmaster: root
root: hw

daemon: root
bin: root
sys: root
sync: root
games: root
man: root
lp: root
mail: root
...and it goes on and on.

Håkan
 
Old 10-29-2003, 03:37 PM   #3
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
You mean I can replace one of these with an email account?

e.g. instead of
postmaster: root

I can do
postmaster:myname@foo.com?
 
Old 10-30-2003, 02:27 AM   #4
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
no, the postmaster must be root in order to let sendmail working properly.
You can use procmail to do those things. It is very easy to use
 
Old 10-30-2003, 05:56 AM   #5
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
Wait, so I SHOULDN'T edit the aliases file? I should use procmail instead?

I'm so confused...
 
Old 10-30-2003, 07:14 AM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Leave the existing stuff alone and go to the bottom of the file /etc/aliases to where you might see the following example....
# Person who should get root's mail
#Root: marc

Just add your entry without the ( # ) as that part causes the file to ignore anything after it.
For example:
Root: bob@yahoo.com

Then run the command: newaliases

Of course it also helps if the sendmail service is started.
Check that with the command: service sendmail status
You can start it from the command line: service sendmail start
or bring up a GUI tool with the command:
redhat-config-services where you can find sendmail and a bunch of other stuff.
 
Old 10-30-2003, 07:28 AM   #7
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
Excellent, thank you. One quick follow regarding sendmail:

How do I get it to work . I notice that whenver I try to send a message using sendmail, it gets turned back with this error message:

----- Transcript of session follows -----
... while talking to flmx04.mgw.rr.com.:
>>> MAIL From:<root@localhost.localdomain> SIZE=328
<<< 553 5.1.8 <root@localhost.localdomain>... Domain of sender address root@localhost.localdomain does not exist
501 5.6.0 Data format error

--h9UDR1dx005841.1067520421/localhost.localdomain
Content-Type: message/delivery-status

Reporting-MTA: dns; localhost.localdomain
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Thu, 30 Oct 2003 08:26:10 -0500

Final-Recipient: RFC822; edited@email.addy
Action: failed
Status: 5.1.8
Diagnostic-Code: SMTP; 553 5.1.8 <root@localhost.localdomain>... Domain of sender address root@localhost.localdomain does not exist
Last-Attempt-Date: Thu, 30 Oct 2003 08:27:01 -0500

I haven't touched any sendmail configuration since I installed rh9 (because I don't know what to do). help!

Last edited by paperdiesel; 10-30-2003 at 07:39 AM.
 
Old 10-30-2003, 07:51 AM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I think your ISP is bouncing it because of the seemingly bogus name root@localhost.localdomain
You may have better luck if you change the host name and domain.
Edit the file /etc/hosts but be sure to leave the localhost entry alone as your system needs that.
For example......
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.1 server.mydomain.com server

Also, on my machine I have a DNS server setup.

Last edited by homey; 10-30-2003 at 07:52 AM.
 
Old 10-30-2003, 07:56 AM   #9
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks. Forgive my ignorance, but what should I fill it in as? And do I need to reboot after I edit that file?

I have a cable connection from roadrunner (tampabay.rr.com) that comes in to my router, which then feeds my computers in my house.

Should I set up a DNS server? Or is that too much for what I want to do?

I'm assuming I should edit the /etc/hosts file to be something like this:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.1 tampabay.rr.com server

Is that right? Or even close?
 
Old 10-30-2003, 08:04 AM   #10
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Your example is more complicated than needs to be. You don't have to use a real domain name. Just using mydomain.com is good enough unless you are in a corporate type network.
Try it with just the host file changes and if that doesn't work you may consider setting up DNS which a whole nother story.

By the way; if you do want to set up stuff like DNS , DHCP or other services, the tool called Webmin is great!
 
Old 10-30-2003, 08:17 AM   #11
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
Dunno if this matters or not, but when I start up linux, it says "localhost localdomain" above my text login, even though my internet connection is live. Do I need to fix this first? And do I need to reboot the machine or make ANY changes to any sendmail configuration files?
 
Old 10-30-2003, 08:26 AM   #12
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
Btw, still a no-go. Here is my /etc/hosts file:

[root@localhost root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.1 server.mydomain.com server

Here is what gets bounced back:
----- Transcript of session follows -----
... while talking to ms-smtp-03-smtplb.tampabay.rr.com.:
>>> MAIL From:<root@localhost.localdomain> SIZE=356
<<< 553 5.1.8 <root@localhost.localdomain>... Domain of sender address root@localhost.localdomain does not exist
501 5.6.0 Data format error

--h9UENjfj002024.1067523825/localhost.localdomain
Content-Type: message/delivery-status

Reporting-MTA: dns; localhost.localdomain
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Thu, 30 Oct 2003 09:23:42 -0500

Final-Recipient: RFC822; edited.email@address.com
Action: failed
Status: 5.1.8
Diagnostic-Code: SMTP; 553 5.1.8 <root@localhost.localdomain>... Domain of sender address root@localhost.localdom
ain does not exist
Last-Attempt-Date: Thu, 30 Oct 2003 09:23:45 -0500
 
Old 10-30-2003, 08:29 AM   #13
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
If you make the changes in /etc/hosts the login prompt should change. Also, you could add the new hostname and domain in the GUI tool redhat-config-network under the Hosts tab.
It wouldn't hurt to reboot but you don't always have to reboot like being in MS.

By the way, the ip address I used in the example may not be yours...
Check to see what that is with the command: ifconfig eth0 . Change that eth0 to eth1 or whatever you have then use that ip address information in the hosts file.

Off to work
ta ta

Last edited by homey; 10-30-2003 at 08:31 AM.
 
Old 10-30-2003, 08:33 AM   #14
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
I'll try that GUI tool when I get home (i'm connected to it on an ssh pipe right now). I did edit the /etc/hosts, even rebooted, and still have that [root@localhost root] prompt. What gives? Should the /etc/hosts file be something like:
192.168.1.1 instead of 192.168.0.1 because I'm using a router?
 
Old 10-30-2003, 08:46 AM   #15
paperdiesel
Member
 
Registered: Oct 2003
Location: southern cali
Distribution: fedora core 4
Posts: 79

Original Poster
Rep: Reputation: 15
WORD!

Thanks homey, that last part of your post did the trick. Dude thanks so much for the help. Finally someone willing to help me out as opposted to the "RTFM!" geeks. I spent two days reading howto's, etc, and got all kinds of turned around remaking sendmail.cf, etc.

Thanks again man.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal mail samal Linux - Networking 4 03-01-2004 01:51 AM
internal mail only mchanea Linux - Networking 0 02-11-2004 08:54 AM
Postfix relaying mail to internal mail server tradecraft1 Linux - Networking 2 10-28-2003 03:01 PM
internal mail problem Thomas_Delrue Linux - Newbie 0 01-29-2002 11:40 AM
Internal e-mail Reccomendations? Michael Jones Linux - Distributions 0 01-18-2002 01:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration