Wildcard mail aliases
Any kind of wildcard mail aliases (regex and/or /?) would be highly appreciated in order to realize a "allow form all but anything like..." handler. Example: Ban all info-@domain addresses.
I had somenting similar at my old provider but not with new one using plesk. Now I need to insert dozens (hundreds) of addresses one by one...
If there is already a way to realize something similar I was not able to find it (or my provider did not enable it)...
Thank you for your input! We will consider this functionality in upcoming releases if it will be popular.
Everyone, please continue voting for this feature if you consider it important.
—
IG
-
franco commented
I need to use virtual aliases for customers emails to receive emails on forwarded address and send emails from the application from their subdomain to users of the application.
The configuration in Postfix is ok and functional at this moment but the wildcard subdomain is not registered in DNS records. So we cant send emails to users or send emails from users.
The postfix configuration is like this:
1- We create a database to store domains, subdomains and users with destination emails.CREATE TABLE `virtual_domains` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;CREATE TABLE `virtual_users` (
`id` int(11) NOT NULL auto_increment,
`domain_id` int(11) NOT NULL,
`password` varchar(106) NOT NULL,
`email` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;CREATE TABLE `virtual_aliases` (
`id` int(11) NOT NULL auto_increment,
`domain_id` int(11) NOT NULL,
`source` varchar(100) NOT NULL,
`destination` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;2.- we create 3 files on postfix:
mysql-virtual-domains.cf :
user = postfix_user
password = postfix_password
hosts = 127.0.0.1
dbname = postfix_db
query = SELECT 1 FROM virtual_domains WHERE name='%s'mysql-virtual-mailboxes.cf :
user = postfix_user
password = postfix_password
hosts = 127.0.0.1
dbname = postfix_db
query = SELECT 1 FROM virtual_users WHERE email='%s'mysql-virtual-aliases.cf :
user = postfix_user
password = postfix_password
hosts = 127.0.0.1
dbname = postfix_db
query = SELECT destination FROM virtual_aliases WHERE source='%s'3.- we configure main.cf in postfix to read the emails and destination.
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailboxes.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-aliases.cfNow we need to have the dns MX connection to send and receive emails from user@subdomain.domain.com
It would be a greet idea to implement this as a wildcard email processing system.
Thanks for reading and maybe implement this as soon as possible.
Best regards
-
Johannes commented
Hi,
I run a mail server using plesk and have several users. I would propose to use wildcards in email aliases. This is especially interesting if you want to register to each service with another email adress.
Example:
Any email, which goes to somerandomchars_a@mydomain.com ends up in my wife's inbox.
Any email looking like somerandomchars_j@mydomain.com end up in my inbox.
So my alias should be looking like:
*_a@mydomain.com -> wife@mydomain.com and
*_j@mydomain.com -> husband@mydomain.com.
Everything else goes via catchall to postmaster@mydomain.com anyways, if not caught by any other email adress or alias.
This would make things a LOT easier!
Thanks.