Link to home
Start Free TrialLog in
Avatar of kathotia
kathotia

asked on

Mailserver

I have Redhat Linux running on a server and 6 win95 nodes connected to it. File, Print etc. network services are working fine.

I have an internet account with my ISp and my email address is "xxxx@yyyy.zzz.in" All my email is being received in this address and reply address set in my mail client is alos the same. Currently I am using a win95 pc to do the mail
handling. User name: "xxxx@yyyy.zzz.in" password "qqqq"
for logging in.

Now I want the linux server should send and collect mail automatically every hour. All the mail collected should be sent to two users say "aaaaa" and "bbbbb" who have user accounts on the server. Moreover all users should be able to send mail to the outside world over internet with their reply address set as above. Using the Outlook Express mail clinet in their boxes.

The DNS of my ISP is 111.222.333.444 and alternate DNS is
555.666.777.888

IP setting of my server is 192.169.1.1 and IP to nodes are given dynamically by the DHCP range 192.168.1.10 -192.168.1.250

PPP connection using PPPD has being sucessfully setup along with login options. However even from the Server sendmail cannot send mail to outside world or fetchmail cannot retrieve mail from my ISP. It gives ups showing a message that it cannot resolve the server name in the email address given.

Request for the following solution.
1. Sendmail settings with the above information
2. Fetchmail Setting with the above information
3. DNS setting with the above information
4. Sample configuration files for the above

In the linux server Sendmail, POP3 has been installed with default setting. DHCP and DNS has also been setup by default.

The linux server is known as linux.kscpl.com in the network.
Avatar of alexbik
alexbik

Hi,

Did you put the ip addresses of your ISP's nameservers in
/etc/resolv.conf?

Alex
Avatar of kathotia

ASKER

YES I have put my ISP's DNS Ip in resolv.conf but still DNS does not seem to work.
DNS is working at all? In your linux box, is it possible to run nslookup and do name queries?
I have through trial and error detected that the DNS is not working properly. Other componenets have been set up correctly. Sendmail gives a message " Name Server timed out" and fetchmail gives message "unable to find name .....". I have read DNS howto thereafter and tried nslookup as stated therin after initiating a pppp link by running pppd with necessary parameters. ifconfig shows a valid and working ppp link working at ppp0. I am able to ping the remote ip address shown by the ipconfig. but i am not able to pind the DNS IP of my ISP as stated above. nslookup also fails to show any results when asked for anu other domain name outside my personal network.

I have checked all the files as per DNS howto but fail to find any error. If you want ot look up the said files kindly give your email address I will mail the files to you for study.

thanks for devting time to my problem.
 
If you cannot ping the DNS server using the IP address (not the name) then you have a routing problem.

Run "route -n" to see if you have a default gateway (address 0.0.0.0) to your ISP network. You also can use traceroute to see where you are stopping.

Check to see if you are starting pppd with the option "defaultroute".

You will never be able to use your DNS before you be able to ping your DNS.

I checked up with route -n and found that default route was not being replaced by pppd. I created a default route manually by giving the command
 /sbin/route del default
 /sbin/route add default gw $4 dev ppp0

After this route -n showed the necessary gateway and every thing worked fine. However it seems that pppd is not calling and running ip-up which in turn calls ip-up.local wherein I have put up the above two commands. So I have to manually give the commands every time i run pppd. moreover since ip-up is not executed i am not able to know whether ppd has been successful or not in getting through.

Kindly advise
Thanks again for showing the light

Hopefully,
 "IP setting of my server is 192.169.1.1 and IP to nodes are given dynamically by the DHCP range 192.168.1.10 -192.168.1.250"
is a typo, otherwise your clients are on different networks to your server. Which will require further routing table entries.
Things to do to solve problem are:
Setup named (DNS) to be a caching nameserver, point to 127.0.0.1 in /etc/resolv.conf. Use diald to initiate dial on demand pppd, it can use all the existing pppd options in its config files.If you insist on manual dial, as fmismetti said, use the defaultroute config switch to make this interface the default route.
If your ISP can support SMTP delivery to you, you can then use sendmail to receive all e-mail for yyyy.zzzz.in domain, ie anybody@yyyy.zzzz.in. If they do, they may do this by forwarding mail to you when you dial in, or you may need to use the SMTP command ETRN yyyy.zzzz.in to inititate the transfer. For this to work you need to get your ISP to make your host name the primary MX for the domain. This will require a static IP address from them. To get your mail to retrieve every hour you could set up a shell script to send ETRN yyyy.zzzz.in to SMTP port (25) on your ISP mail server every hour by scheduling its execution with cron. Hopefully you can find out the config, otherwise I'll need to spend ages finding appropriate config files for you. Let me know !
Py problem presently after allthe experimenting and corrections is to setup the default route automatically ecah time I dial. the dettinf "defaultroute" in options file fails to replace the existing defaultroute pointing to eth0. I have to manually set the default route ot ppp0 which i want ot automate. Rest of my problems has been solved. Kindly go throuhg my last comment for details.
ASKER CERTIFIED SOLUTION
Avatar of irp
irp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial