LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-06-2005, 05:48 PM   #1
RedHat123
Member
 
Registered: Dec 2001
Posts: 60

Rep: Reputation: 15
another sendmail question, internal name


I need help setting up sendmail for only internal delivery. Im using a webserver and one of the php scripts sends out an email. I need to send email to some user at this internal address such as joeuser@testwerks.com.

say i want to have a webserver that is internal to my network (behind a router & firewall) and i want to use a name like testwerks.com and resolve to an internal ip address. so can i set something like this in /etc/hosts
192.168.2.xxx testserver.com

what sendmail changes do i need ?
 
Old 04-07-2005, 06:33 AM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
If I understand your post correctly, you're NOT going to setup a DNS server. If thats the case, then you will probably want to use sendmails mailertable feature to establish an MX record for your domain.

1) edit /etc/mail/mailertable and add:
mydomain.com esmtp:[mail.mydomain.com]

2) add mail.mydomain.com to /etc/hosts file

3) Rebuild mailertable database
# cd /etc/mail
# make

4) test
 
Old 04-07-2005, 11:31 AM   #3
RedHat123
Member
 
Registered: Dec 2001
Posts: 60

Original Poster
Rep: Reputation: 15
ok, im getting closer, but still not there as no mail is showing up when i log in as the user who is supposed to be gettign the mail. ive done what you mentioned above with the only difference is that im using billybob.swerks.com instead of mail.swerks.com

/etc/mail/mailertable
swerks.com esmtp:[billybob.swerks.com]

/etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.0.1 billybob.swerks.com billybob

then i send a mail to a user cust1
mail -s "test cust1" cust1@swerks.com "hello cust1"


when i send a mail to a user such as cust1, the log in as cust1 i never get the the mail, then when i look at maillog i see these lines
Apr 7 11:27:59 billybob sendmail[11954]: j37GRwHl011954: from=root, size=56, class=0, nrcpts=3, msgid=<200504071627.j37GRwHl011954@billybob.swerks.com>, relay=root@localhost
Apr 7 11:27:59 billybob sendmail[11954]: j37GRwHl011954: to=hello,cust1, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=90056, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
 
Old 04-07-2005, 02:28 PM   #4
RedHat123
Member
 
Registered: Dec 2001
Posts: 60

Original Poster
Rep: Reputation: 15
well, i had to reinstall sendmail because i had hosed up my sendmail.mc file and didnt back it up like a doofus. let this be a lesson - always backup a config file (esp sendmail stuff) before monkeying with it




after re-installing sendmail to get my original sendmail.mc file back, i made the change to my mailertable file and wha-la, im sending mail to users at my fake/internal domain name

yaaaay!

Last edited by RedHat123; 04-07-2005 at 02:57 PM.
 
Old 04-08-2005, 11:09 AM   #5
RedHat123
Member
 
Registered: Dec 2001
Posts: 60

Original Poster
Rep: Reputation: 15
i can send mail from a shell, but not via apache / php. the maillog shows the mail as being sent, but when i log in as that user, the mail isnt there
 
Old 04-08-2005, 03:25 PM   #6
RedHat123
Member
 
Registered: Dec 2001
Posts: 60

Original Poster
Rep: Reputation: 15
===

Last edited by RedHat123; 04-09-2005 at 06:48 AM.
 
  


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
sendmail for internal network and network config questions RedHat123 Linux - Networking 0 04-06-2005 03:15 PM
A internal modem question phatboyz Linux - Hardware 0 05-28-2004 10:07 AM
Internal Mail Server Question Breezwell Linux - Software 4 01-24-2004 07:25 PM
Sendmail unable to send to internal addresses Nico Linux - Networking 3 09-19-2003 06:03 PM
smtp internal network 192.168.x.x sendmail sloboda Linux - Networking 0 10-03-2001 04:41 PM

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

All times are GMT -5. The time now is 07:11 AM.

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