When pkg install postfix it keeps asing the question: Would you like to activate Postfix in /usr/local/etc/mail/mailer.conf [n]? which stop the process of pkg upgrade, it also makes it unfriendly for configuration managers such as puppet, chef etc. Please consider removing the question
Hm, are you sure the question pops up during upgrade? I've designed the script to not ask if the package is installed for example with saltstack or during upgrade or during package building. I can redesign the script to always install the mailer.conf but then we also have to remove/install mailer.conf during upgrades, even I haven't tested if pkg issue bug #212335 has any side effects during the update.
Yes it does, pkg does not expose any env var that would prevent pkg upgrade. It is also the only package that is going interractive, imho it should just explain the user how to modify mailer.conf in message and maybe install a sample of it, not try to replace it. Also note that on mailerconf on recent freebsd reads /usr/local/etc/mailer.conf (but that is a side note)
>Yes it does, pkg does not expose any env var that would prevent pkg upgrade. Env var is not required, the script checks if all replacements are listed in mailer.conf, >It is also the only package that is going interractive, imho it should just >explain the user how to modify mailer.conf in message and maybe install a >sample of it, not try to replace it. In case no tty is detected it displays already a message with the location of a valid mailer.conf >Also note that on mailerconf on recent freebsd reads /usr/local/etc/mailer.conf That's already implemented in every postfix port since 10.3-BETAx e.g. https://svnweb.freebsd.org/ports/head/mail/postfix/files/pkg-install.in?r1=405234&r2=409551 Do you have any puppet/chef log for me? I'm having only daily saltstack logs for fresh installs / upgrades
ssmtp will just inform the user via pkg-message about changing the mailer.conf and show which lines have to be added, and I agree with that approach. No interactive installation please. Let's not become Debian. :) I'd propose a hybrid approach where the pkg adds commented out lines to the mailer.conf and informs the user via pkg-message about that.
Btw, I can confirm that ansible installs it just fine, no interruption.
Adding comment in mailer.conf would be imho a bad idea. ===> Creating users Using existing user 'postfix'. [52/76] Extracting postfix-3.1.3,1: 100% You may need to manually remove /usr/local/etc/postfix/main.cf if it is no longer needed. You may need to manually remove /usr/local/etc/postfix/master.cf if it is no longer needed. Would you like to activate Postfix in /usr/local/etc/mail/mailer.conf [n]? =============================================================== Postfix was *not* activated in /usr/local/etc/mail/mailer.conf! To finish installation run the following commands: mkdir -p /usr/local/etc/mail install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf =============================================================== This is the log of my pkg upgrade from this morning, it was warning on me to hint y or n. IMHO this is a bad idea. (and yes I can see now the pkg-message is already there :)
@Babt Thats really an unexpected behavior, in my previous test (pre 10.3 beta) i was running into this only in case I was connected via ssh (test -t => 0) and $x/mail/mailer.conf cmp mailer.conf.postfix was not returning 0 (e.g. after os upgrade and overwritten etc/mail/mailer.conf and not existing $localbase/etc/mail/mailer.conf. I will do some additional tests to install the config as @sample, but then it is possible to loose some mails or inject them to the original sendmail if anything goes wrong during upgrade
pkg does not allow anymore interractive script anymore (closing stdin) which by side effect automatically resolve this issue