On Sonntag, 17. Dezember 2006 18:36 Paul J Stevens wrote: > Well, some of us will disagree there. The recipient MTA should also > know about recipients.
I got misunderstood: Of course the MTA must know which recipients exist. I showed in an earlier e-mail my SQL query to the extended dbmail with domains table. > > The MTA should only have to request if a user and/or domain exists, > > and send it to the mailserver. The rewriting should be in there, as > > is the information about real users etc. > > That's *not* common practice. Afaik, mailservers such as cyrus do no > address->user resolving at all! You're right, there you need for the SQL select: table = virtual select_field = dest where_field = alias additional_conditions = and status = '1' But it's at least a simple query, and once I need such a query to find my true user, it gets nasty: SELECT alias FROM dbmail_aliases left join zmi_domains on zmi_domains.client_idnr = dbmail_aliases.client_idnr WHERE zmi_domains.pridomain = ( SELECT pridomain FROM zmi_domains WHERE domain = substring('%s' from position('@' in '%s')+1) ) AND substring (dbmail_aliases.alias from 1 for position('@' in dbmail_aliases.alias)) || zmi_domains.domain = '%s' Why not throw the address as received from the MTA into dbmail, and the "rewriting" is done there? It makes sense to do it there: - Easier to implement dbmail with various MTAs, because you don't need rewriting - Easier to query for existing e-mail addresses - Less error prone (I'm not good at SQL, and it makes me a headache) And yes, I do of course recipient validation at MTA level. That's a similar query: SELECT (case when count(dbmail_aliases.alias) > 0 then 'OK' when count(dbmail_aliases.alias) = 0 then 'REJECT' END) AS access FROM dbmail_aliases left join zmi_domains on zmi_domains.client_idnr = dbmail_aliases.client_idnr WHERE substring (dbmail_aliases.alias from 1 for position('@' in dbmail_aliases.alias)) || zmi_domains.domain='%s' And it also looks ugly. The transformation from an alias to it's final user has to be done somewhere anyway, so why not take away the burden from the MTA and make a simple "does [EMAIL PROTECTED] exist" interface? After all, it's the same CPU time, no matter if postfix or dbmail makes the query. Sorry that I stepped on toes here, I just like simple interfaces. mfg zmi -- // Michael Monnerie, Ing.BSc ----- http://it-management.at // Tel: 0676/846914666 .network.your.ideas. // PGP Key: "curl -s http://zmi.at/zmi3.asc | gpg --import" // Fingerprint: 44A3 C1EC B71E C71A B4C2 9AA6 C818 847C 55CB A4EE // Keyserver: www.keyserver.net Key-ID: 0x55CBA4EE
pgpXfQ7CVyA1n.pgp
Description: PGP signature
_______________________________________________ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail