Sendmail in home LAN
I'm learning and playing around with Sendmail. I've done:
1. set up domain (xxx.dyndns.org) using dyndns.org free dynaminc DNS serivce
2. setup Internet router's built in client for dyndns.org to sync my public IP address against the domain
2. use that domain in my sendmail config using define(`SMART_HOST',`smtp.ISPName.com')
3. start sending/receiving messages to user AT xxx.dyndns.org
Now if I try to use my sendmail as RELAY it fails with '554 Service rejected' message. I searched on the google and it says that I need to have a proper MX record setup so my email address becomes legitimate to the outside world. So as you can see my learning/messing around hit bit of a snag.
Question: Is there anything which lets me setup MX record for free?
You can also run your own DNS. Get the IP address that DynDNS is using and use it to set up MX record (plus an A record and all the other things you need to publish a DNS record). On the other hand, it's usually a bad idea to run sendmail as a relay unless you know what you're doing. If you just want to have sendmail handle outgoing e-mail, look into setting it up as a "smart host."
I'm not sure if I can run my own DNS server (BIND probably) without a static IP address. Because whois database can't register domain, only IP addresses as I've read online while searching for solutions. IF there is then please elaborate or give me a link/reference I can check out.
I've used 'SMART_HOST' option in sendmail.cf, but I want to go beyond just sending mails from my local users. I want to make sendmail full blown server so users (not just local, anyone one on the Internet but of course through authentication/secure) can send/receive emails through my sendmail server. I know people will say my server will become a spam fest, but I just want to see if it works. I can always the server offline.
Several different things happen with DNS. At the most basic level, you just associate an IP address with a human readable host name and domain, In your case, only dynDNS will be authoritative for that relationship unless you create your own little piece of the Internet that knows about your system.
Originally Posted by penguinWearsRedhat
If all you want to do is "see how it works", the idea would be to have someone else who runs their own mail server add your DNS as a nameserver and then they would be able to query it and send e-mail directly to your sendmail server. Or, they could just add your host <--> IP address mapping to their /etc/hosts file. They have to be running their own mail server so that their server gets your IP address either from your DNS or their /etc/hosts file. It will work, it's just cumbersome and only works with a lot of preparation. But, it's the preparation part that gets you around whois and having a registered domain, etc.
If you have a "real" domain and static IP address, one of the things you set up through your domain registrar is the association of your domain name with that IP address and that is then "published" and other people can find you without adding your DNS server or messing with /etc/hosts. Then when someone wants to say send you e-mail, their system queries distributed database that is the DNS system and finds an authoritative nameserver for your domain and queries it for information like your MX record.
The solution I suggested is how the Internet originally worked (sort of). You can imagine that it doesn't scale at all well and is why BIND was developed and the whole DNS structure evolved. But it will work if all you want to do is have someone "outside" send e-mail directly to your e-mail server. It's just that only people who have added your domain information directly can do it.