Send mail to local server from hotmail, gmail, etc.
Send mail to local server from hotmail, gmail, etc.
Hi. Hope everything is good.
In hmailserver I have created a domain called lollipop.se, and two user accounts ("user1" and "user2").
I tried to send mail to one of the user accounts that I created, and to do this I used mail() function in php which worked fine.
In the headers I wrote: to "user1@lollipop.se", from "user2@lollipop.se" ...
Then I tried to this through hotmail. I sent a mail to: "user1@mypublicipaddress".
I do not receive any error messages from hotmail, but the message does not come into my inbox on the mail server.
I have forwarded port to 25, and I have previously forwarded to 80 for a web server that works on the same machine.
Best regards
Neo
In hmailserver I have created a domain called lollipop.se, and two user accounts ("user1" and "user2").
I tried to send mail to one of the user accounts that I created, and to do this I used mail() function in php which worked fine.
In the headers I wrote: to "user1@lollipop.se", from "user2@lollipop.se" ...
Then I tried to this through hotmail. I sent a mail to: "user1@mypublicipaddress".
I do not receive any error messages from hotmail, but the message does not come into my inbox on the mail server.
I have forwarded port to 25, and I have previously forwarded to 80 for a web server that works on the same machine.
Best regards
Neo
Re: Send mail to local server from hotmail, gmail, etc.
Would really appreciate if i could get some help here...
Re: Send mail to local server from hotmail, gmail, etc.
Did you run the internal diagnostics in the admin console?
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
Start by reviewing documentation on MX records to understand that you cannot address an email to @mypublicipaddress.
This is a decent explaination: https://practical365.com/exchange-server/mx-record/
This is a decent explaination: https://practical365.com/exchange-server/mx-record/
Re: Send mail to local server from hotmail, gmail, etc.
Thanks for the replays.
Mikedibella...
Why does it look up MX record if domain is not provided? In my case the ip is used instead of the domain. I mean if I use my ip in the webbrowser it doesn't make a dns lookup, and everything works fine.
Mikedibella...
Why does it look up MX record if domain is not provided? In my case the ip is used instead of the domain. I mean if I use my ip in the webbrowser it doesn't make a dns lookup, and everything works fine.
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
That just the way email routing works. The right-hand side of an email address is not the address of the server that handle mail for that user, so you can't just place an ip address there and expect mail to be directed to a server at that address.
Instead, the mail transfer agent (MTA) will use the right-hand side of the email address to lookup a type of record in DNS called the mail exchanger, or MX, record, to get the hostname of the server that handle mail for all users with the same right-hand side, or domain, in their address.
That hostname is then resolved via DNS to an ip address that the MTA connects to in delivering the mail.
Instead, the mail transfer agent (MTA) will use the right-hand side of the email address to lookup a type of record in DNS called the mail exchanger, or MX, record, to get the hostname of the server that handle mail for all users with the same right-hand side, or domain, in their address.
That hostname is then resolved via DNS to an ip address that the MTA connects to in delivering the mail.
Re: Send mail to local server from hotmail, gmail, etc.
Okey.
So if I write mail to user@lollipop.se and if I want to receive the mail on my ip, I need to write my ip as mx record in the dns settings for lollipop.se?
So if I write mail to user@lollipop.se and if I want to receive the mail on my ip, I need to write my ip as mx record in the dns settings for lollipop.se?
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
Using the DNS management tools for your domain, create an MX record for lollipop.se making mail.lollipop.se your mail exchanger with priority 10. Then create an A record for mail.lollipop.se that points to your public IP address. Use mail.lollipop.se as your hMailServer hostname.
Re: Send mail to local server from hotmail, gmail, etc.
domain settings:
Name: almighty.se, type: MX, Data: mail.almighty.se, Prio: 10, TTL 86400
Name: almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
Name: www.almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
hmailserver(smtp) settings:
local host name: mail.almighty.se
remote host name: mail.almighty.se
Http request to almighty.se works, but mail still does not work. :/
Name: almighty.se, type: MX, Data: mail.almighty.se, Prio: 10, TTL 86400
Name: almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
Name: www.almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
hmailserver(smtp) settings:
local host name: mail.almighty.se
remote host name: mail.almighty.se
Http request to almighty.se works, but mail still does not work. :/
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Send mail to local server from hotmail, gmail, etc.
Where does mail.almighty.se point to? Currently nowhere. Hence failure.qneo wrote: ↑2019-08-28 22:03domain settings:
Name: almighty.se, type: MX, Data: mail.almighty.se,Prio: 10, TTL 86400
Name: almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
Name: www.almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
hmailserver(smtp) settings:
local host name: mail.almighty.se
remote host name: mail.almighty.se
Http request to almighty.se works, but mail still does not work. :/
[Entered by mobile. Excuse my spelling.]
5.7 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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Send mail to local server from hotmail, gmail, etc.
Okay.
So how do I create an A record and associate it with mail.almighty.se.
Or how should it be done?
So how do I create an A record and associate it with mail.almighty.se.
Or how should it be done?
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Send mail to local server from hotmail, gmail, etc.
Create one the same way as you have created the A record for almighty.se.
[Entered by mobile. Excuse my spelling.]
[Entered by mobile. Excuse my spelling.]
5.7 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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
The data for the A record is you dotted IP address: 81.225.141.114
Re: Send mail to local server from hotmail, gmail, etc.
the ip you wrote is the one I have instead of where I wrote "mypublicip".
so the setup is already correct, right?
so the setup is already correct, right?
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
You are missing
Code: Select all
Name: mail.almighty.se, type: A, Data: "mypublicip", Prio: 0, TTL 3600
Re: Send mail to local server from hotmail, gmail, etc.
I tried that to now, doesn't work. I dont think that matters because the settings for another domain that works looks like this:
Name: awebsite.se, type: MX, Data: mail1.beebyte.se,Prio: 10, TTL 86400
Name: awebsite.se, type: A, Data: "185.133.206.78", Prio: 0, TTL 3600
Name: www.awebsite.se, type: A, Data: "185.133.206.78", Prio: 0, TTL 3600
It works for both mail and web.
Could it be because of port 25? I read somewhere that it may be blocked due to ISP
Name: awebsite.se, type: MX, Data: mail1.beebyte.se,Prio: 10, TTL 86400
Name: awebsite.se, type: A, Data: "185.133.206.78", Prio: 0, TTL 3600
Name: www.awebsite.se, type: A, Data: "185.133.206.78", Prio: 0, TTL 3600
It works for both mail and web.
Could it be because of port 25? I read somewhere that it may be blocked due to ISP
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Send mail to local server from hotmail, gmail, etc.
Well, you know best. We are all sorry for wasting your time.
[Entered by mobile. Excuse my spelling.]
5.7 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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Send mail to local server from hotmail, gmail, etc.
Actually, I dont know. Thats why I'm here and asking
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Send mail to local server from hotmail, gmail, etc.
So do as you have been advised to do.
[Entered by mobile. Excuse my spelling.]
[Entered by mobile. Excuse my spelling.]
5.7 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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
Possibly. Your IP addresses, 81.225.141.114, is listed in the block list dul.dnsbl.sorbs.net as a known dynamic IP address. This type of address often has port restrictions imposed by the ISP.it may be blocked due to ISP
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Send mail to local server from hotmail, gmail, etc.
Port 25 is usually blocked outbound (to stop you running a mail server and sending mail).
Currently, mx records point to a non existent address.
[Entered by mobile. Excuse my spelling.]
Currently, mx records point to a non existent address.
[Entered by mobile. Excuse my spelling.]
5.7 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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Send mail to local server from hotmail, gmail, etc.
jimimaseye
Didn't I write that I had tried the advise as well?
This is the record I created.
Name:mail.almighty.se type:A data:81.225.141.114 prio: 0 tll:3600
Still not working.
Didn't I write that I had tried the advise as well?
This is the record I created.
Name:mail.almighty.se type:A data:81.225.141.114 prio: 0 tll:3600
Still not working.
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
Your DNS records are correct now:
So consider port 25 might be blocked.
Code: Select all
Non-authoritative answer:
almighty.se MX preference = 10, mail exchanger = mail.almighty.se
mail.almighty.se internet address = 81.225.141.114
Re: Send mail to local server from hotmail, gmail, etc.
Can I change the port to something else, and add the port in the dns settings?
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
That's where is gets tricky. You can configure hMailServer to receive mail on another port, but you cannot control what port remote servers send mail to you on. By standard, remote servers will send to you on port 25. So even if you change the port you receive on to a different port, you will still not receive mail.
You can look at services for email forwarding (google "email forwarding services"), which receive mail for you on port 25 and then relay that mail to you on another port you select.
If you choose to use a forwarding service, you will have to change your MX record to point to the service's servers, not your own. Just keep the A record, and use that hostname in service's configuration for the target mail server. Remember to add the custom receive port in hMailServer configuration under Settings > Advanced > TCP/IP Ports as an SMTP port.
You can look at services for email forwarding (google "email forwarding services"), which receive mail for you on port 25 and then relay that mail to you on another port you select.
If you choose to use a forwarding service, you will have to change your MX record to point to the service's servers, not your own. Just keep the A record, and use that hostname in service's configuration for the target mail server. Remember to add the custom receive port in hMailServer configuration under Settings > Advanced > TCP/IP Ports as an SMTP port.
Re: Send mail to local server from hotmail, gmail, etc.
Mikedibella, thanks for the reply.
Then I guess I have to consider email forwarding if my isp doesn't have another solution.
But shuldn't I be able to receive mail if the blocking is only outbound?
Then I guess I have to consider email forwarding if my isp doesn't have another solution.
But shuldn't I be able to receive mail if the blocking is only outbound?
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
It appears you have an inbound block on port 25.
You may also have an outbound block on port 25. You won't know until you try to send mail.
If you have an outbound block you will also need an outbound smart relay (google "outbound email relay service providers") so to can submit outgoing mail on a port other than 25 and have it delivered to your recipient on port 25.
Even if you don't have an outbound block, the fact that your IP address is listed on the dynamic address list will mean most servers will reject your connection attempts, so you should look at relay service anyway.
You may also have an outbound block on port 25. You won't know until you try to send mail.
If you have an outbound block you will also need an outbound smart relay (google "outbound email relay service providers") so to can submit outgoing mail on a port other than 25 and have it delivered to your recipient on port 25.
Even if you don't have an outbound block, the fact that your IP address is listed on the dynamic address list will mean most servers will reject your connection attempts, so you should look at relay service anyway.
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Send mail to local server from hotmail, gmail, etc.
I said its is usually only outbound but I have known that inbound was blocked too (libero in Italy block inbound too). So you might be blocked (as rare as it is).
+ 1mikedibella wrote: ↑2019-08-29 05:10Even if you don't have an outbound block, the fact that your IP address is listed on the dynamic address list will mean most servers will reject your connection attempts, so you should look at relay service anyway.
5.7 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
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Send mail to local server from hotmail, gmail, etc.
Kind of OT, but another advantage of a relay service is that they vigorously defend their sender reputation, and by extension yours as well. So there's a lot less time and worry about accidentally ending up on blacklists.
I don't have a choice because I'm on a residential ip, but i know a guy who runs a very successful hobby website discussion forum. He is constantly fighting for his sender reputation. The forum is very active and his outgoing mail volume is HIGH - lots of notifications and that sort of thing. He was complaining about all the time spent chasing down blacklists. All it takes is one user complaint sometimes. I told him to look into a relay service but at his volume, it's $$$$ he doesn't want to spend. Ok. More time chasing spam complaints, less time fishing. Up to you, bud.
I don't have a choice because I'm on a residential ip, but i know a guy who runs a very successful hobby website discussion forum. He is constantly fighting for his sender reputation. The forum is very active and his outgoing mail volume is HIGH - lots of notifications and that sort of thing. He was complaining about all the time spent chasing down blacklists. All it takes is one user complaint sometimes. I told him to look into a relay service but at his volume, it's $$$$ he doesn't want to spend. Ok. More time chasing spam complaints, less time fishing. Up to you, bud.
Re: Send mail to local server from hotmail, gmail, etc.
Really ?? How do you think people sent mail before DNS was invented? You need to re-read the RFC's.mikedibella wrote: ↑2019-08-28 01:58That just the way email routing works. The right-hand side of an email address is not the address of the server that handle mail for that user, so you can't just place an ip address there and expect mail to be directed to a server at that address.
Wile.E.Coyote@10.10.10.10 is a perfectly acceptable mail address.
Create an entry in "Names" with your public IP address as an alias for your domain and use GMail to send a test message. QED.
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.
Re: Send mail to local server from hotmail, gmail, etc.
I can add to this that every domain *SHOULD* have 2 alternative names.SorenR wrote: ↑2019-08-31 11:02Really ?? How do you think people sent mail before DNS was invented? You need to re-read the RFC's.mikedibella wrote: ↑2019-08-28 01:58That just the way email routing works. The right-hand side of an email address is not the address of the server that handle mail for that user, so you can't just place an ip address there and expect mail to be directed to a server at that address.
Wile.E.Coyote@10.10.10.10 is a perfectly acceptable mail address.
Create an entry in "Names" with your public IP address as an alias for your domain and use GMail to send a test message. QED.
Domain: acme.inc
Alias #1: FQDN of server, example: mx.acme.inc
Alias #2: Public IP address
This does not change the fact that HELO/EHLO greetings *SHOULD* contain the FQDN or Address Literal *) of the server.
*) Address Literal = IP Address with brackets, example: [10.10.10.10]
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.
-
- Senior user
- Posts: 837
- Joined: 2016-12-08 02:21
Re: Send mail to local server from hotmail, gmail, etc.
Maybe strictly speaking, but the RFC says the IP address has to be enclosed in braces:https://tools.ietf.org/html/rfc5322#section-3.4.1Wile.E.Coyote@10.10.10.10 is a perfectly acceptable mail address.
Wile.E.Coyote@[10.10.10.10]
And:
So, IMO, you may find modern implementations do not continue to implement this syntax. I do not know if hMailServer does.It is therefore incumbent upon implementations to conform to the syntax of addresses for the context in which they are used.
Re: Send mail to local server from hotmail, gmail, etc.
I found GMail do remove the brackets.mikedibella wrote: ↑2019-08-31 17:25Maybe strictly speaking, but the RFC says the IP address has to be enclosed in braces:https://tools.ietf.org/html/rfc5322#section-3.4.1Wile.E.Coyote@10.10.10.10 is a perfectly acceptable mail address.
Wile.E.Coyote@[10.10.10.10]
And:
So, IMO, you may find modern implementations do not continue to implement this syntax. I do not know if hMailServer does.It is therefore incumbent upon implementations to conform to the syntax of addresses for the context in which they are used.
With regards to the FWS and CFWS, I have never seen that used in addressing before in practical use ...
CFWS = Comments, Folding, Whitespaces.
Anyways, it's a nice thing to have when hackers kill the DNS servers.
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.