Skip to content

Commit

Permalink
Add and remove webmail and admin redirects https://forum.virtualmin.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Feb 3, 2024
1 parent 92b13c5 commit 2f82adc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ sub feature_setup
# Save HTML dirs
&feature_find_web_html_cgi_dirs($d);

# Setup webmail redirects
if (&virtual_server::has_webmail_rewrite($d) &&
!$d->{'nowebmailredirect'}) {
&virtual_server::add_webmail_redirect_directives($d, $tmpl, 0);
}

return 1;
}
else {
Expand Down Expand Up @@ -696,6 +702,7 @@ sub feature_delete
# Remove the whole server
&$virtual_server::first_print($text{'feat_delete'});
&lock_all_config_files();
&virtual_server::remove_webmail_redirect_directives($d);
my $mode = &feature_get_web_php_mode($d);
my $conf = &get_config();
my $http = &find("http", $conf);
Expand Down

3 comments on commit 2f82adc

@iliajie
Copy link
Contributor

@iliajie iliajie commented on 2f82adc Feb 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about DNS records?

@jcameron
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iliajie
Copy link
Contributor

@iliajie iliajie commented on 2f82adc Feb 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! It works now! Thank you!

Please sign in to comment.