Spyke

Posts

selfhostedยทSelfhostedbyxolatgames

I've try to set up my E-Mail server ๐Ÿ“ฌ. Dovecot + Postfix. I can sends, but I can't receives.

Hello everyone! ๐Ÿ‘‹โœŒ๏ธ

I've try to use Dovecot + Postfix for setting up my own E-Mail server ๐Ÿ“ฌ

But I have some troubles here ๐Ÿ˜…. I can sends messages through my E-Mail address ๐Ÿ™‚๐Ÿ“จ, but I can't receives messages those was be sent from different address ๐Ÿ“ฉโŒ๐Ÿ˜…

Please, help me to fix this issue who ones who can help me ๐Ÿ”ง๐Ÿ˜

The logs from journalctl -xeu postfix

Jul 31 14:02:56 mail.xolat.games postfix/qmgr[1163]: CC268296: from=<>, size=2889, nrcpt=1 (queue active)
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Warning: Failed to parse address from `From_'-line: Missing domain
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: mkdir(/home/root/Maildir) failed: Permission denied (euid=8(mail) egid=8(mail) missing +w perm: /home, dir owned by 0:0 mode=0755)
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: mkdir(/home/root/Maildir) failed: Permission denied (euid=8(mail) egid=8(mail) missing +w perm: /home, dir owned by 0:0 mode=0755)
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: Mailbox INBOX: Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-07-31 14:02:56]
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: sieve: msgid=<[email protected]>: failed to store into mailbox 'INBOX': Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-07-31 14:02:56]
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: sieve: failed to open logfile (LOGGING TO STDERR): open(/var/lib/dovecot/sieve/default.sieve.log) failed: Permission denied (euid=8(mail) egid=8(mail) missing +w perm: /var/lib/dovecot/sieve, we're not in group 1004(vmail), dir owned by 1004:1004 mode=0775)
Jul 31 14:02:56 mail.xolat.games dovecot[22176]: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: sieve: Execution of script 'default/default' was aborted due to temporary failure (user logfile /var/lib/dovecot/sieve/default.sieve.log may reveal additional details)
Jul 31 14:02:56 mail.xolat.games postfix/local[22175]: CC268296: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=332315, delays=332315/0.02/0/0.06, dsn=4.3.0, status=deferred (temporary failure. Command output: sieve: info: started log at 2026-07-31 14:02:56 +0000. error: msgid=<[email protected]>: failed to store into mailbox 'INBOX': Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-07-31 14:02:56]. )

The logs from cat /var/log/mail.log

2026-07-31T14:02:56.763692+00:00 mail postfix/qmgr[1163]: CC268296: from=<>, size=2889, nrcpt=1 (queue active)
2026-07-31T14:02:56.828022+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Warning: Failed to parse address from `From_'-line: Missing domain
2026-07-31T14:02:56.830219+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: mkdir(/home/root/Maildir) failed: Permission denied (euid=8(mail) egid=8(mail) missing +w perm: /home, dir owned by 0:0 mode=0755)
2026-07-31T14:02:56.830528+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: mkdir(/home/root/Maildir) failed: Permission denied (euid=8(mail) egid=8(mail) missing +w perm: /home, dir owned by 0:0 mode=0755)
2026-07-31T14:02:56.830731+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: Mailbox INBOX: Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-07-31 14:02:56]
2026-07-31T14:02:56.832453+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: sieve: msgid=<[email protected]>: failed to store into mailbox 'INBOX': Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-07-31 14:02:56]
2026-07-31T14:02:56.832584+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: sieve: failed to open logfile (LOGGING TO STDERR): open(/var/lib/dovecot/sieve/default.sieve.log) failed: Permission denied (euid=8(mail) egid=8(mail) missing +w perm: /var/lib/dovecot/sieve, we're not in group 1004(vmail), dir owned by 1004:1004 mode=0775)
2026-07-31T14:02:56.832661+00:00 mail dovecot: lda(root)<22176><5eFAMRCrbGqgVgAAuoFhiA>: Error: sieve: Execution of script 'default/default' was aborted due to temporary failure (user logfile /var/lib/dovecot/sieve/default.sieve.log may reveal additional details)
2026-07-31T14:02:56.843566+00:00 mail postfix/local[22175]: CC268296: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=332315, delays=332315/0.02/0/0.06, dsn=4.3.0, status=deferred (temporary failure. Command output: sieve: info: started log at 2026-07-31 14:02:56 +0000. error: msgid=<[email protected]>: failed to store into mailbox 'INBOX': Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-07-31 14:02:56]. )
2026-07-31T14:04:25.897233+00:00 mail postfix/submission/smtpd[22193]: connect from unknown[46.101.119.210]
2026-07-31T14:04:32.882147+00:00 mail postfix/submission/smtpd[22193]: SSL_accept error from unknown[46.101.119.210]: lost connection
2026-07-31T14:04:32.888445+00:00 mail postfix/submission/smtpd[22193]: NOQUEUE: lost connection after CONNECT from unknown[46.101.119.210]
2026-07-31T14:04:32.888622+00:00 mail postfix/submission/smtpd[22193]: disconnect from unknown[46.101.119.210] commands=0/0
2026-07-31T14:32:00.045293+00:00 mail dovecot: imap-login: Logged in: user=<hello>, method=PLAIN, rip=95.25.67.217, lip=5.35.81.149, mpid=22438, TLS, session=<uFZlDOlXSPRfGUPZ>
2026-07-31T14:32:01.145793+00:00 mail dovecot: imap-login: Logged in: user=<hello>, method=PLAIN, rip=95.25.67.217, lip=5.35.81.149, mpid=22443, TLS, session=<MuI0DelX4vdfGUPZ>

Postfix config at cat /etc/postfix/main.cf

# Which domain that locally-originated mail appears to come from.
# Debian policy suggests to read this value from /etc/mailname.
#XX needs a review in postinst&config
#myorigin = /etc/mailname
#myorigin = $mydomain
mydomain = xolat.games
myorigin = $mydomain
mail_name = $mydomain

# Text that follows the 220 code in the SMTP server's greeting banner.
# You MUST specify $myhostname at the start due to an RFC requirement.
smtpd_banner = $myhostname ESMTP $mail_name (Debian)

# IP protocols to use: ipv4, ipv6, or all
# (set this explicitly so `post-install upgrade-configuration' wont complain)
inet_protocols = ipv4

# List of "trusted" SMTP clients (maptype:mapname allowed) that have more
# privileges than "strangers".  If mynetworks is not specified (the default),
# mynetworks_style is used to compute its value.
#mynetworks_style = class
#mynetworks_style = subnet
mynetworks_style = host
#
mynetworks = 127.0.0.0/12 [::ffff:127.0.0.0]/104 [::1]/128

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# List of domains (maptype:mapname allowed) that this machine considers
# itself the final destination for.
mydestination = $myhostname, xolat.games, mail.xolat.games, localhost.xolat.games, localhost

# Maximum size of a user mailbox
mailbox_size_limit = 0

# Optional external command to use instead of mailbox delivery.  If set,
# you must set up an alias to forward root mail to a real user.
#mailbox_command = /usr/bin/procmail
#mailbox_command = /usr/bin/procmail -a "$EXTENSION"
#mailbox_command = 

# List of alias maps to use to lookup local addresses.
# Per Debian Policy it should be /etc/aliases.
alias_maps = hash:/etc/aliases

# List of alias maps to make indexes on, when running newaliases.
alias_database = hash:/etc/aliases

# Notify (or not) local biff service when new mail arrives.
# Rarely used these days.
biff = no

# Separator between user name and address extension (user+foo@domain)
#recipient_delimiter = +
recipient_delimiter = +

# A host to send "other" mail to
#relayhost = $mydomain
#relayhost = [gateway.example.com]
#relayhost = [ip.add.re.ss]:port
#relayhost = uucphost
relayhost = 

# Where to look for Cyrus SASL configuration files.  Upstream default is unset
# (use compiled-in SASL library default), Debian Policy says it should be
# /etc/postfix/sasl.
cyrus_sasl_config_path = /etc/postfix/sasl

# SMTP server RSA key and certificate in PEM format
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.xolat.games/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.xolat.games/privkey.pem
smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtpd_tls_auth_only = yes
smtpd_tls_loglevel = 1
# SMTP Server security level: none|may|encrypt
smtpd_tls_security_level = may

smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:localhost:8991
non_smtpd_milters = inet:localhost:8991
mailbox_command = /usr/lib/dovecot/deliver

smtpd_forbid_bare_newline = normalize
smtpd_forbid_bare_newline_exclusions = $mynetworks

smtpd_sender_login_maps = pcre:/etc/postfix/login_maps.pcre
smtpd_sender_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, permit_mynetworks, reject_unknown_reverse_client_hostname, reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unknown_recipient_domain
smtpd_relay_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_helo_hostname

home_mailbox = Maildir/INBOX

default_privs = mail

header_checks = regexp:/etc/postfix/header_checks

# List of CAs for SMTP Client to trust
# Prefer this over _CApath when smtp is running chrooted
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_loglevel = 1
# SMTP Client TLS security level: none|may|encrypt|...
smtp_tls_security_level = may

smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1

# SMTP Client TLS session cache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
#smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.xolat.games
inet_interfaces = all

Postfix config at cat /etc/postfix/master.cf

# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: https://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (no)    (never) (100)
# ==========================================================================
#smtp	unix	-	-	n	-	-	smtp
smtp      inet  n       -       y       -       -       smtpd
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
# Choose one: enable submission for loopback clients only, or for any client.
#127.0.0.1:submission inet n -   y       -       -       smtpd
   -o content_filter=spamassasin
submission inet n       -       y       -       -       smtpd
   -o syslog_name=postfix/submission
#  -o smtpd_forbid_unauth_pipelining=no
   -o smtpd_tls_security_level=encrypt
   -o smtpd_sasl_auth_enable=yes
   -o smtpd_tls_auth_only=yes
   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
   -o smtpd_sender_restrictions=reject_sender_login_mismatch
   -o smtpd_sender_login_maps=pcre:/etc/postfix/login_maps.pcre
   -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_unauth_destination
#  -o local_header_rewrite_clients=static:all
#  -o smtpd_hide_client_session=yes
#  -o smtpd_reject_unlisted_recipient=no
#     Instead of specifying complex smtpd_<xxx>_restrictions here,
#     specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
#     here, and specify mua_<xxx>_restrictions in main.cf (where
#     "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
#  -o smtpd_client_restrictions=
#  -o smtpd_helo_restrictions=
#  -o smtpd_sender_restrictions=
#  -o smtpd_relay_restrictions=
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
# Choose one: enable submissions for loopback clients only, or for any client.
#127.0.0.1:submissions inet n  -       y       -       -       smtpd
#submissions     inet  n       -       y       -       -       smtpd
#  -o syslog_name=postfix/submissions
#  -o smtpd_forbid_unauth_pipelining=no
   -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o local_header_rewrite_clients=static:all
#  -o smtpd_hide_client_session=yes
#  -o smtpd_reject_unlisted_recipient=no
#     Instead of specifying complex smtpd_<xxx>_restrictions here,
#     specify "smtpd_<xxx>_restrictions=$mua_<xxx>_restrictions"
#     here, and specify mua_<xxx>_restrictions in main.cf (where
#     "<xxx>" is "client", "helo", "sender", "relay", or "recipient").
#  -o smtpd_client_restrictions=
#  -o smtpd_helo_restrictions=
#  -o smtpd_sender_restrictions=
#  -o smtpd_relay_restrictions=
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
smtps	inet	n	-	y	-	-	smtpd
   -o syslog_name=postfix/smtps
   -o smtpd_tls_wrappermode=yes
   -o smtpd_sasl_auth_enable=yes
spamassasin	unix	-	n	n	-	-	pipe
	user=debian-spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}	
#628       inet  n       -       y       -       -       qmqpd
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
        -o syslog_name=${multi_instance_name?{$multi_instance_name}:{postfix}}/$service_name
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       1       scache
postlog   unix-dgram n  -       n       -       1       postlogd

If I will need to put here some Dovecot's configs - let me know from which file in /etc/dovecot/conf.d/ directory ๐Ÿ“‚, okay? ๐Ÿ˜

Thanks in advance! ๐Ÿ˜‰

View original on programming.dev
-5
godotยทGodotbyxolatgames

WebSocketPeer doesn't works when I'm trying to export the game for WebGL.

Hi, folks! โœŒ๏ธ How are you? ๐Ÿ‘‹

I'm working on the game that uses WebSocketPeer for multiplaying.

And when I runs the game, WebSocketPeer works as well. Also when I exports the game for Desktop platforms, then launches this, WebSocketPeer works also.

The problems happens when I exports the game for WebGL:

  1. I export the game for WebGL, compress this to a zip archive, then send this archive to the VPS server.

  2. Connect to this VPS server and unzip archive.

From a browser the game works very well, except connection through WebSocketPeer.

For running this game on a browser, I'm using NGINX as a HTTP server.

This game connect to the game server (that developed separately), that also located on the same machine, and also uses WebSocketPeer.

I have try to point the IP address of the VPS server in the configs of the game, and it doesn't works. Also doesn't works to point "127.0.0.1" in the configs of this game.

Folks, where's the problem may be? And what do I do wrong now? ๐Ÿ˜Ÿ

Thanks in advance.

View original on programming.dev
5
cppยทC++byxolatgames

Create a string that contains random characters

Hi! โœŒ๏ธ I need to generate some string in C++ with random characters that can use all letters from "a" to "z" (include capital letters), and all numbers from 0 to 9 there.

And for examples this should looks somehow like this:

SnHXAsOC5XDYLgiKM5ly

Also I want to encrypt that string then by itself:

SnHXAsOC5XDYLgiKM5ly encrypt with SnHXAsOC5XDYLgiKM5ly key.

So, how can I do this in C++? ๐Ÿค”

Thanks in advance!

View original on programming.dev
-4
godotยทGodotbyxolatgames

Problems with making unique material

Hi, folks! So, I have the problem with making materials as unique.

I need effects, such as painting of ships in red color, will applies only where particles will spawns. But... As you can see those effects can applies also into other ships.

I've already set these materials as "Local to Scene" into inspector tab.

And have create script for making those materials as unique:

func _make_ship_materials_unique() -> void:
	for i in ship.get_children():
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				i.mesh.surface_set_material(n, i.mesh.surface_get_material(n).duplicate(true))

But it given me few results ๐Ÿ˜•

If it can help, here's the script of applying of ships painting:

func damaged_spec_effect() -> void:
	for i in ship.get_children():
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				_create_fade_in_then_out_effect(i.mesh.surface_get_material(n), Color.RED)
func _create_fade_in_then_out_effect(material: Material, final_color: Color) -> void:
	if material is StandardMaterial3D:
		material.albedo_color = Color.WHITE
		var tween = get_tree().create_tween()
		tween.tween_property(material, "albedo_color", final_color, EFFECTS_DURATION / 2)
		tween.tween_property(material, "albedo_color", Color.WHITE, EFFECTS_DURATION / 2)

So, what do I need to do for solving my problem? ๐Ÿค”

View original on programming.dev
9

You reached the end