mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Update postfix hostname if hostname changed
This commit is contained in:
@@ -60,3 +60,5 @@ Static IPv6 addresses and default routes on Redhat, CentOS, Fedora, Debian and U
|
||||
---- Changes since 1.550 ----
|
||||
The speed, link status and duplex of active ethernet interfaces is now shown on the active interfaces page.
|
||||
On Debian, Ubuntu, Redhat, CentOS and Fedora systems boot-time network interfaces with no IP address can now be created. You can also create network bridges that are connected to ethernet interfaces with no address, for use by virtual machines such as KVM.
|
||||
---- Changes since 1.570 ----
|
||||
If Postfix is installed when the hostname is changed, the mydestination (local hostname) configuration parameter is updated too.
|
||||
|
||||
@@ -81,6 +81,20 @@ if ($in{'hosts'} && $in{'hostname'} ne $old_hostname) {
|
||||
}
|
||||
}
|
||||
|
||||
if (&foreign_installed("postfix") && $in{'hostname'} ne $old_hostname) {
|
||||
# Update postfix mydestination too
|
||||
&foreign_require("postfix");
|
||||
$mydest = &postfix::get_current_value("mydestination");
|
||||
if ($mydest eq $old_hostname) {
|
||||
&postfix::lock_postfix_files();
|
||||
&postfix::set_current_value("mydestination", $in{'hostname'});
|
||||
&postfix::unlock_postfix_files();
|
||||
if (&postfix::is_postfix_running()) {
|
||||
&postfix::reload_postfix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&webmin_log("dns", undef, undef, \%in);
|
||||
&redirect("");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user