On Mittwoch, 20. Februar 2008 Paul J Stevens wrote:
> > Now I'd like to know if this is good behaviour, or if I should
> > preferrably enter [EMAIL PROTECTED] instead of 777.
>
> You're saving some CPU cycles on dbmail delivery, because that is
> what dbmail does during delivery: try to resolve a string value in
> the deliver_to field to a local user.

That's what I thought and why I preferred numbers. On alias creation, we 
lookup the deliver_to address in dbmail_users, and if found enter the 
user_idnr instead.
But that is at least sometimes not what you want: If, like in my 
example, the user sets a forward from his e-mail address, he doesn't 
receive e-mail which arrives through an alias.

Example:
dbmail_users contains:
userid = [EMAIL PROTECTED], user_idnr=777

dbmail_aliases contains:
[EMAIL PROTECTED] -> 777
[EMAIL PROTECTED] -> [EMAIL PROTECTED]
[EMAIL PROTECTED] -> 777

Then e-mail to [EMAIL PROTECTED] doesn't arrive @home. From that, I guess I 
should NEVER use numbers except when forwarding a userid to an external 
address also (like the 2 entries from [EMAIL PROTECTED] in above example).

What I did not mention: our "userid" are full e-mail addresses to 
simplify logins.

> > I ask this because I just found a race condition: When a user goes
> > on holidays, he wants to have all his business e-mail at his home
> > account. Example: [EMAIL PROTECTED] wants his e-mails @work and @home:
> > dbmail_aliases:
> > [EMAIL PROTECTED] -> [EMAIL PROTECTED]
> > [EMAIL PROTECTED] -> [EMAIL PROTECTED]
>
> the [EMAIL PROTECTED] -> [EMAIL PROTECTED] is bollock. That is a loop and thus
> skipped by dbmail's delivery chain. I'm also pretty sure dbmail-users
> doesn't allow you to enter such a setup.

Sorry, I was expanding it. It should have read
[EMAIL PROTECTED] -> 777
[EMAIL PROTECTED] -> [EMAIL PROTECTED]

> > This makes all e-mail sent to [EMAIL PROTECTED] appear on the dbmail
> > user "[EMAIL PROTECTED]", as well as a forward on [EMAIL PROTECTED] Simple.
> > BUT if now he has an alias
> > [EMAIL PROTECTED] -> [EMAIL PROTECTED]
> > this was already replaced with
> > [EMAIL PROTECTED] -> 777
> > and then [EMAIL PROTECTED] would only go to local user 777 and not the
> > [EMAIL PROTECTED] e-mail, and this is not easy to find.
>
> That is correct. If you setup a forward
> (alias:[EMAIL PROTECTED]>deliver_to:[EMAIL PROTECTED]) and have an alias
> (alias:[EMAIL PROTECTED]>delivery_to:777) there is no way for dbmail to
> know that you want the forward to apply to *all* possibly valid
> addresses that apply to user 777. In fact, once the destination
> resolver hits a numeric value in delivery_to which points to a valid
> local user, the resolver considers it's job done.

Yes, so our web interface should NEVER use numbers in deliver_to except 
for userid forwards, right? 

There's one other possible solution I can think of:
Always use numbers in deliver_to as we do now, BUT as soon as a user 
creates a forward for his userid, change all deliver_to which contain 
his user_idnr to his userid instead. Example:

dbmail_users contains:
userid = [EMAIL PROTECTED], user_idnr=777

dbmail_aliases contains:
[EMAIL PROTECTED] -> 777
[EMAIL PROTECTED] -> 777

Then when the user creates a forward
[EMAIL PROTECTED] -> [EMAIL PROTECTED]

change all deliver_to from 777 to [EMAIL PROTECTED], and create an alias entry
[EMAIL PROTECTED] -> 777

That would help performance wherever possible, and make user forwards 
fully possible. Is this correct?

> > So could I say that always using the e-mail address instead of the
> > user_idnr is recommended? Or is there any good reason to enter the
> > user_idnr in deliver_to?
>
> I'm not quite sure I get the picture here, because I get the feeling
> you are mixing aliases with usernames as well.

Sorry, I just mentioned above: our userid's are full e-mail addresses, 
for easier logins.

mfg zmi
-- 
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0676/846 914 666                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38  500E CE14 91F7 1C12 09B4
// Keyserver: www.keyserver.net                   Key-ID: 1C1209B4

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to