Second hmailserver as a SMTP Relayer noob questions

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
User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-25 10:35

Long time user, still a noob. I prefer noob solutions to my problems @SorenR :)

I have two hmailservers, one at home and one on a VPS, acting as a backup server, only having routes. Now the VPS should become the SMTP Relayer for home.
Until now I have no domains/accounts at the VPS. And I have an OpenVPN connection from home to the VPS, so I guess the VPS could be the Relayer, still without any authentication/domains/accounts, right? (question 1)

Because the vps is a mx record too, I wouldn't need to change anything regarding sfp, dkim and such? (question 2)

I am also thinking about having the same domains/accounts on both and using the pop3 collect feature on home to collect mail from the VPS, if there is any. This wouldn't have any impact for the relaying with the vps? (question 3)

TIA
Bob

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-25 13:50

After some testing, it seems to be no good idea to send email via the openvpn tunnel, at least I got some problems with it. I then switched to do it over the internet. But for relaying I had to create an account on the vps. I did, with a not related domainname and a user with server administration level. Was this necessary?

In routes I have selected them now both as "treat as local". One is for being a mx backup and the other for relaying? I hope I did everything right.

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by jimimaseye » 2021-07-25 14:05

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

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-25 14:11

jimimaseye wrote:
2021-07-25 14:05
Does this help:
I had it running like this for some time now, using it as a relayer is what is new to me and makes me nervous.

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by mattg » 2021-07-26 00:16

Static IP at home?
That would make it very easy. Just create an IP range in the VPS for the home server allowing non-AUTH relay

You can keep accounts at both ends, but really why? Creates a lot of work.
Keep all accounts on the VPS if you are worried about internet accessibility
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-27 13:44

Bob.Dig wrote:
2021-07-25 13:50
But for relaying I had to create an account on the vps. I did, with a not related domainname and an user with server administration level. Was this necessary?
Can anyone answer this question? What is necessary to use hmailserver as an Relayer?

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by SorenR » 2021-07-27 16:57

Bob.Dig wrote:
2021-07-27 13:44
Bob.Dig wrote:
2021-07-25 13:50
But for relaying I had to create an account on the vps. I did, with a not related domainname and an user with server administration level. Was this necessary?
Can anyone answer this question? What is necessary to use hmailserver as an Relayer?
Relayer:
- MX record and SMTP route for incoming.
- IP Range w/wo authentication (dummy account needed if auth) for outbound.

MailServer:
- Relayer as "incoming relay" and perhaps special IP Range for incoming
- Relayer as "SMTP Relayer" with optional authentication for outbound.
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-27 17:03

SorenR wrote:
2021-07-27 16:57
(dummy account needed if auth)
Thank you.

So that dummy account has to be which level, anyone knows?

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by SorenR » 2021-07-27 17:26

Bob.Dig wrote:
2021-07-27 17:03
SorenR wrote:
2021-07-27 16:57
(dummy account needed if auth)
Thank you.

So that dummy account has to be which level, anyone knows?
My relayer allow SMTP on IP Range Internet with AUTH disabled on port 25 (.ini file)
IP Range Internet - Delivery "External to Local" is the only one NOT requiring AUTH (this is normal mailserver set-up)

I have NO domains and NO clients on this server! Auth bots can try from now until judgement day and NEVER gain access ;-)

Special IP Range with IP of my master mailserver to allow delivery "Local-local" and "local-external" with NO AUTH - For this IP ONLY!

Master mailserver just do relay without AUTH (one less thing that can go wrong ;-) )

Security is in controlling which IP have access to do what ... 8)
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-27 17:30

SorenR wrote:
2021-07-27 17:26
Security is in controlling which IP have access to do what ... 8)
Yes, I got this. Problem, I only have dynamic IP at home. That is where my main hmailserver lives and I want to use that VPS only for sending right now.

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by SorenR » 2021-07-27 17:39

Bob.Dig wrote:
2021-07-27 17:30
SorenR wrote:
2021-07-27 17:26
Security is in controlling which IP have access to do what ... 8)
Yes, I got this. Problem, I only have dynamic IP at home. That is where my main hmailserver lives and I want to use that VPS only for sending right now.
Then you need AUTH... On Relayer create "localdomain" with a client "localhost" and some perverse 128 character password of letters, numbers and symbols ;-) It's OK, you don't need to be able to remember it :mrgreen:

Your home mailserver will connect to your relayer like any other mail client would do to send mail.

You can test your Relayer configuration with Outlook or Thunderbird...
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-27 18:04

SorenR wrote:
2021-07-27 17:39
Your home mailserver will connect to your relayer like any other mail client would do to send mail.
I already did this and it is running fine. What I don't know is if I have chosen the right "usergroup" for that account. You probably don't know either, cause you don't use it like that.

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by SorenR » 2021-07-27 18:11

Bob.Dig wrote:
2021-07-27 18:04
SorenR wrote:
2021-07-27 17:39
Your home mailserver will connect to your relayer like any other mail client would do to send mail.
I already did this and it is running fine. What I don't know if I choose the right "usergroup" for that account. You probably don't know either, cause you don't use it like that.
"usergroup" aka "Administration level" ?? As in "user", "domain", or "server" ??

"user" should be fine - it's not "managing" anything.
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-27 18:13

SorenR wrote:
2021-07-27 18:11
"user" should be fine
I thought that maybe "user" could only act in the context of that one domain I created there, that is why I have chosen "server". I guess I should check for myself now that it is working. :wink:

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by SorenR » 2021-07-27 18:17

Bob.Dig wrote:
2021-07-27 18:13
SorenR wrote:
2021-07-27 18:11
"user" should be fine
I thought that maybe "user" could only act in the context of that one domain I created there, that is why I have chosen "server".
That setting dictate which rights you have on the hMailServer PHPWebAdmin site and the GUI... :wink:
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
Bob.Dig
Normal user
Normal user
Posts: 144
Joined: 2020-06-29 09:18
Location: Germany

Re: Second hmailserver as a SMTP Relayer noob questions

Post by Bob.Dig » 2021-07-27 18:34

SorenR wrote:
2021-07-27 18:17
That setting dictate which rights you have on the hMailServer PHPWebAdmin site and the GUI... :wink:
There is a PHPWebAdmin site? :mrgreen:
And you are right, changing this account only took me some seconds I just found out and it is still working fine as a relay.

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

Re: Second hmailserver as a SMTP Relayer noob questions

Post by mattg » 2021-07-28 01:01

Bob.Dig wrote:
2021-07-27 18:34
There is a PHPWebAdmin site? :mrgreen:
Check your hmailserver install folder, there is already a PHPWebAdmin folder...

(I use symlinks to add that folder to my web root, so that every update, the PHPWebAdmin is automatically updated too. I also ensure that I backup the 'include_versioncheck.php' file every day, as this is the ONLY file that shows what version of hMailserver I was using at point in time of backup)
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply