• Bug#1109039: tin: after upgrade, some user configuration is removed

    From Vincent Lefevre@21:1/5 to All on Thu Jul 10 10:40:02 2025
    Package: tin
    Version: 1:2.6.5~20250409-1
    Severity: grave
    Justification: causes non-serious data loss

    When running tin after the upgrade to the new version, some of the
    user configuration is removed (I could see that from a backup):
    * in .tin/attributes: user comments (including commented rules).
    * in .tin/filter, an expired rule, i.e. with a "time" parameter
    and an old time (even though the rule has expired, the user may
    want to keep information from it).

    Such data has no influence on the behavior of tin, but this may be
    valuable information written by the user (e.g. explaining why a rule
    has been added or a commented rule that the user may want to re-add
    in the future) and must be kept in some form.

    -- System Information:
    Debian Release: 13.0
    APT prefers unstable-debug
    APT policy: (500, 'unstable-debug'), (500, 'testing-security'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.7.12-amd64 (SMP w/16 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_WARN
    Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages tin depends on:
    ii debconf [debconf-2.0] 1.5.91
    ii libc6 2.41-9
    ii libcanlock3 3.3.1-1
    ii libcurl4t64 8.14.1-2
    ii libgsasl18 2.2.2-1.1
    ii libicu76 76.1-4
    ii libidn2-0 2.3.8-2
    ii libncursesw6 6.5+20250216-2
    ii libpcre2-8-0 10.45-1
    ii libssl3t64 3.5.0-2
    ii libtinfo6 6.5+20250216-2
    ii libuu0 0.5.20+20250228-1
    ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1

    Versions of packages tin recommends:
    ii postfix [mail-transport-agent] 3.10.2-1

    Versions of packages tin suggests:
    ii gnupg 2.4.7-21
    ii ispell 3.4.06-1

    -- debconf information:
    shared/news/server: news.vinc17.org

    --
    Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
    100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
    Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Urs =?iso-8859-1?Q?Jan=DFen?=@21:1/5 to Vincent Lefevre on Thu Jul 10 17:00:01 2025
    On Thu, Jul 10, 2025 at 03:57:25PM +0200, Vincent Lefevre wrote:
    On 2025-07-10 14:01:41 +0200, Urs Janßen wrote:
    First of all, expired filter rules have ever been removed from the
    filter file since Iain changed the format between tin-1.22 and
    270194APLHA so that behaviour is the same for the last ~31 years.

    It is possible that these filter rules got removed before I had
    a chance to see them (it is quite uncommon that I closely look
    at these config files). In my case, they are created automatically
    by add_posted_to_filter=ON.

    What the current[1] code does is:
    - set the write flag if the file version is older than the expected version
    - read the filter file rule by rule; if any expired rule is found skip
    that rule set the write flag
    - when all rules have been read, check the write flag and
    write the file if needed.

    This happens on every read of the file (e.g. also after 'E'dit filter
    file).

    It appears that I have a more general rule, which is permanent:

    group=*
    case=0
    score=hot
    msgid=vinc17\.org

    (though it is not guaranteed to work in all cases, if ever my msgid
    format changes), and this could be another reason why I did not
    notice the issue before.

    I don't use add_posted_to_filter but filter on "my" Message-ID only.
    The format didn't change since some time before 01.1997.

    And there is EVIL_INSIDE which could be used to let tin
    generate the Message-ID (based on login name + FQDN.
    I doubt that will be more stable than the ones comming from your
    server. It's only mentioned in doc/INSTALL like FORGERY
    (which does alter the Message-ID scheeme if used together with
    EVIL_INSIDE) for reasons.

    [1] I have a work in progress patch (lacks the 'M'enu/
    tinrc option to enable it, currently it's a compile
    time "option") to keep expired rules in the filter
    (as they are, they are just not taken into account).
    Needs some testing, but I guess it will be available
    with the next snapshot/release.

    Second, comments in attributes (and tinrc etc.pp) have ever been dropped when writing them since those file have a version number (for attributes that's since 1.5.18 release 20030602).

    It's strange that I did not notice that before. Perhaps I was blindly
    copying my config from my own copy to the .tin/attributes file. But

    The attribute file format is relative stable and there
    is no expire mechanism like for filter rules. So chances
    are high(er) that comments survive 1-3 years ,-)

    Note that the attributes file starts with

    # Group attributes file V1.0.xx for the TIN newsreader
    # Do not edit this comment block

    so that I expected that anything after this comment block would
    be preserved (or nicely converted).

    That should read as "feel free to adjust any _options_ manually"
    and no as "everthing in the file is preserved as is".
    Same applies to the tinrc and serverrc and ...

    HTH,
    urs

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)