Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
5.5.56
-
None
Description
Hello.
Need to use regexp aliases with Postfixadmin.
Standard Postfixadmin alias table
CREATE TABLE `alias` ( |
`address` varchar(255) NOT NULL, |
`goto` text NOT NULL, |
`domain` varchar(255) NOT NULL, |
`created` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', |
`modified` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', |
`active` tinyint(1) NOT NULL DEFAULT '1', |
PRIMARY KEY (`address`), |
KEY `domain` (`domain`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Aliases' |
Inserted alias with regexp
INSERT INTO alias VALUES ('tks\.[0-9a-z\-\_\.]+@example.com','tks@example.com','example.com',NOW(),NOW(),1); |
Selecting email with dash returns empty dataset
SELECT goto FROM alias WHERE 'tks.te-st@example.com' REGEXP CONCAT('^',address,'$') AND SUBSTRING(address,1,1) != '@'; |
Empty set (0.00 sec) |
Point (tks.te.st@example.com) and underscore (tks.te_st@example.com) matches well.
Checked same on MySQL 5.1.73 - dash matching without any problem.