LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 04-06-2011, 09:59 AM   #1
h.haider
LQ Newbie
 
Registered: Apr 2011
Location: Pakistan
Distribution: Centos, Fedora, Redhat, ubuntu, debian
Posts: 17

Rep: Reputation: 0
Red face how to use sendmail as smtp server instead of my isp smtp server


Hi to all

this is my first thread on this forum


My problem is that my isp's smtp service is very poor

so i want to configure my own smtp servr for my internal clients only for sending emails not receiving

i have static ip on my router with 25 port forward
i have configure sendmail on linux its working fine on local network mean its sending email on local domain
now i want to send emails on other external domains with my public ip
Mean user of mydomain.com should be able to send emails on all internet domains like yahoo.com, hotmail.com etc....

so what should i do for this setup
its urgent plz help........!
 
Old 04-06-2011, 11:18 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,909

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Hi,

Did you try to send an email to an outside domain like yahoo and see what happens?
By default sendmail can send emails to the internet, so if you have any problems, could be that your ISP blocks smtp connections (except its own mail server), or your static IP is not resolved to a valid hostname
Check /var/log/maillog, to see what happens

Regards
 
Old 04-06-2011, 11:06 PM   #3
h.haider
LQ Newbie
 
Registered: Apr 2011
Location: Pakistan
Distribution: Centos, Fedora, Redhat, ubuntu, debian
Posts: 17

Original Poster
Rep: Reputation: 0
Angry

Quote:
Originally Posted by bathory View Post
Hi,

Did you try to send an email to an outside domain like yahoo and see what happens?
By default sendmail can send emails to the internet, so if you have any problems, could be that your ISP blocks smtp connections (except its own mail server), or your static IP is not resolved to a valid hostname
Check /var/log/maillog, to see what happens

Regards

Yes i try to send emails over yahoo and other internet domain but its fail.
and i confirmed from my isp there is no restriction on port 25 .
yes there is no valid hostname against my static ip for resolvation so what should i do for hostname
is valid hostname is needed for smtp cause?
i try to send email on hotmail address Maillog shows this error
sendmail[4016]: p374JXqI004016: <someone@hotmail.com>... User unknown

waiting your reply?????

Last edited by h.haider; 04-06-2011 at 11:21 PM.
 
Old 04-07-2011, 12:33 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,909

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Hi,

Quote:
yes there is no valid hostname against my static ip for resolvation so what should i do for hostname
is valid hostname is needed for smtp cause?
Most mail servers out there will not accept mail from a box that its IP does not resolve in a valid hostname.
You must contact your ISP, so it assigns a hostname in the static IP it had assign to you.

Regards
 
Old 04-07-2011, 12:38 AM   #5
h.haider
LQ Newbie
 
Registered: Apr 2011
Location: Pakistan
Distribution: Centos, Fedora, Redhat, ubuntu, debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Hi,


Most mail servers out there will not accept mail from a box that its IP does not resolve in a valid hostname.
You must contact your ISP, so it assigns a hostname in the static IP it had assign to you.

Regards
Thanks for your quick response

can i use dyndns.org service which gives free hostname against ip ??
if yes then what should i do ....?
 
Old 04-07-2011, 12:54 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,909

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
You could use it, because dyndns does not care if your IP changes all the time, or stays the same.
BUT, I doubt if others will accept mail from a dyndns host
If you pay for a static IP, I think that your provider should assign you a hostname even if it's something like 1.2.3.4.provider.com
 
Old 04-07-2011, 01:07 AM   #7
h.haider
LQ Newbie
 
Registered: Apr 2011
Location: Pakistan
Distribution: Centos, Fedora, Redhat, ubuntu, debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
You could use it, because dyndns does not care if your IP changes all the time, or stays the same.
BUT, I doubt if others will accept mail from a dyndns host
If you pay for a static IP, I think that your provider should assign you a hostname even if it's something like 1.2.3.4.provider.com

ok lets say if i have hostname then what should i have done with my local dns or email server
 
Old 04-07-2011, 02:30 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,909

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Let's say that you have a hostname mail.domain.com that resolves to your static IP (e.g. 1.1.1.1).
In terms of dns this means that there is a name server authoritative for the domain domain.com with an A record that points mail.domain.com to 1.1.1.1
You can setup that dns so that mail.domain.com is the mail exchanger for domain.com, you can receive mail (but you said you don't need to). Anyway in terms of dns this is the MX record pointing to mail.domain.com.
Now if you want mail.domain.com to be able to send mail outside your network without being rejected, you need 1.1.1.1 to be resolved to a valid hostname. This could be done either by your ISP, or by you if your ISP delegates you the subnet to which your IP belongs. In dns terms that means that there should be a name server that can answer for the reverse lookup of 1.1.1.1
So unless "nslookup 1.1.1.1" gives a hostname, you can't send emails to others.
Hope this is clear.
 
1 members found this post helpful.
Old 04-07-2011, 03:34 AM   #9
h.haider
LQ Newbie
 
Registered: Apr 2011
Location: Pakistan
Distribution: Centos, Fedora, Redhat, ubuntu, debian
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Let's say that you have a hostname mail.domain.com that resolves to your static IP (e.g. 1.1.1.1).
In terms of dns this means that there is a name server authoritative for the domain domain.com with an A record that points mail.domain.com to 1.1.1.1
You can setup that dns so that mail.domain.com is the mail exchanger for domain.com, you can receive mail (but you said you don't need to). Anyway in terms of dns this is the MX record pointing to mail.domain.com.
Now if you want mail.domain.com to be able to send mail outside your network without being rejected, you need 1.1.1.1 to be resolved to a valid hostname. This could be done either by your ISP, or by you if your ISP delegates you the subnet to which your IP belongs. In dns terms that means that there should be a name server that can answer for the reverse lookup of 1.1.1.1
So unless "nslookup 1.1.1.1" gives a hostname, you can't send emails to others.
Hope this is clear.

yes its clear

Thanks Alot For your Kind Response
Regards
Hafiz Haider
 
  


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
How i use my local smtp server and smtp server of my domain registrar simultaniosly Sanjeesh Linux - Networking 5 11-29-2008 05:07 AM
can I use sendmail for SMTP instead of my ISP's SMTP server? fcdev Linux - Networking 1 02-05-2007 01:27 AM
Sendmail and ISP SMTP Devyn Linux - Software 2 06-29-2005 08:21 PM
Postfix newbie - send to ISP SMTP server not working deanquanne Linux - Software 2 11-05-2003 01:22 PM


All times are GMT -5. The time now is 04:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration