Brian Candler wrote:
On Fri, Feb 17, 2006 at 10:42:52AM +0100, Giuliano Gavazzi wrote:
as far as I know what you are proposing is the way cyrus works. It is whatever delivers locally your mail that has to use hard links, and has to be clever enough to deal with possible mailstore on separate file systems. Some MTAs could be modified more easily than others to support this. Exim for instance, I think, has one process per delivery (and adds a Envelope-to: header per recipient..), making it darn difficult to make it use hard links in the local delivery.

Not true. Exim will happily deliver a single copy of a message with multiple
local recipients, if you configure it to do so; it will then list *all* the
addresses on the single Envelope-to: header.

From Exim's spec.txt:

| 
+------------------------------------------------------------------------------+
| |envelope_to_add     |  Use: transports   |  Type: boolean  |    Default: 
false|
| 
+------------------------------------------------------------------------------+
| | If this option is true, an Envelope-to: header is added to the message. This
| gives the original address(es) in the incoming envelope that caused this
| delivery to happen. More than one address may be present if the transport is
| configured to handle several addresses at once, or if more than one original
| address was redirected to the same final address.

...

| In special cases, it may be desirable to handle several addresses at once in a
| local transport, for example:
| | * In an appendfile transport, when storing messages in files for later
|     delivery by some other means, a single copy of the message with multiple
|     recipients saves space.
|   * In an lmtp transport, when delivering over "local SMTP" to some process, a
|     single copy saves time, and is the normal way LMTP is expected to work.
|   * In a pipe transport, when passing the message to a scanner program or to
|     some other delivery mechanism such as UUCP, multiple recipients may be
|     acceptable.
| | The three local transports (appendfile, lmtp, and pipe) all have the same
| options for controlling multiple ("batched") deliveries, namely batch_max and
| batch_id. To save repeating the information for each transport, these options
| are described here.
| | The batch_max option specifies the maximum number of addresses that can be
| delivered together in a single run of the transport. Its default value is one.
| When more than one address is routed to a transport that has a batch_max value
| greater than one, the addresses are delivered in a batch (that is, in a single
| run of the transport), subject to certain conditions:

... (snip remainder of Exim's usual detailled accurate documentation)

I've tested this, and it works fine, where multiple addresses are aliased
into the same mailbox. A single copy gets delivered, with all the original
envelope addresses in the Envelope-To: header.

However, Exim's built-in appendfile transport won't deliver a copy of the
message to maildir A and then insert hard links to maildirs B, C and D. If
you want to do that, maybe the best thing to do is to use an external
program; for example you could modify deliverquota so that it takes more
than one Maildir path on its command line. You'd have to be careful to
update all the quotas in all the Maildirs of course.

If you don't like the overhead of forking, you could always use Exim's
${dlfunc} capability, which runs a locally-written C function loaded as a
shared library.

Regards,

Brian.

I'm writing a shell script: it identifies "duplicated" mails, strip "offending header lines" like "Delivered-To:" and hard links files paying attention to different filesystems/devices. To avoid complete scanning, a persistent "memory" is saved in a status file.
After some refinements I'll release it.
Are there some guys want to try it on a (test!) battlefield?

Regards
Christian F.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to