On Freitag, 15. Dezember 2006 19:08 Marc Dirix wrote: > Ultimately you should let your MTA do a sql lookup before accepting > the message.
Yes, and the problem is, in postfix (MTA) I do the correct lookup: 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' where I have extended dbmail (based on http://www.dbmail.org/dokuwiki/doku.php?id=domain_alias_spam_bounce ): CREATE TABLE zmi_domains ( client_idnr INT8 NOT NULL, domain VARCHAR(80) UNIQUE NOT NULL, pridomain VARCHAR(80) DEFAULT NULL, comment text, CONSTRAINT zmidom_pk PRIMARY KEY(domain), ); In that table, there is: client_idnr | domain | pridomain | comment -------------+---------------+--------------+--------- 1001 | datamatix.eu | | 1001 | datamatix.net | datamatix.eu | Which means that datamatix.net is an alias domain of datamatix.eu. This domain alias is also defined in dbmail_aliases: alias_idnr | alias | deliver_to | client_idnr -----------+-------------------------+---------------+------------- 11 | @datamatix.net | @datamatix.eu | 1001 10 | [EMAIL PROTECTED] | 1002 | 1001 So dbmail should really know that user [EMAIL PROTECTED] is valid, but [EMAIL PROTECTED] is not, because [EMAIL PROTECTED] is not defined. My PostgreSQL select does that correctly, just dbmail itself seems confused. Again, I'm wondering if others do not have this problem? An alias domain, where not existing aliases should be REJECTed at MTA level. And how to solve this? 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
pgp87EnomEy3n.pgp
Description: PGP signature
_______________________________________________ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail