Creating Bulk E-Mail Forwards
I'm migrating e-mail accounts for a new customer and they have many hundreds of forwards for several users. For example:
email@example.com -> firstname.lastname@example.org, email@example.com
firstname.lastname@example.org -> email@example.com, firstname.lastname@example.org
There are so many that this would be a very time-consuming process if done by the GUI. Is there a way to do this via scripting on the CentOS host? Or, is there some other way of creating forwarding addresses in bulk?
Many thanks and Happy New Year!
I think whatever you do is going to be time consuming.
But you could write a script to put the required info in the required file. The forward info is in a .sieve file in the users mail dir:
And it looks like this.
require ["fileinto", "regex", "date", "relational", "vacation"];
@tahunasky - thanks for the feedback. I think, however, the forwards are stored in the dbispconfig database.
Please find attached my first work-in-progress at doing bulk updates. It presently requires that the script be modified to manually define the USERID and the GROUPID for the source domain. Just update the first couple of lines in the script. And the script takes its input from a file that defines the bulk mappings. The script has simple usage instructions in it. Lastly, only one domain can presently be done at a time. Nevertheless, I used it today and it saved me a lot of time.
I will update this script to be able to handle the general case and will update this thread when I've completed that task.
Happy New Year!
You are right.... there are 2 forwards, one in the database, which is an alias without a mailbox and the other uses sieve custom rules.
Your script looks good, but is a forwarding_id needed ?
|All times are GMT +2. The time now is 16:07.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.