Is this server running on a fixed public ip address or your own private server which on a line that changes every now and then?
If it’s a static public address, you need to get your isp to create the A and MX records. These should then be picked up no matter what dns server is used.
If the ip address is likely to change, then you need an account with one of the dynamic dns services.
If you want your webserver to be accessible from the outside world, use a service like DynDNS (DynDNS.com - Free Domain Name, Managed DNS, Email Services) . Some providers offer similar services.
If you want to be able to send mail (or more exactly if you don’t want your emails to come back to you), you should configure sendmail (Postfix) to use your provider’s smtp as a ‘smarthost’.
I have a WEB/MAIL server configured to work on a static IP address, lets say 200.11.22.33.
Is this your real IP number? If yes, then it does not (yet) resolve on a reverse lookup.
What you have to do:
There must be at least one but normally two DNS servers for a domain name associated with that IP number. This can be set up by your ISP, or you do it yourself with bind. The DNS servers must have at least an A record and an MX record for your domain. Let’s assume your domain is ‘sampledom.com’. Then you would configure the zonefile for bind to resolve:
$ORIGIN .
$TTL 2d
sampledom.com IN SOA ns.sampledom.com. admin.sampledom.com. (
2010083001 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ; minimum
)
IN NS ns.sampledom.com.
IN NS ns.otherdns.com.
IN A 200.11.22.33
IN MX 10 mail.sampledom.com.
IN MX 20 mail.secondarymailserver.com.
$ORIGIN sampledom.com.
ns IN A 200.11.22.33
mail IN A 200.11.22.33
www CNAME ns
Your secondary slave DNS can copy from the primary. Then you must register your DNS servers with your domain name provider. That’s it.
Now any lookup for ‘www.sampledom.com’ points to your IP. And any mail sent to ‘someone@sampledom.com’ would be sent to ‘mail.sampledom.com’ which again goes to your IP number. In addition, for a perfect setup, your ISP should set the reverse lookup for 200.11.22.33 to return ‘mail.sampledom.com’. Anything else is local configuration of apache and sendmail. Have fun.
To make it clear, there are two methods. Either you setup a DNS server, as vodoo described above, or you get postfix to use your provider’s smtp.
I’ll try to expose the other method :
create the file /etc/postfix/transport with a content similar to the following:
you should also set SMTPD_LISTEN_REMOTE=“yes” in /etc/sysconfig/mail, whether you use this method or the other one.
This method allows you to send mails directly without having to set up a DNS server.
However if you want to receive emails from the outside world, you have to apply the other method (which is more elegant).