LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-23-2006, 09:11 PM   #1
tarheel92x
Member
 
Registered: Sep 2003
Location: Southeast USA
Distribution: CentOS
Posts: 111

Rep: Reputation: 15
Sendmail not sending mail


Redhat 9.0
Sendmail 8.12.8-4

I want to send root messages to an external email address. I have edited my /etc/aliases file and set:

root: myemail@domain.net

I then run newaliases.

Without changes to any files in /etc/mail, other than adding root to trusted-users, I can type the following at the command line (as root) and mail is delivered:

mail myemail@domain.net
(subject)test
(body) test
Ctrl+d
Ctrl+d

The message is sent with no errors in my /var/log/maillog.

My system messages are still going to root on the host rather than being forwarded to the external address. I want to send messages related to cron and at to that external account. Is there additional set up in the /etc/aliases file that I am missing?

TIA
 
Old 10-24-2006, 05:04 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I don't know sendmail well, but what does the maillog say?
 
Old 10-24-2006, 12:24 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 267Reputation: 267Reputation: 267
Quote:
Originally Posted by billmayday
I don't know sendmail well, but what does the maillog say?
Stated that nothing was logging to /var/log/maillog

Quote:
The message is sent with no errors in my /var/log/maillog.
What happens if you check the mail queue?

mailq

Shouldn't you be sending to root instead of your email address to test the forwarding to your ISP account? Also, is this server setup on a DHCP connection? If so, it could possibly be your ISP blocking this email.

And why are you running ctrl-d at the end.. doing something like this should email without problems:

Code:
mail -s "My Subject" root@localhost
<body text here>
.
You can also attach the body using EOF, etc.
 
Old 10-24-2006, 03:05 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Actually, I interpret what he says as:

Sending email to external user - no errors

Sending email to root, just goes to root not the alias.
 
Old 10-24-2006, 04:07 PM   #5
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
tarheel92x

I know this might sound really basic but you did restart sendmail after you made the changes ?

Pete
 
Old 10-24-2006, 04:43 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 267Reputation: 267Reputation: 267
Quote:
Originally Posted by Pete M
tarheel92x

I know this might sound really basic but you did restart sendmail after you made the changes ?

Pete
Shouldn't make a difference when dealing with aliases locally to forward or point to a different address.
 
Old 10-27-2006, 01:29 AM   #7
tarheel92x
Member
 
Registered: Sep 2003
Location: Southeast USA
Distribution: CentOS
Posts: 111

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday
Actually, I interpret what he says as:

Sending email to external user - no errors

Sending email to root, just goes to root not the alias.
Well, sending externally from root works okay, however system messages (ssh logs, etc.) are not being forwarded to my external mail but still going to root's mailbox.

Do I need to edit my alias?
 
Old 10-27-2006, 01:30 AM   #8
tarheel92x
Member
 
Registered: Sep 2003
Location: Southeast USA
Distribution: CentOS
Posts: 111

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid
Stated that nothing was logging to /var/log/maillog



What happens if you check the mail queue?

mailq
It says "Total requests: 0".

Last edited by tarheel92x; 10-27-2006 at 01:33 AM.
 
Old 10-27-2006, 04:44 AM   #9
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
A couple of thoughts.

1. Is there another alias for root perhaps?

2. Try setting an alias for another name to your external account and see if sending a message to that get sent on.

3. If you send an email to root from another source (ie not cron) does it work?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Sendmail - not sending mail movitto Linux - Software 9 09-19-2014 03:23 AM
sendmail not sending mail dtra Linux - Software 1 06-09-2005 07:47 PM
sending picture with mail/sendmail ziox Linux - Networking 1 01-17-2005 11:56 AM
Sending mail without sendmail geomonap Linux - Security 2 12-21-2004 01:32 AM
sendmail not sending mail clinger Linux - Software 8 07-30-2004 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:51 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