LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   how to use sendmail as smtp server instead of my isp smtp server (http://www.linuxquestions.org/questions/red-hat-31/how-to-use-sendmail-as-smtp-server-instead-of-my-isp-smtp-server-873354/)

h.haider 04-06-2011 09:59 AM

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........!

bathory 04-06-2011 11:18 AM

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

h.haider 04-06-2011 11:06 PM

Quote:

Originally Posted by bathory (Post 4315994)
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?????

bathory 04-07-2011 12:33 AM

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

h.haider 04-07-2011 12:38 AM

Quote:

Originally Posted by bathory (Post 4316646)
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 ....?

bathory 04-07-2011 12:54 AM

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

h.haider 04-07-2011 01:07 AM

Quote:

Originally Posted by bathory (Post 4316656)
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

bathory 04-07-2011 02:30 AM

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.

h.haider 04-07-2011 03:34 AM

Quote:

Originally Posted by bathory (Post 4316728)
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


All times are GMT -5. The time now is 10:05 AM.