mirror of
https://github.com/mageddo/dns-proxy-server.git
synced 2026-04-25 09:25:56 +03:00
[GH-ISSUE #78] postfix could not resolve dns. #34
Labels
No labels
bug
confirmed
discussion
duplicate
enhancement
feature
feature-request
not-planned
pull-request
secondary-feature
stale
triage
waiting-feedback
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/dns-proxy-server-mageddo#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @johnbritto1 on GitHub (Jul 6, 2018).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/78
On the first deployment, docker assigns a NAT IP, eg: 10.10.10.2 which is appended on /etc/resolv.conf
When we restart the dns-proxy-server, docker somethings assign different NAT IP, eg 10.10.10.3.
Postfix (In host) usually on restart, copy the /etc/resolv.conf to /var/spool/postfix/etc/resolv.conf
the value set in /var/spool/postfix/etc/resolv.conf is IP: 10.10.10.3.
Hence, I have to restart postfix every time when the IP assigned to dns-proxy-server change.
Is there any way to automate this behaviour.
Thanks.
@mageddo commented on GitHub (Jul 6, 2018):
Actually DPS have
MG_RESOLVCONFenv where you can setresolv.confpath, but now it supports only one entry, we can change that to support many entries then DPS will modify them, what do you think about that?Can you confirm if just updating
/var/spool/postfix/etc/resolv.confmakes postfix work again?@johnbritto1 commented on GitHub (Jul 6, 2018):
For some reason, I could not test by manually modifying the postfix resolve.conf (/var/spool/postfix/etc/resolv.conf). But surely I will test again and report back
But It looks like when postfix restart, it actually does copy the /etc/resolve.conf to /var/spool/postfix/etc/resolv.conf.
In past, I usually restart postfix and that solve the problem.
I think having MG_RESOLVCONF env to support more than one resolv entry would be a solution.
@mageddo commented on GitHub (Jul 6, 2018):
Okay, so let's wait your feedback then we can work on that
@johnbritto1 commented on GitHub (Nov 22, 2018):
Updating the /var/spool/postfix/etc/resolv.conf with the values of /etc/resolv.conf makes the postfix to function properly.
@mageddo commented on GitHub (Mar 4, 2023):
MG_RESOLVCONF supports multiple conf files since DPS 3.5.0, see the docs . In your case run DPS docker container with static IP is also an option.
Closing the issue as we already have a solution, thanks for your help.