LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-28-2004, 09:15 PM   #1
bdoster
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
sendmail problems


Running redhat 8.0. I'm trying to send mail to 3 accounts via a script run as a cron job as root. The mail lines are similar to:

echo "$list" | mail -s "My List" myaccount@mydomain.com
echo "$list" | mail -s "My List" account2@domain2.com
echo "$list" | mail -s "My List" account3@domain3.com

'mymyaccount@mydomain.com' is serviced by another mail server in the same domain as the host running the script. 'myaccount' exists on the local host and in the mail server servicing mydomain.com. Here's what happens...

1) With sendmail running as a server, the 2 mails to foreign domains are delivered OK, but the mail to 'myaccount' is delivered to the local machine and not the desired email server.

2) If I send to a different account in mydomain.com, the mail bounces with 'unknown user' errors as the account doesn't exist locally.

3) If I reconfigure sendmail to act as a client by configuring the 'SMART_HOST' in sendmail.cf, the correct server is used for 'myaccount', but then 'unable to relay' errors are generated for both "foreign" accounts.

I've tried various relay settings and creating /etc/mail/relay-domains, all to no avail. I'm fumbling in the dark though as I don't know sendmail well at all. Guidance in getting the mail to all 3 accounts would be appreciated. I don't care if sendmail acts as a server or a client, as long as the above works as desired. TIA,

bd
 
Old 10-29-2004, 12:12 AM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
If all of mydomain.com mailboxes exist on the other mail server, you can add an entry to the mailertable to overide MX lookups for that domain name. Example:

# cat /etc/mail/mailertable
mydomain.com smtp:[mail.mydomain.com]

The above would relay all e-mail for anyone@mydomain.com to mail.mydomain.com. All other domains would be delivered normally. If you are just wanting a single user to be relayed look at using the /etc/aliases file.
 
Old 10-29-2004, 02:24 PM   #3
bdoster
LQ Newbie
 
Registered: Oct 2004
Posts: 2

Original Poster
Rep: Reputation: 0
That was perfect. Thank you very much!
 
  


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 problems stouffej Red Hat 4 02-04-2005 11:39 PM
Problems with sendmail... @ngelot Linux - Software 4 11-17-2004 04:06 AM
problems with sendmail baczer Slackware 0 07-23-2004 02:20 PM
problems with sendmail JLDixon Linux - Software 8 03-13-2004 02:57 PM
Sendmail Problems wolfwitch Linux - General 2 11-11-2003 10:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration