Edit: For anyone else having this problem, this question was actually very badly asked/understood and a better description of the problem (and the correct solution) can be found here.
I'm trying to set up mail on my Raspberry Pi. I've set up and configured Postfix and everything generally works, except at boot it seems that the script /etc/init.d/postfix
copies the file /etc/resolv.conf
to its chroot before it's actually been updated. This reslults in email sending failing with DNS issues.
There's a better write-up of this in this blog post along with a workaround (injecting a "sleep 5" in the startup script).
I'm curious about how/why this happens (and why it's presumably affecting only the Pi, or few enough people that it hasn't been noticed/fixed) and where the bug actually lies (so I can raise it - is it a postfix issue, or something on the Pi not behaving as expected?).
The /etc/init.d/postfix
file has this at the top (says it relies on network; not sure if that means it shouldn't start prior to resolveconf being done?)
# Provides: postfix mail-transport-agent
# Required-Start: $local_fs $remote_fs $syslog $named $network $time
# Required-Stop: $local_fs $remote_fs $syslog $named $network
# Should-Start: postgresql mysql clamav-daemon postgrey spamassassin saslauthd dovecot
# Should-Stop: postgresql mysql clamav-daemon postgrey spamassassin saslauthd dovecot
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Postfix Mail Transport Agent
# Description: postfix is a Mail Transport agent
What is the intended mechanism for ensuring this doesn't happen?