@prasad0889
Pre-warning: I believe a global sieve is already enabled on the email server; This tutorial is to enable customers to control their own sieve via Roundcube. When Enhance updates the docker email containers on new releases, some of these steps are overwritten. If this happens, you must follow steps 1, 2 and 4-10 again.
Step 1: Disable imapcd:
docker network disconnect enhance-network imapcd
Step 2: Bind imapcd to it's own IP address
docker network connect --ip 199.99.88.55 enhance-network imapcd
Step 3: Port forward 4190 to the imapcd IP address
iptables -t nat -A PREROUTING -p tcp --dport 4190 -j DNAT --to-destination 199.99.88.55:4190
Step 4: Bash into the imapcd container
docker exec -it imapcd bash
Step 5: In the imapcd container, edit the file /etc/dovecot/local.conf and add the following to the end of the file, save and close file:
service lmtp {
inet_listener lmtp {
port = 2449
}
}
Step 6: Exit/logout of the imapcd container
Step 7: Bash into the mtacd container
docker exec -it mtacd bash
Step 8: In the mtacd container, edit the file /etc/postfix/main.cf and add the following to the end of the file, save and close file:
virtual_transport = lmtp:inet:199.99.88.55:2449
Step 9: Exit/logout of the mtacd container
Step 10: Restart the dockers
docker restart imapcd mtacd
Step 11: Modify the Roundcube configuration file (public_html/config/config.inc.php)
$config['managesieve_host'] = 'XXX.XXX.XXX.XXX';
$config['managesieve_port'] = 4190;
$config['managesieve_usetls'] = true;
Replace XXX.XXX.XXX.XXX with the IP address of your Email Server, or use 127.0.0.1 if it's on the same machine
Step 12: In the Roundcube configuration file, enable the 'managesieve' plugin; find $config['plugins'] and append, like so:
$config['plugins'] = array(
'enhance_login',
'thunderbird_labels',
'banner_warn',
'markasjunk',
'managesieve'
);
You are done!