On Sun, 2011-03-20 at 21:24 +0100, Reindl Harald wrote: > > Am 20.03.2011 21:02, schrieb Raven: > > On Sat, 2011-03-19 at 20:57 +0100, Reindl Harald wrote: > >> Am 19.03.2011 19:32, schrieb Ralf Hildebrandt: > >>> * David Touzeau <da...@touzeau.eu>: > >>> > >>>> Thanks for this procedure but this is not a bug/error request but an > >>>> howto request. > >>> > >>> What I'm doing is this (just a few examples): > >>> > >>> alo.com error:5.1.2 You probably meant > >>> aol.com, not alo.com > >>> aoll.com error:5.1.2 You probably meant > >>> aol.com, not aoll.com > >>> aaol.com error:5.1.2 You probably meant > >>> aol.com, not aaol.com > >>> aiol.com error:5.1.2 You probably meant > >>> aol.com, not aiol.com > >>> aol.com.de error:5.1.2 You probably meant > >>> aol.com, not aol.com.de > >> > >> this is a cool solution i will implement tonight in our > >> dbmail/postfix-backend > >> with a seperate sql-table and an extended view for the transport-query > >> > >> there are not much mistype-domains and a direct reject for some is much > >> better > >> than any delay and side-effects for working domains > >> > >> thank you for the idea! > >> > >> > > > > Hi guys. > > This seems like a great idea. I would like to implement the same thing > > and store the domain typos in a mysql table. > > > > If the table has two columns, eg. MISSTYPEDDOMAIN and RESPONSE, how > > would I go about to configure $smtpd_recipient_restrictions with the > > appropriate SQL query? > > you are wrong! > we are speaking from outgoing-messages, a little difference > because you will not get misstyped domains to your MTA
Indeed :) Although it's 9PM on a Sunday night here..guess I can be forgiven! And it's only been 3 days since St Paddy's > > CREATE TABLE IF NOT EXISTS `dbma_mta` ( > `mydestination` varchar(35) NOT NULL DEFAULT '', > `transport` varchar(128) NOT NULL DEFAULT '', > PRIMARY KEY (`mydestination`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 > ROW_FORMAT=COMPRESSED; > > CREATE TABLE IF NOT EXISTS `dbma_transports_error` ( > > `mydestination` varchar(35) NOT NULL DEFAULT '', > `transport` varchar(128) NOT NULL DEFAULT '', > PRIMARY KEY (`mydestination`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 > ROW_FORMAT=COMPRESSED; > > CREATE VIEW `dbma_transports` AS > SELECT mydestination,transport > FROM `dbma_mta` > UNION (select mydestination,transport from `dbma_transports_error`); > ________________________________________ > > transport_maps = mysql:/etc/postfix/mysql-transport.cf > > [root@mail:~]$ cat /etc/postfix/mysql-transport.cf > user = dbmailro > password = *************** > dbname = dbmail > hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307 > query = select transport from dbma_transports where > mydestination='%s' or mydestination='%d' order by > transport desc limit 1; > ________________________________________ > > In "dbma_mta" i have the real transports (in our case > dbmail-lmtp:127.0.0.1:24) > and in "dbma_transports_error" the error-domains because i would never mix > this > to get not confused sooner or later > Thanks for the tip. Best, -RV