Your message dated Thu, 13 Dec 2018 13:24:15 -0500
with message-id <2708723.ap3Wt5OtXV@kitterma-e6430>
and subject line Only affects old, no longer supported upgrades
has caused the Debian Bug report #479064,
regarding etch->lenny corrupts master.cf if no trailing newline
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
479064: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479064
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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]






--- End Message ---
--- Begin Message ---
As a relatively new maintainer of postfix, I'm working on cleaning up the BTS.  
This bug does not relate to any configurations the Debian project still 
supports.

Scott K

--- End Message ---

Reply via email to