Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-04-2007, 12:33 AM
Member
 
Posts: 11
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
Reply With Quote
  #2 (permalink)  
Old 09-04-2007, 12:36 AM
Zimbra Consultant & Moderator
 
Posts: 20,316
Default

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


Bill
Reply With Quote
  #3 (permalink)  
Old 09-04-2007, 12:51 AM
Member
 
Posts: 11
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.