[Exim] WishList: mailstore filename as variable

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Exim Users
Subject: [Exim] WishList: mailstore filename as variable
Hiya,

We're going live with an Exim4 system delivering to mailstore format
directories. In the process of this, I needed to reconstruct a specific
header in Exim, which to be as compatible as possible needed to contain
the base of the filename in the maildrop directory -- the bit before the
".tmp"/".env"/".msg" suffix.

Reading the source to find how Exim constructed the filename, it was
easy to replicate on an appendfile Transport, with a rule like this:

  mailstore_format
  message_prefix = Received: \
        from $primary_hostname by mailstore \
        for ${escape:$local_part@$domain}\n\t\
        id $message_id-${base62:$pid}; $tod_full\n


This works excellently, insofar as it goes. Everything looks rock solid
and I'm rediscovering why I like Exim for most MTA needs. :^)

However (there's always a "but") I'm a little concerned about future
compatibility; if Exim changes the format of the filenames, for whatever
reason, there's a risk of the configs getting out of sync with the code.
This is mostly general paranoia on my part about doing the same
calculation in two places in any situation where the results aren't used
for mutual double-checking.

Is it feasible to add a new variable available for expansion which
includes the name that will be used, please? Something like
mailstore_basename, to correspond to the C "basename" variable in the
section of code just after the third SUPPORT_MAILSTORE ifdef in
appendfile.c ?

Thanks,
--
2001: Blogging invented. Promises to change the way people bore strangers with
banal anecdotes about their pets. <http://www.thelemon.net/issues/timeline.php>