OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: Feature inquiry/RFC: new, more generic $mail_spool main.cf parameter?
From: Matthias Andree (madt.e-technik.uni-dortmund.de)
Date: Tue Oct 03 2000 - 19:21:05 CDT


I am summarizing my suggestion and the suggestions that came from Colin
Whittaker, Michael Tokarev, Josh Tiefenbach and Brad Knowles (in reverse
alphabetic order) and trying to get them in.

Michael Tokarev states that a regexp or pcre map can currently do what
we're after.

Josh Tiefenbach suggests having a separate parameter for the mail spool
type and using a map for arbitrary $user |-> spool_location mapping. The
separate parameter would not adversely affect any other parameter
currently, but change the semantics of the spool location parameter and
introduce a deviation from the current Postfix behaviour and the scheme
that procmail 3.14+ uses. I don't see why this would be useful.

Colin Whittaker has a similar suggestion to mine, in that he expands the
variable syntax, where $VAR:N would be expanded to the N'th character of
$VAR.

I am leaving the aims A. to E. out since these are untouched, only
one is added:

F. The new mail spool scheme MUST NOT impose artificial limits on
   scalability.

Michael's and Josh's suggestion to use maps are a good idea, plus the
maps would not even conflict with the scheme I have been suggesting --
provided that Colin's or my second approach (have special expansion
parameters) are used.

Brad's constation that hash conflicts may affect scalability should be
taken seriously, and I'm wondering if using MD5, SHA1, hash127, CRC32 or
another CRC or hash would be useful in addition to the plain $user
chopping. This would however enhance the need to offer the actual mail
spool location to the outside world, most probably POP3 and IMAP4
servers. I cannot currently imagine how this would fit into a
regexp/pcre map. From the $h1, $h2, $h3 (myself) or $user:1, $user:2
(Colin) suggestions, it might be useful to define a variable $hash in
the mail_spool_dir expansion, and a hash_type parameter which could be
from the set { username, MD5, SHA1 } for example.

So, I am suggesting this syntax:

mail_spool = maptype:/path/to/map (no variable expansion)
             | /path/to/mailspool (variable expansion)
mail_spool_hash_type = username
                       | name-of-a-hash (MD5/SHA1, whatever)

the mail_spool map could get $completedestinationaddress%$hash as key to search for (suggest
better alternatives in place of % if you think % is no good), with $hash
being the hash function applied on the

-- 
Matthias Andree