hmailserver & Cloudflare

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

hmailserver & Cloudflare

Post by Technoman » 2019-05-26 09:37

hmailserver & Cloudflare

I have a static IP and I host a MyBB website on my windows OS 7 here at home. I have transferred my Domain over to cloudflare so since cloudflare doesn't have a email server i decided to go with hmailserver hosting since it;s completely free. I would need the email server to send and receive emails through the MyBB smtp mail settings. Temporary right now for a few days I am using mailgun until i get hmailserver all setup.

I have never used a email server before but i defiantly want to try now as it's completely private and that is the way i like it
Ok so I am very good at following videos so my questions is are there any videos explaining how to setup our Domain email within hmailserver & Cloudflare?

Thank You

User avatar
jimimaseye
Moderator
Moderator
Posts: 8131
Joined: 2011-09-08 17:48

Re: hmailserver & Cloudflare

Post by jimimaseye » 2019-05-26 09:48

If you have a static ip and seeing up hms lb the end of that ip (presumably your home address) then why not simply point your mx dns entries for the domain to your static ip and send emails directly? Why do you want to channel through cloud flare servers?

[Entered by mobile. Excuse my spelling.]
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-05-26 17:54

jimimaseye wrote:
2019-05-26 09:48
If you have a static ip and seeing up hms lb the end of that ip (presumably your home address) then why not simply point your mx dns entries for the domain to your static ip and send emails directly? Why do you want to channel through cloud flare servers?

[Entered by mobile. Excuse my spelling.]
Thanks @jimimaseye for the reply

Yes I am running a home webserver on windows with cloudflare pointing the Domain to my static ip

A. Where can i get the information that is needed for the mx, txt, cname that i can put into the dns entry of cloudflare as i have never done this before?

B. What do i need to configure or setup on the hemailserver?

I am new at all this bare with me please can you slowly walk me through this

User avatar
Dravion
Senior user
Senior user
Posts: 1435
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: hmailserver & Cloudflare

Post by Dravion » 2019-05-26 20:56

In your Cloudflare DNS-Setting, first you need to add an A Record with your static, public ip pointing to your hMailServer and a Hostname.
Next you need to add an MX record which points to your A Record you created before (for your MX Record numeric value type in 10 or 20).

Now you need to wait 72h before your DNS-Settings are syncronized worldwide to all DNS-Zones.
This is only needed for SMTP . For POP3 and IMAP its easier. Your just should create an A Record with its Hostname poiting to your Public ip.

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-05-26 21:20

Dravion wrote:
2019-05-26 20:56
In your Cloudflare DNS-Setting, first you need to add an A Record with your static, public ip pointing to your hMailServer and a Hostname.
Hi thanks for replying @Dravion

A record = Name + ipv4 address
example: mydomain.com + static ip
cloudflare.png
cloudflare.png (4.16 KiB) Viewed 1079 times
Dravion wrote:
2019-05-26 20:56
Next you need to add an MX record which points to your A Record you created before (for your MX Record numeric value type in 10 or 20).

MX record = Name + Server + priority
example: mydomain.com + static Ip + 10
cloudflare_002.png
cloudflare_002.png (4.29 KiB) Viewed 1079 times

Above is this correct or am i missing something with hostname?

Configuring hemailserver will be next step after we get cloudlfare setup properly.

User avatar
mattg
Moderator
Moderator
Posts: 20133
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hmailserver & Cloudflare

Post by mattg » 2019-05-26 23:45

A record like 'mail.example.com'
IPv4 Address = 123.123.123.xxx (static IP address goes here)
Leaving TTL to automatic is probably safe

MX Priority = 10

In HMailserver
Protocol >> SMTP >> Delivery of email >>Local host name

Also use 'mail.example.com' as above

If you can set an RDNS through your ISP, set it to the same 'mail.example.com'

Then if you want to really clever (not mandatory) get a certificate for that same address 'mail.example.com'
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-05-27 04:54

mattg wrote:
2019-05-26 23:45
A record like 'mail.example.com'
IPv4 Address = 123.123.123.xxx (static IP address goes here)
Leaving TTL to automatic is probably safe
Thank you so the first part with A record has been done. Now it;s figuring out the rest of what needs to be put into the dns of cloudflare

cloudflare.png
cloudflare.png (7.26 KiB) Viewed 1056 times

MX record any guidance of what to put into cloudflare?

cloudflare_002.png
cloudflare_002.png (4.29 KiB) Viewed 1056 times

my domain is example mydomain.com

User avatar
mattg
Moderator
Moderator
Posts: 20133
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: hmailserver & Cloudflare

Post by mattg » 2019-05-27 07:03

Name is the same as you made for the MAIL A record

(hopefully like mail.example.com as opposed to example.com as you have written)

The bit that says 'click to configure' is where I'm guessing you will be asked for a priority, here put 10
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-05-27 21:19

mattg wrote:
2019-05-27 07:03
Name is the same as you made for the MAIL A record

(hopefully like mail.example.com as opposed to example.com as you have written)

The bit that says 'click to configure' is where I'm guessing you will be asked for a priority, here put 10
I just want to know why i can't use mydomain.com instead I have to put mail.mydomain.com in other words then i would be forced using something.mail.mydomain.com and i dont want it like that i want support@mydomain.com that is the reason i only put mydomain.com. Then if it's only mydomain.com i can use *@mydomain.com correct?

User avatar
SorenR
Senior user
Senior user
Posts: 3190
Joined: 2006-08-21 15:38
Location: Denmark

Re: hmailserver & Cloudflare

Post by SorenR » 2019-05-27 22:29

Technoman wrote:
2019-05-27 21:19
mattg wrote:
2019-05-27 07:03
Name is the same as you made for the MAIL A record

(hopefully like mail.example.com as opposed to example.com as you have written)

The bit that says 'click to configure' is where I'm guessing you will be asked for a priority, here put 10
I just want to know why i can't use mydomain.com instead I have to put mail.mydomain.com in other words then i would be forced using something.mail.mydomain.com and i dont want it like that i want support@mydomain.com that is the reason i only put mydomain.com. Then if it's only mydomain.com i can use *@mydomain.com correct?
SERVER:
mail.mydomain.com A 123.123.123.123

[FQDN] A [IP Address]

MAIL DOMAIN:
MyDomain.com MX 10 mail.mydomain.com

[@domain] MX [priority] [server (FQDN)]

FQDN = Fully Qualified Domain Name

This will tell the world that mail for john.doe@mydomain.com is delivered to server on mail.mydomain.com.
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-05-31 18:05

Thanks everyone in this community for trying to help me but unfortunately I am more of a visual person and up to now i have got no where but dead ends. I have checked Youtube and searched online to no avail in how to make hemailserver work with cloudflare in a production environment.

If anyone is out there who has hemailserver working alongside with cloudflare would you be kind enough to upload a video onto Youtube so that way i can follow it. Much appreciated!

mikedibella
Normal user
Normal user
Posts: 177
Joined: 2016-12-08 02:21

Re: hmailserver & Cloudflare

Post by mikedibella » 2019-05-31 18:30

Login into the Cloudflare portal and select the domain corresponding to the right-hand side of your email address (i.e. email = my-name@my-domain, then select my-domain).

Choose the DNS tile from the top.

Using the Add Record button, add the following records:

Type, Name, Value, TTL
A, mail, public ip address of hMailServer interface, Automatic
MX, my-domain, server=mail.my-domain priority=10, Automatic

Replace my-domain above with the right-hand side from your email address.

That is all you need to receive mail.

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-06-01 20:51

I was finally able to find a video on Youtube that covers pretty much email mx records plus public and private dkim key alongside with hemailserver this is a 2 part video except its not in English but regardless its something that i can try out.
https://www.youtube.com/watch?v=dRre45YJdHA&t=95s

Technoman
New user
New user
Posts: 26
Joined: 2019-05-26 09:16

Re: hmailserver & Cloudflare

Post by Technoman » 2019-06-03 05:54

The only thing was i had to change the code a bit for dkim but its working 100% now. I'm so freaking happy! :D

Thanks guys for all the help!

Post Reply