• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Changing Hostname +Maillog +Good Practice?

tetrahall

Basic Pleskian
Hi,

This is a quest for knowledge and would greatly appreciate advice from experienced Pleskians.

In a previous post, I encountered the problem of "empty maillog". While working on a new rebuild, I remembered that the problem started after changing hostname via Plesk like this:-

Tools & Settings > Server Settings >specify a valid hostname

Do you think that they are connected? And if so, should one follow a certain procedure, e.g. stop things first (like postfix, rsyslog, etc ..) change the hostname, then restart them again?

Thank you in advance!
 
I already changed a Plesk server hostname a couple of times via "Tools & Settings -> Server Settings" and never had any issues so far.

There are a few things however that you should check:
  • Make sure the new hostname is a FQDN that can be resolved
  • Make sure the entry in /etc/hosts matches your IP and hostname
  • Depending on your OS you may also need to update your /etc/hostname file
The "plesk repair mail" tool will also tell you if it detects any errors
 
Monty,

Thanks a lot for your response. I can now exclude change of hostname as a cause, taking into consideration the 'checks' you mentioned:-

Code:
There are a few things however that you should check:

    Make sure the new hostname is a FQDN that can be resolved
    Make sure the entry in /etc/hosts matches your IP and hostname
    Depending on your OS you may also need to update your /etc/hostname file

An empty maillog was a terrible experience for me and I am constantly looking for tools and ways to investigate the cause and reverse the fault if found. After posting this question, a friend told me that they had a similar problem and found a solution that works here:

The default configuration of rsyslog may not provide the log data integrity for xcat log locally · Issue #3910 · xcat2/xcat-core (the bottom comment)

They said the only thing about this solution is that, although it works, rsyslog outputs every new entry in maillog to stdout as well. It is obviously inconvenient when they need to open SSH window! I am not sure but I think this can be remedied somehow.

Just in case someone reads this message in the future and the link above doesn't work, I am going to insert the last comment below.

Kind regards!
- - - - - - - - - -

Forget the workaround method in the last comment. Here is the real solution.

Edit file, /etc/systemd/journald.conf. The original file shipped by Red Hat has the content below.
Code:
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg

Uncomment the line #RateLimitInterval=30s. And change line #RateLimitBurst=1000 to RateLimitBurst=1000000. After the editing, the file should look like below.

The original settings has a 1000-log-entries-per-30-seconds upper limit of the rate limit of logging. After the editing, the rate limit will be raised to 1,000,000 log entries per 30 seconds.

Code:
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
RateLimitInterval=30s
RateLimitBurst=1000000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=yes
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg

Make sure file /etc/systemd/journald.conf looks good. And, restart the systemd-journald service to apply the changes. Run command systemctl restart systemd-journald.

Please notice, the rate limit is against systemd-journald. Which is the local log gathering facility provided by systemd. Thus, this problem has no relationship with rsyslog.

- - - - - - - - - -
 
Last edited:
Back
Top