Steffen Schebesta: > Hello everybody, > > I deliver mails to my Postfix through smtpd. Postfix then takes it and sends > it out to the recipient. > > Now I'm trying to change the queue_id for each email in Postfix 2.9 source > code so that it is equal to the Message-ID (it is unique, don't worry) that > I set in the email header when passing the email to Postfix through smtpd. > I've looked in the source code for hours but cannot find the first time > queue_id is set. > > In smtpd.c that (in my understanding) handles incoming mail through smtpd > the variable state->queue_id is already used and only read but not written. > > I would really appreciate any tips where I can find the initial setting and > on how I can set state->queue_id to Message-ID
Reasons not to use the message-id as the queue file name: - Different messages may contain the same Message-ID value. - Some messages don't contain a Message-ID. This field is not required by current RFC documents. - Chicken-and-egg problem: Postfix chooses the queue file name (and creates the file) before it receives the message content. I suggest that you set "enable_long_queue_ids = yes". Long queue ID strings don't repeat as long as your clock moves forward. Wietse