Toggle forward-and-copy router
For users who want a per-user forward-and-copy setting, just do the following:- open up /usr/local/atmail/mailserver/configure
- find this line:
MYSQL_DOMAINS = select Hostname from Domains where Hostname='${quote_mysql:$domain}'
- below it, add:
MYSQL_FORWARDCOPY = select Forwardcopy from Users where Account='${quote_mysql:$local_part}@${quote_mysql:$domain}'
- then, find:
forward_director:
driver = redirect
data = ${lookup mysql {MYSQL_FORWARD}{$value}}
- change this to:
forward_director:
driver = redirect
data = ${lookup mysql {MYSQL_FORWARD}{$value}}
unseen = ${lookup mysql {MYSQL_FORWARDCOPY}{$value}}
- save changes, and restart Exim
% kill -HUP exim
- then, create a MySQL column:
> alter table Users add Forwardcopy varchar(3) DEFAULT "no";
- set the users you want to disable forward-and-copy as:
> update Users set Forwardcopy="yes" where Account="foo@bar.com";
Where foo@bar.com is the user's account.

