John Simpson wrote:
while answering a question for somebody on another mailing list i
happened to notice that, at least as of vpopmail 5.4.10, the structure
of the "valias" table created in a mysql database does not have any
provision for sequencing the entries attached to a given alias.
No it does not.
in many cases this shouldn't make a difference, but occasionally
somebody may do filtering or something similar, where the sequence that
the items are processed is important. (i'm doing this with my own
.qmail file to sort mailing list traffic into separate folders.)
Yes, I do this occasionaly, it can bite you.
first, how does the vdelivermail program decide in which order to
process the entries when there are multiple records? does it use them
in the order that mysql delivers them? and if so, does mysql have any
guaranteed order that it will present the records with an explicit
ORDER BY clause in the query?
That I recall, it takes them in the order they are returned by mysql,
there is not ORDER BY in the SQL, the statements it uses are in the
source. I have thought of expreimenting with changing this statement.
second, if a user has one or more existing valias records, the "valias
-i" command would seem to work by sending an INSERT query with the new
line. is the new line added to the beginning of the sequence, the end
of the sequence, or is there in fact no guaranteed sequence at all?
None at all.
i wanted to ask this here before reporting it as a bug on the
Not really a bug as I believe the valias was intended as a forwarding
tool, I may be wrong. Ken or Tom would be able to answer better. I only
know what I know as I had discussions with Tom Collins about this same
topic a while back.