On Thu, Apr 07, 2011 at 12:03:31PM -0500, Raymond Norton wrote: > I am dinging around with a new mail scanner solution. The > blacklist/whitelist tables are structured differently, so I need to > manipulate the dump/import file, so it imports correctly. Anyone have > advice on how to import the old data? > > My old blacklist table looks like this: > CREATE TABLE `blacklist` ( > `id` int(11) NOT NULL auto_increment, > `to_address` text, > `to_domain` text, > `from_address` text, > PRIMARY KEY (`id`), > UNIQUE KEY `blacklist_uniq` (`to_address`(100),`from_address`(100)) > ) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1; > > Values example: > (21,'leeleecon at domain.com','domain.com','mccutepsy at iwashinbun.co.jp'), > > > The new list combines the black and whitelist: > CREATE TABLE `lists` ( > `id` int(11) NOT NULL AUTO_INCREMENT, > `list_type` int(11) NOT NULL, > `from_address` varchar(255) NOT NULL, > `to_address` varchar(255) NOT NULL, > `user_id` int(11) NOT NULL, > PRIMARY KEY (`id`), > KEY `lists_403f60f` (`user_id`) > ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; > /*!40101 SET character_set_client = @saved_cs_client */; > > Values example: (4,2,'emailcampaigns.net','lctn.org',2) Use sed. Or Excel/Calc. The question is: where do you get the user_id from? florin -- Don't question authority! They don't know either. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20110407/08983188/attachment.pgp>