General
cancel
Showing results for 
Search instead for 
Did you mean: 

sends local mail but not internet mail

sends local mail but not internet mail

Hi folks, my machine is sending email within the company correctly but I don't know how to configure sendmail to send out to the internet. I don't have a direct connection from my machine, but I'm told I could send the mail to another machine which can send out to the internet.
What do I need to configure in my sendmail.cf to make this work?

Thanks in advance,

mike
5 REPLIES
Dave La Mar
Honored Contributor

Re: sends local mail but not internet mail

Mike -
Look at the masquarade parm in sendmail.cf
Note below which was set to our internal mail server.
After the change stop/start sendmail. i.e.
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

# masquarade as, aka site hiding(null for no masquerading)
DM gottschalks.com


Best of luck,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Sanjay_6
Honored Contributor

Re: sends local mail but not internet mail

Hi Mike,

I think you should try and setup a relay if you have a relay within your company. You server will submit all emails to this relay server which in turn would send it to the company mail servers.

Try this link below on how to setup the server to relay mails to a relay server,

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063236232

Use the DS Macro.

Hope this helps.

Regds
Ashwani Kashyap
Honored Contributor

Re: sends local mail but not internet mail

In your sendmail.cf file there will be an entry for smart relay host or just relay host and it begins with DS .

Put an entry like this
DS name_of_your_relay_host.company.com .

The restatrt your sendmail daemon .

THen you should be able to send mails out side.
Michael Tully
Honored Contributor

Re: sends local mail but not internet mail

Edit your /etc/mail/sendmail.cf file

Add this line, you will have an example anyway, so look for 'DS'

e.g.
DS mydomain.com (put your domain here)

Save the file

Stop and restart sendmail

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Anyone for a Mutiny ?
Khalid A. Al-Tayaran
Valued Contributor

Re: sends local mail but not internet mail

Hi Mike:

Try this solution:

Here is what I did to configure sendmail in Unix to send mail to an exchange server.

1) In the /etc/mail/sendmail.cf file: I added in the Dj macro our doman name

2) Also in the same file, I added in the DS macro the IP address of the relay server (since we are not using DNS on Unix)

3) In the /etc/hosts I added
IP_address host_name

4) Restarted sendmail:
/sbin/rc1.d/K460sendmail stop
/sbin/rc1.d/S540sendmail start

BUT THAT DID NOT WORK YET!

Next, I did what Keith Johnson mentioned in this thread. To create a file "/etc/nsswitch.conf" with the line:
hosts: files [NOTFOUND=continue]

and sendmail surprisingly worked. !!

I didn't understand this yet. But that's the end of story.

Thanks to all again........

You can find more at:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1706237a4bc6d611abdb0090277a778c,00.html

and
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc4c96af52b04d5118fef0090279cd0f9,00.html

Regards,,,,,,