Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app mail - Add main domain into hosts file #1780

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions hooks/conf_regen/43-dnsmasq
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ do_post_regen() {
short_hostname=$(hostname -s)
grep -q "127.0.0.1.*$short_hostname" /etc/hosts || echo -e "\n127.0.0.1\t$short_hostname" >>/etc/hosts

# For SMTP connexion from apps wich request valid certificate we need to force main domain to point to localhost ip
# because connexion on external ip is forbinden by mail server for apps.
main_domain=$(yunohost domain main-domain --output-as plain)
grep -q "127.0.0.1.*$main_domain" /etc/hosts || echo -e "\n127.0.0.1\t$main_domain" >>/etc/hosts

[[ -n "$regen_conf_files" ]] || return 0

# Remove / disable services likely to conflict with dnsmasq
Expand Down