# Setting up a mail and name server



## sidney (Mar 24, 2021)

I've got an older machine - Athlon 2000+  - running 32bit freebsd right now for general usage. I want to dedicate it as a mail and name server for personal home use.  Nothing fancy, just something to play with. Do I need a static IP? How do I get one if I DO need one?

Some time ago, a friend did the very same thing, but a buddy of his - a sysadmin for a large oil-gas company set him up with one of theirs. I should be so lucky!! So how does one go about getting one?  The it'll be onwards with  bind/named/sendmail for example. TIA


----------



## im (Mar 24, 2021)

Hello!
Public static IP is necessary for a name and mail server.
Contact support of your internet service provider for it.
You can try to play with mail and dns with public dynamic IP (non static), but it is possible only for test purposes.

For your own mail server try to use postfix (send and receive mail via SMTP) and dovecot ( access to mail via IMAP or POP3 protocol).


----------



## sidney (Mar 24, 2021)

im said:


> Hello!
> Public static IP is necessary for a name and mail server.
> Contact support of your internet service provider for it.
> You can try to play with mail and dns with public dynamic IP (non static), but it is possible only for test purposes.
> ...


Thanks! dovecot and postfix  it shall be!  Getting a static IP and dealing with my ISP is another matter.


----------



## obsigna (Mar 24, 2021)

sidney said:


> I've got an older machine - Athlon 2000+ - running 32bit freebsd right now for general usage. I want to dedicate it as a mail and name server for personal home use. Nothing fancy, just something to play with. Do I need a static IP? How do I get one if I DO need one?


You would need a static IP only if you intend your mail server delivers mails directly to your peers. You can get away with a dynamic IP if you would use a third party’s mail relay service for mail delivery.

Here I am running mail and name services on my FreeBSD home server on a dynamic IP. The domain hoster provides a mail service together with registered domains, and I utilize this as mail relay for mail delivery. In addition the domain hoster lets me update the A and MX records by the way of the DynDNS protocol.

Everything is running on a low end dual core Atom @ 1,67 GHz with 2 GB of RAM.

My BLog post on how I setup the mail service:





						Home Mail Server with TLS and non-Plaintext Authentication
					






					obsigna.com
				




One special detail of the setup — Disposable Mail addresses:




__





						Disposable E-Mail Addresses with Postfix
					






					obsigna.com
				




BLog post in German language about Network services, including DNS by unbound:





						Netzwerkdienste DNS und DHCP auf dem FreeBSD-Home-Server
					






					obsigna.com
				




In English by the Google Translator:




__





						Netzwerkdienste DNS und DHCP auf dem FreeBSD-Home-Server
					






					translate.google.com


----------



## sidney (Mar 24, 2021)

obsigna said:


> You would need a static IP only if you intend your mail server delivers mails directly to your peers. You can get away with a dynamic IP if you would use a third party’s mail relay service for mail delivery.
> 
> Here I am running mail and name services on my FreeBSD home server on a dynamic IP. The domain hoster provides a mail service together with registered domains, and I utilize this as mail relay for mail delivery. In addition the domain hoster lets me update the A and MX records by the way of the DynDNS protocol.
> 
> ...


Fantastic!! Thx for the links and advise!


----------



## ShelLuser (Mar 24, 2021)

You can always set up an MTA for testing purposes but keep in mind that many ISP's have blocked mail traffic in order to prevent spamming. So I suggest you definitely check with your ISP to determine their policies on this.


----------



## diizzy (Mar 24, 2021)

Sorry for being boring but apart from TOS from your ISP I'm going to say that if you don't know what you're doing (how you go about setting it up) then please don't. It'll most likely do more harm than good and it'll cost more than buying a mail service and/or a DNS service. Keeping up with mail and DNS vulns is a lot of work.


----------



## sidney (Mar 24, 2021)

diizzy said:


> Sorry for being boring but apart from TOS from your ISP I'm going to say that if you don't know what you're doing (how you go about setting it up) then please don't. It'll most likely do more harm than good and it'll cost more than buying a mail service and/or a DNS service. Keeping up with mail and DNS vulns is a lot of work.


I see your point! But I can learn, can't I !!  *And* here in guru-land there's a wealth of know-how. I can't fail! *And* God don't like cowards!!!


----------



## ShelLuser (Mar 24, 2021)

diizzy said:


> Sorry for being boring but apart from TOS from your ISP I'm going to say that if you don't know what you're doing (how you go about setting it up) then please don't. It'll most likely do more harm than good


Although I definitely see your point (and agree with it) it's also fair to say that times have changed. For example... most MTA's I'm familiar with (these include my own obviously) don't accept mail from hosts without a PTR record in order to prevent spam. Several black lists also include netblocks from ISP's and if you want to get removed (or whitelisted) then some of those organisations even perform open relays checks and such before taking you off. And that's not even mentioning SPF.

So yah.. you definitely raise a good point & valid concern but I'm not too sure about the "doing harm" part anymore.


----------



## drhowarddrfine (Mar 24, 2021)

sidney said:


> I see your point! But I can learn, can't I !!


That's the spirit. Good for you! It's not as hard as it sounds so ignore everything you'll read on the internet that tells you don't do this. If I followed that advice I wouldn't be the grumpy old man I am today.


----------



## sidney (Mar 25, 2021)

drhowarddrfine said:


> That's the spirit. Good for you! It's not as hard as it sounds so ignore everything you'll read on the internet that tells you don't do this. If I followed that advice I wouldn't be the grumpy old man I am today.


LOL - I turned 74 just a few days ago. Grumpy sometimes - especially after chemo, but getting back into *nix and C programming helps with that affliction!  Got to have a chat with my ISP. Thx for the encouragement.


----------

