Operating System - HP-UX
1835375 Members
3501 Online
110078 Solutions
New Discussion

sendmail is working!!! but ..... one question ..

 
SOLVED
Go to solution
someone_4
Honored Contributor

sendmail is working!!! but ..... one question ..

I have sendmail almost working 100%.
You guys have seen my post about sendmail but I am almost done. Here is what I have done with allot of help form you guys.
1. I can send emails to my sendmail server from any client.
2. I can pick up thoose emails from an outlook express cleint.
3. I can send to my self or other users on the same mail server.
what I cant do now is send to other domains from my outlook cleint on the sendmail server.
I have sendmail Sendmail 8.9.3 (PHNE_18546
running on hpux11.
thanks
8 REPLIES 8
Shannon Petry
Honored Contributor
Solution

Re: sendmail is working!!! but ..... one question ..

Then I hate to say it, but sendmail is not setup properly..... :-(

Sendmail has to understand many things, first is it's role and what it does. Default configuration is to run "stand alone mode".

If you look at your sendmail.cf file in "/etc/mail" search for a string "class and you should see something like:
# class E: names that should be exposed as from this host, even if we masquerade
# class L: names that should be delivered locally, even if we have a relay
# class M: domains that should be converted to $M
CM root

Make sure first that CL is changed to CM. Now you can externally mail from sendmail.

Next consideration is DNS and routing. Can the box running sendmail resolv the mail hosts you are trying to send to? Can you traceroute there?

Some of these things seem to be overlooked by the New to Unix admin, especially from MS world where you only have options of adding and deleting programs and services.........

Can you post your sendmail.cf file?

Regards,
Shannon
Microsoft. When do you want a virus today?
someone_4
Honored Contributor

Re: sendmail is working!!! but ..... one question ..

Here is my sendmail.cf file.
I have made the changes that you posted.
But I still cant send mail out of my client.
DNS , I have to say I forgot about that.
How would I go about making sendmail talk to
a DNS server?
Shannon Petry
Honored Contributor

Re: sendmail is working!!! but ..... one question ..

First we'll talk about DNS.
1. If you already have a DNS server up on the network...
vi /etc/resolv.conf
add the next two lines, but the first is optional...
domain "yourdomain.name" # I.E. "domain hp.com"
# This is the optional line...
nameserver ip.of.ser.ver #Must be the valid IP of the DNS server...

2. If you don't have DNS up at all, well then it's time to register a name at Internic, and get DNS and BIND by O'Reilly and associates.

Item 2 is routing....
Do you have a router talking ether on a net to the servers you need to talk to? I.E. internet router for internet mail, router to intra/extra -net for internal/corporate mail servers?

This point is mute as we can not resolve names yet......If your server can not find out where mail for hp.com is supposed to go by the server(s) IP's then sendmail will not work....

If you are lost at this point, perhaps some consulting is in order....
Send me e-mail if that is the case.....


Regards,
Shannon
Microsoft. When do you want a virus today?
Dave Kelly_1
Respected Contributor

Re: sendmail is working!!! but ..... one question ..

Run the command:

mailq

This will show you what messages are currently in the sendmail queue to be processed or those messages that have been deferred.

If the messages have been deferred, there will be an error message listed with each line.

If the problem is related to host resolution, you should see some message about "name server timeout".

If you have DNS, you need to make sure that you have the file /etc/nsswitch.conf and that it contains the line:

hosts: dns (NOTFOUND=continue UNAVAIL=continue RETRY=continue) files

You should also see if there is an error generated when you run the command:

sendmail -v user@other.domain.com

Enter a full stop (.) and hit return, this will show how sendmail is trying to deliver the message and will give some indication as to what the problem is.

Also, Outlook Express is a POP/IMAP client which means that it sends messages by making a direct connection to port 25 on your mail server. You can test out the different addresses (local and non-local) by doing the following:

1) From the Start menu, select Run and enter the command:

telnet mailhost 25

where mailhost is the name of your mail server.

2) When the telnet window starts up, enter:

MAIL FROM: your.address@domain.com
RCPT TO: other.address@other.domain.com
DATA
Subject: Test Message

.


(Obviously means hit return)

This will "emulate" how Outlook talks to the mail server and will highlight any problems between the local and non-local addresses.
Dave Kelly_1
Respected Contributor

Re: sendmail is working!!! but ..... one question ..

An addendum to my last posting.

If you try the telnet command, before entering MAIL TO, you have to enter:

helo domain.com
someone_4
Honored Contributor

Re: sendmail is working!!! but ..... one question ..

I made a resolv.conf file and pointed it to DNS. I also made sure that every domain was in the right places per (sendmail.org)
And it is working!!!!!!!! YEAH FOR ME !!
I am not really sure how it works but now I am going to play with it. Im sure ill be back with more sendmail questions.
I have also talked to my boss and we are going to get a sendmail person to come in from HP.
But I got it to work thanks to everyone!
a round of 10s on me !
Shannon Petry
Honored Contributor

Re: sendmail is working!!! but ..... one question ..

Before you have the person from HP come in for sendmail, it may be more worthwile to have a person come in for DNS.
DNS has a specific mail format called "MX" records, or Mail Exchange records. This is why sendmail has to be able to find a proper DNS server to send to external domains. You could have previously sent mail to user@IP and it would have probably gotten there. However the MX record is used to send mail to user@domain.dom.

Two books may help you out. 1 I mentioned from O'Reilly and associates for DNS and Bind. This will give you the history and workings of DNS. Very good book. The second is Sendmail 8.9 also published by O'Reilly and associates. Again there is history, how-to's, etc... This book is probably more than you need initially, but great to have for the advanced sendmail person for quick reference and configuration information.

Glad you got it! :)

Shannon
Microsoft. When do you want a virus today?
someone_4
Honored Contributor

Re: sendmail is working!!! but ..... one question ..

Thanks for the advice. You really seem to knwo your stuff. And right now I am working of Oreilly 2nd Edition. But I am going to get
Sendmail 8.9. like you said. And I will also get the DNS book. Right now I do have my domain
registered and working though an external DNS server. I am kinda thinking that I have sendmail working but the way I have it working with rubberbands and bubblegum. I still have allot to learn I have been only working with sendmail for about 1 month now. It was not an easy config but the more time I spent with it the more I am understanding. Do you have another other resources and books that you can recommend for me? As far as the HP guy comming next week , there is nothing I can do about that. Maybe he can help me get some answers abotu some stuff. Can you maybe recommend some questions that I should ask or points that I need to be very clear about?
Once again thanks for all your help.