#1  
Old 5th January 2013, 16:23
fatbear fatbear is offline
Member
 
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 40
Thanks: 4
Thanked 8 Times in 4 Posts
Default 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:

support@domain.com -> person1@domain.com, person2@domain.com
info@domain.com -> person1@domain.com, person3@domain.com
...

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!
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!
Reply With Quote
Sponsored Links
  #2  
Old 5th January 2013, 23:04
tahunasky tahunasky is offline
Member
 
Join Date: Jul 2012
Location: Buenos Aires
Posts: 84
Thanks: 1
Thanked 8 Times in 8 Posts
Default

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:

/var/vmail/[domain]/[user]/.sieve

And it looks like this.

require ["fileinto", "regex", "date", "relational", "vacation"];
redirect "someone1@somedomain.com";
redirect "someone2@somedomain.com";
keep;
Reply With Quote
  #3  
Old 6th January 2013, 02:49
fatbear fatbear is offline
Member
 
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 40
Thanks: 4
Thanked 8 Times in 4 Posts
Default

@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!
Attached Files
File Type: zip addforward.zip (758 Bytes, 34 views)
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!

Last edited by fatbear; 6th January 2013 at 02:57.
Reply With Quote
The Following User Says Thank You to fatbear For This Useful Post:
webguyz (6th January 2013)
  #4  
Old 6th January 2013, 03:48
tahunasky tahunasky is offline
Member
 
Join Date: Jul 2012
Location: Buenos Aires
Posts: 84
Thanks: 1
Thanked 8 Times in 8 Posts
 
Default

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 ?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix not sending mail arnolette Server Operation 3 4th November 2012 13:22
mysql and mail problem viritech General 3 16th October 2012 12:54
mail recipient linux_red Installation/Configuration 6 9th March 2012 14:24
dovecot: lda: Fatal: Unknown user dpicella Installation/Configuration 1 22nd August 2010 02:59
ISPconfig 3 some users cannot send email to outside Rockblade Installation/Configuration 7 29th April 2010 01:40


All times are GMT +2. The time now is 11:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.