Package: postfix
Version: 2.5.5-1.1
Severity: grave

The logic in postfix.postinst that attempts to ensure there are certain entries in the master.cf file will corrupt an existing master.cf that is not terminated with a newline character. It is contained in this section of postfix.postinst....

    while read line; do
        serv=${line%% *}
        if ! grep -qE "^${serv}[[:space:]]" ${MASTER}; then
            [ -n "$echoed" ] || echo "in master.cf:"; echoed=y
            echo "  adding missing entry for ${serv} service"
            echo "$line" >> ${MASTER}
        fi
    done << @@EOF@@
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
discard   unix  -       -       -       -       -       discard
retry     unix  -       -       -       -       -       error
@@EOF@@

... You can see that when echo appends $line to ${MASTER}, it will have pasted it on the end of the last line. In my case that caused my spamfilter injection point to silently fail causing the mailserver to stop delivering mail.

An easy fix would be to stick a blank line in front of the added line to ensure it can't be extending an existing line.

--
Jim Studt
[EMAIL PROTECTED]






--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to