Einen Überblick über das Administrationstool KeyHelp der Keyweb AG und dessen Download gibt es auf https://www.keyhelp.de

Dieses Forum soll es interessierten Benutzern ermöglichen, sich über KeyHelp auszutauschen und Hilfe bei Problemen zu finden.

Using Cloud Flare subdomin as hostname

Gerneral discussion and questions about KeyHelp
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Hello,

Did anyone of you guys configure CloudFlare subdomain as hostname?

Here is my scenario:
domain.com using Cloudflare name servers.
I have created A record for hostname.domain.com and point it to my KeyHelp server.

At this point, the login form shows up at hostname.domain.com and everything is working fine.

Now I have crated a user, with username boris. KeyHelp will create a domain for user: boris.hostname.domain.com
boris.hostname.domain.com will not work, because there is no record in CloudFlare DNS zone for boris.hotname.domain.com

I was try this: https://support.cloudflare.com/hc/en-us ... Cloudflare
(change A record to NS record). But it is not working too.

Regards
Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

boka003 hat geschrieben: Di 11. Jan 2022, 19:42 Hello,

Did anyone of you guys configure CloudFlare subdomain as hostname?

Here is my scenario:
domain.com using Cloudflare name servers.
I have created A record for hostname.domain.com and point it to my KeyHelp server.

At this point, the login form shows up at hostname.domain.com and everything is working fine.

Now I have crated a user, with username boris. KeyHelp will create a domain for user: boris.hostname.domain.com
boris.hostname.domain.com will not work, because there is no record in CloudFlare DNS zone for boris.hotname.domain.com

I was try this: https://support.cloudflare.com/hc/en-us ... Cloudflare
(change A record to NS record). But it is not working too.

Regards
You don't need to delegate anything.
Just add a wildcard, if that is not possible, add boris.hostname.domain.com as a subdomain and give it the right A and AAAA records.
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Wildcard makes it work.

Thanks a lot! You save me a lot of hours adding records manually
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Hi,

Not sure is this somehow connected to CloudFlare DNS, but my email server das not working.
Email Queue showing this error: connect to alt4.gmail-smtp-in.l.google.com[108.177.98.27]:25: Connection timed out


in CloudFlare I have created A record: *.hostname.domain.com
and it is working fine when I create new child subdomain at KeyHelp.

Inside KeyHelp DNS zone I have:
Primary name server *: ns1.hostname.domain.com
Email address of responsible person (RNAME) *: root.hostname.domain.com
* A server IP
@ A server IP
@ MX server IP
@ NS ns1.hostname.domain.com
@ NS ns2.hostname.domain.com
@ TXT "v=spf1 a mx -all"
_dmarc "v=DMARC1; p=none"
default._domainkey <DKIM_RECORD_VALUE>


Do I need to add some of these records in CloudFlare? If I already use a wildcard for A record?


All my ports at the server are open.


Regards
Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

What does /var/log/mail.info say?
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Hi,

Here is a part of log https://pastebin.pl/view/52e20f1d
Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

boka003 hat geschrieben: Do 13. Jan 2022, 12:40 Hi,

Here is a part of log https://pastebin.pl/view/52e20f1d
That part is not helpful at all.

Try sending a mail to he problematic address and get that part from the logfile.

You can check some other stuff, too. Install telnet (apt install telnet).

Then

Code: Alles auswählen

telnet localhost 25
should give you something like

Code: Alles auswählen

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 host.domain.net ESMTP Postfix (Ubuntu)
(It’s a Debian system, no clue why it says Ubuntu).

Now make

Code: Alles auswählen

host host.domain.net
it should give you one or more ip addresses.
Then make "host ip address", for each, and check, that the reverse DNS fits the forward entry.
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Yes, it gave me this address: 127.0.1.1

I think that is not a DNS problem, as I use the same DNS setup via CludFlare for other server and other control panel.

here is whole log: https://pastebin.pl/view/b84e7ebc
Zuletzt geändert von boka003 am Do 13. Jan 2022, 15:42, insgesamt 1-mal geändert.
Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

boka003 hat geschrieben: Do 13. Jan 2022, 15:37 Yes, it gave me this address: 127.0.1.1

I think that is not a DNS problem, as I use the same DNS setup via CludFlare for other server and other control panel.
You check check the hostname, and then ip address and reverse dns,
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Hello,


It is look fine, IP and hostname are connected in both ways.
Is there any other log or way that i can easy find issue?
Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

boka003 hat geschrieben: Fr 14. Jan 2022, 16:30 Hello,


It is look fine, IP and hostname are connected in both ways.
Is there any other log or way that i can easy find issue?
Capture what's inside mail.info when you try to send a mail to the problematic domain.
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Here is a more info:

Here is log when i try to send email: https://pastebin.pl/view/acbbf520

After that i have reinstalled KeyHelp: https://pastebin.pl/view/549a89da
Quota ... just have some error and here is log: https://pastebin.pl/view/984a40fb

Then i was test my email again, it is not working when i try to email user that use some extrenal email (like gmail).
But if i create internal email (test@boris1.ch1.arena.eu) it will work well.

arena.eu is just example...


When i log in via terminal, this is how it look like: https://pastebin.pl/view/415d19c9 / https://10.0.0.95/

So i have add new ip using: ip addr add 152.67.76.241/24 dev enp0s3

Here is a full log:

Code: Alles auswählen


ubuntu@ch1:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    link/ether 02:00:17:00:53:b0 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.95/24 brd 10.0.0.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::17ff:fe00:53b0/64 scope link 
       valid_lft forever preferred_lft forever
ubuntu@ch1:~$ sudo -i
root@ch1:~# ip addr add 152.67.76.241/24 dev enp0s3
root@ch1:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    link/ether 02:00:17:00:53:b0 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.95/24 brd 10.0.0.255 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet 152.67.76.241/24 scope global enp0s3
       valid_lft forever preferred_lft forever
    inet6 fe80::17ff:fe00:53b0/64 scope link 
       valid_lft forever preferred_lft forever
root@ch1:~# 



Aftert that i have go to settings, configuration, ip adresses and select both ips:

Code: Alles auswählen

IPv4
Select up to 2 IP addresses.

 10.0.0.95
 152.67.76.241
And still, email can be send only to internal email adresses.

Fresh email log after all this: https://pastebin.pl/view/4a19c310
I was also try to configure postfix manually: https://www.digitalocean.com/community/ ... untu-18-04



https://www.gmass.co/smtp-test :

Code: Alles auswählen

<< 220 ch1.arena eu ESMTP Postfix (Ubuntu)
>> EHLO [172.31.10.74]
<< 250-ch1.arena eu
<< 250-PIPELINING
<< 250-SIZE 36700160
<< 250-VRFY
<< 250-ETRN
<< 250-STARTTLS
<< 250-ENHANCEDSTATUSCODES
<< 250-8BITMIME
<< 250-DSN
<< 250-SMTPUTF8
<< 250 CHUNKING
>> STARTTLS
<< 220 2.0.0 Ready to start TLS
>> EHLO [172.31.10.74]
<< 250-ch1.arena eu
<< 250-PIPELINING
<< 250-SIZE 36700160
<< 250-VRFY
<< 250-ETRN
<< 250-AUTH LOGIN PLAIN
<< 250-ENHANCEDSTATUSCODES
<< 250-8BITMIME
<< 250-DSN
<< 250-SMTPUTF8
<< 250 CHUNKING
>> AUTH PLAIN AHRlc3RAYm9yaXMxLmNoMS5hcmVuYS1ob3N0aW5nLmV1AFhaQXdZMiFHWmV0Rg==
<< 235 2.7.0 Authentication successful
>> MAIL FROM:<test@boris1.ch1.arena eu> SIZE=574
>> RCPT TO:<Dragnetbl@gmail.com>
<< 250 2.1.0 Ok
<< 250 2.1.5 Ok
>> DATA
<< 354 End data with <CR><LF>.<CR><LF>
>> From: test@boris1.ch1.arena eu
>> Date: Fri, 14 Jan 2022 20:02:51 퍍
>> Subject: SMTP test from ch1.arena eu
>> Message-Id: <J3AU9EYDTFU4.HF3JR246IABG@WIN-AUIR3RRGP88>
>> To: Dragnetbl@gmail.com
>> MIME-Version: 1.0
>> Content-Type: multipart/alternative; boundary="=-JCDBj/V5EKfn1Q23W0basA=="
>>
>> --=-JCDBj/V5EKfn1Q23W0basA==
>> Content-Type: text/plain; charset=utf-8
>>
>> Test message
>> --=-JCDBj/V5EKfn1Q23W0basA==
>> Content-Type: text/html; charset=utf-8
>> Content-Id: <J3AU9EYDTFU4.MKP84XDNTVQ43@WIN-AUIR3RRGP88>
>>
>> <b>Test message</b>
>> --=-JCDBj/V5EKfn1Q23W0basA==--
>> .
<< 250 2.0.0 Ok: queued as 7980D23B721

Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

Two things:

Code: Alles auswählen

Jan 14 20:05:59 ch1 postfix/local[3416]: warning: database /etc/aliases.db is older than source file /etc/aliases
You need to run „newaliases“ to get rid of the warning.

Code: Alles auswählen

Jan 14 20:05:59 ch1 postfix/pipe[3417]: D194623B699: to=<boris@ch1.arena.eu>, orig_to=<root@ch1.arena.eu>, relay=dovecot, delay=0.06, delays=0.01/0.01/0/0.04, dsn=5.1.1, status=bounced (user unknown. Command output: lda(boris@ch1.arena.eu): Error: net_connect_unix(/var/run/dovecot/stats-writer) failed: Permission denied )
That doesn't look good, too.

You need an alias for root in /etc/aliases and check why the is this „permission denied“ error.
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Benutzeravatar
boka003
Beiträge: 17
Registriert: Fr 7. Jan 2022, 10:17

Re: Using Cloud Flare subdomin as hostname

Beitrag von boka003 »

Thank you for helping!

Code: Alles auswählen

You need to run "newaliases" to get rid of the warning.
I have done this.

Code: Alles auswählen

You need an alias for root in /etc/aliases
Here is my aliases:
root@ch1:/etc# cat aliases
# --------------------------------------------------
# This file is managed by KeyHelp.
# If you want to change its content, please use
# the corresponding configuration menu.
# --------------------------------------------------
hostmaster: root
postmaster: root
webmaster: root
abuse: root



And here is doveconf: https://pastebin.pl/view/92eefb34

And here is log from today 17:40 / https://pastebin.pl/view/1a7202e4
look like there is no more permission denied error.
Benutzeravatar
24unix
Beiträge: 83
Registriert: So 21. Jun 2020, 17:16

Re: Using Cloud Flare subdomin as hostname

Beitrag von 24unix »

You should add an alias
root: me@mycomany.tld

But:

# This file is managed by KeyHelp.
# If you want to change its content, please use
# the corresponding configuration menu.

I'm new to keyhelp, I have no clue where the settings might be.
90 Prozent aller Programmierer halten sich für genial, der Rest immer noch für überdurchschnittlich.
Antworten