Package: postfix
Version: 3.1.3-1
Severity: normal

I provide my own main.cf in a separate .deb via config-package-dev.

So I preseed postfix to disable postinst's main.cf:

    debconf-set-selections <<< 'postfix postfix/main_mailer_type select No 
configuration'

This worked (with some postfix-multi warnings) about a month ago, but now I get 
this:

    root@slime:~# dpkg --configure postfix
    Setting up postfix (3.1.3-1) ...

    Postfix was not set up.  Start with
      cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
    .  If you need to make changes, edit
    /etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
    values, see postconf(1).

    After modifying main.cf, be sure to run 'service postfix reload'.

    cp: cannot stat '/etc/postfix/main.cf': No such file or directory
    dpkg: error processing package postfix (--configure):
     subprocess installed post-installation script returned error exit status 1
    Processing triggers for libc-bin (2.24-5) ...
    Errors were encountered while processing:
     postfix

I think this is due to the #838528 fix being a bit over-enthusiastic:

    root@slime:~# sed -i 1s/$/vx/ /var/lib/dpkg/info/postfix.postinst
    root@slime:~# dpkg --configure postfix
    [...]
    # Make sure we have main/master.cf.proto for multi-inst (#838528)
    if [ ! -f /etc/postfix/main.cf.proto ]; then
        cp /etc/postfix/main.cf /etc/postfix/main.cf.proto
    fi
    + [ ! -f /etc/postfix/main.cf.proto ]
    + cp /etc/postfix/main.cf /etc/postfix/main.cf.proto
    cp: cannot stat '/etc/postfix/main.cf': No such file or directory
    dpkg: error processing package postfix (--configure):
     subprocess installed post-installation script returned error exit status 1
    Processing triggers for libc-bin (2.24-5) ...
    Errors were encountered while processing:
     postfix

I am not sure how this should be fixed.

Reply via email to