Will Berry wrote:
Paul J Stevens wrote:
Since dbmail's autoreply functionality is less than useful, I decided
to whip up a script to mimic the vacation functionality without having
to provide posix users as required by vacation itself.
what do you think?
I think the script looks very nice. But here is a question. Since 2.0
is not exactly out yet, and one of the main developers is now saying the
auto-reply feature is "less than useful", should auto-replies just be
dropped from the software entirely in favor of an add-on like this
vacation.py script?
Will, I agree. It should either be fixed or be removed. But that goes
for several other more important subsystems as well (read: sieve and ldap).
Unless of course someone is actually using the current auto-reply
functionality. Very dangerous code (mail-loops galore) I suspect.
Frankly, I needed something *now* for a client, and I'm just *much* more
productive in python than in c.
Whichever, through a build-in or external facility: it should be done
right in the end and should therefore adher to dbmail's inherently
distributed nature. (read: minimal filesystem dependancies)
The script is a quick-and-dirty hack. But it works, and fills a need for
me at least.
And if not, then shouldn't the database structure
at least be brought up to speed to support this kind of functionality
natively?
I see three possibilities for how to implement this in the database:
1) alter table auto_replies add column flags set ('active') not null
default '' after user_idnr;
2) alter table auto_replies add column active_flag tinyint unsigned not
null default 0 after user_idnr;
3) alter table users add column auto_reply_flag bigint unsigned not
null default 0 after maxmail_size;
alter table auto_replies drop column user_idnr;
The last option, my favorite, would limit the number of auto-replies for
any mailbox to one, which seems wise, and would allow multiple users to
have the same "standard" auto-reply.
I think auto-replies should depend on the recipient address, and not be
linked to a mailbox at all. That is how vacation works, and that is how
I've setup my script.
There are several good reasons to do it like that: you never want to
auto-reply to mail from lists, daemons, etc... You only want to reply to
mail that is specifically targeted at a certain address, never at a
maildrop. Also, you want to remember when you last sent a reply from a
certain address to a certain address. Well, you read the code.
Mapping all these features to some db table is trivial. Knowing which
datastructures you want to store is key issue.
But I like the activation flag idea.
--
________________________________________________________________
Paul Stevens mailto:[EMAIL PROTECTED]
NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
The Netherlands________________________________http://www.nfg.nl