Results 1 to 3 of 3

Thread: Unfortunate code assumptions about postfix_qid

  1. #1
    hogne is offline Member
    Join Date
    Aug 2007
    Posts
    11
    Rep Power
    8

    Default Unfortunate code assumptions about postfix_qid

    Hi

    On Ubuntu 6.06 LTS (Server Edition) with Zimbra 4.5.6 (zcs-4.5.6_GA_1044.UBUNTU6.tgz) there are some problems with the way Postfix QIDs are handled. The code seem to assume that the length of these are max 12 digits. On my system they are 13 digits.

    In /opt/zimbra/libexec/zmlogger the following code extracts the QID:

    Code:
     $qid = $1 if ($app =~ /^postfix/ && $msg =~ /^(\S{8,12}): /);
    This doesn't quite work when your QID is of a different length than 12 digits.
    Changing it to the following will remove this hard coded length requirement:

    Code:
    $qid = $1 if ($app =~ /^postfix/ && $msg =~ /^([A-F0-9]+): /);
    This enables the QID to get entered into the postfix_qid field in the raw_logs sql table instead of it having the value of NULL which makes the scripts parsing raw_log ignore it.

    However this only partially fixes the problem because the mysql table has the same assumption about max length of 12 digits:

    Code:
    | Field       | Type                |
    | postfix_qid | varchar(12)     |
    The result is that while the QID gets inserted into the table it gets truncated by in this case 1 digit.

    Example extracted from raw_logs table:

    msg field:

    Code:
    F186C48003208: to=, relay=mail.foo.bar[111.1.1.1], delay=1, status=sent (250 2.1.5 OK)
    postfix_qid field:

    Code:
    F186C4800320
    Note: I had a similar thread about this which got corrupted because I forgot to disable my no-script add-on when editing the post which caused the submit to not finish as it should. I've asked for it to be deleted.
    Last edited by hogne; 09-04-2007 at 12:36 AM. Reason: typo

  2. #2
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,566
    Rep Power
    57

    Default

    If you haven't already, could you file a report in bugzilla.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    hogne is offline Member
    Join Date
    Aug 2007
    Posts
    11
    Rep Power
    8

    Default

    Bug reported: Bug 19915 - code assumptions about postfix_qid: max length of 12, on some systems they are longer

    Also for reference:
    MTA logging question

    It seems the QID length can vary quite a lot from system to system.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Postfix problem
    By jimbo in forum Administrators
    Replies: 46
    Last Post: 07-23-2007, 05:24 AM
  2. 4.53: tomcat is not running
    By michaeln in forum Administrators
    Replies: 41
    Last Post: 06-13-2007, 06:42 PM
  3. mysql.server is not running
    By Oswald-Kolle in forum Installation
    Replies: 27
    Last Post: 05-01-2007, 08:28 AM
  4. 3.0 to 4.5.3 Upgrade failed (mysql error)
    By dealt in forum Installation
    Replies: 35
    Last Post: 03-19-2007, 10:30 PM
  5. upgrade to 4.0.3 antispam does'nt work
    By lucanannipieri in forum Administrators
    Replies: 14
    Last Post: 11-07-2006, 03:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •