On Feb 10, 2004, at 4:16 PM, Rick Widmer wrote:
Tom Collins wrote:
Does vpopmail maintain the order of alies lines? I think I read
somewhere that if you are using database storage it does not. I think
that may be a serious problem.
As designed, it does not. I agree that it's a serious problem, and I think it would be easily fixed. Add an auto-incrementing id column and make sure you sort on it.

So... what do you think about branching vpopmail then. I think maintianing order on aliases will be very important. Spam checking and TMDA will certainly require it. I also believe I remember a thread on the qmailadmin mailing list which came to the conclusion that mail robots should always deliver the message to the local mailbox even if the autoresponder decides not to send a reply. (This requires the maildir delivery line to be first in the file.)

No need to branch vpopmail -- we just need to add that column and some additional code to make use of it.


I agree that it is a necessary change.

I added a "valias_remove()" function to the database backends for removing a single entry from the valias table.

That will take some thought... I've been thinking in terms of text files where you pretty much have to write the whole thing out evety time. Hmmm...

There's code in qmailadmin to do it, so we'd just have to move it into vpopmail (and possibly clean it up and/or generalize it).


Secondly, valias_select_all() returns aliases in sorted order when using database backends, but not when using .qmail files.

Is this the one that returns every line of every alias? Is it actually used by anything but vailas -s domain.com?

It's used in QmailAdmin 1.2.1. When you view the list of aliases, it also shows the addresses each alias forwards to.


I think it would be much
better to have one function that returns a list of alias names for a
domain, and a separate function that returns the contents of a single
alias. (We already have the second.) I don't see much use for the
current behavior of valias_select_all() other than the whole domain dump
mode of valias. QmailAdmin would be much easier with a function that
returned just the alias names.

I agree that adding an extra set of valias_ functions to just get a list of aliases would be helpful. It will need to be implemented for each of the database backends and .qmail-alias files (vpalias.c). valias_select_all() should remain though.


As far as sorting the file names, I'd say it is easier to add the code
to vpalias.c than to have to check for valias status in QmailAdmin.

I agree as well. It will just be a matter of making sure callers of those functions call a cleanup function when they're done so we can release any allocated memory.


No. It could be handy, and possibly accomplished in the database
backends by using "GROUP BY" in the SQL query. It should be easily done in the dotqmail backend.

Will you do it, or do I need to learn vpopmail internals too? :)

I may do it. ACIS Ltd Pty might be interested in sponsoring me to do some more work on valias code.


Finally, two more questions...

Can I use valias support to access user .qmail files, or only the ones
in the domain directory?

No, only the .qmail-alias files. Take a look at dotqmail.c in qmailadmin for routines that you might be able to use for managing .qmail files directly.


How can I retrieve data from the system default limits file?
~vpopmail/etc/vlimits.default?

Take a look at vmoddomlimits.c from vpopmail. In particular, vlimits_read_limits_file() can read that file into a vlimits structure (see vlimits.h).


--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter handheld Network Tester: http://sniffter.com/



Reply via email to