Rocky 8.x Email Servers iRedmail Setup vmail user mail forwarding via SQL
From Notes_Wiki
Revision as of 08:56, 12 April 2023 by Saurabh (talk | contribs) (Created page with "Home > Rocky Linux or CentOS > Rocky Linux 8.x > Email servers > iRedmail > Setup vmail user mail forwarding via SQL Similar to various email systems covered at CentOS 8.x email servers there is iRedMail system. In case of iRedMail unless we use professional version, we may not get option to set user fo...")
Home > Rocky Linux or CentOS > Rocky Linux 8.x > Email servers > iRedmail > Setup vmail user mail forwarding via SQL
Similar to various email systems covered at CentOS 8.x email servers there is iRedMail system. In case of iRedMail unless we use professional version, we may not get option to set user forwarding of emails. In that case we can achieve the same via SQL using:
- Open MySQL
- mysql
- Open vmail database
- use vmail;
- Look at forwardings table
- desc forwardings;
- Insert new value into forwardings table as per requirement using:
INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_forwarding, active) VALUES ('user@domain.com', 'forward-2@example.com', 'domain.com', 'example.com', 1, 1);
- To also retain a copy of forwarded email in own Inbox use:
INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_forwarding, active) VALUES ('user@domain.com', 'user@domain.com', 'domain.com', 'domain.com', 1, 1);
Refer:
Home > Rocky Linux or CentOS > Rocky Linux 8.x > Email servers > iRedmail > Setup vmail user mail forwarding via SQL