Bulk modify email forwarders

Ballard

Verified User
Joined
May 8, 2009
Messages
7
Hello, I hope I'm posting this in the right forum.

What is the easiest way for me to mass update some email forwarders, for example change the destination address to Y for forwarders that currently have a destination address X. In other words, find all forwarders that currently have a certain destination address, and change all of them to a certain other destination address.

I have access to DirectAdmin at the Reseller and User levels, as well as FTP and SSH access to the server.
 
Forwarders created in DirectAdmin are found in the /etc/virtual/EXAMPLE.COM/aliases file. You can use any simple one line edit script to edit the contents of this file, or you can load the file into a text editor and edit it there.

It's not necessary to restart anything afterwards.

Jeff
 
Thanks for your reply. I took a look at the file you pointed me to and the only permissions on it are read and write for the owner, which is "mail".

What I have is a reseller account on a shared server, so I have access to the DirectAdmin reseller account and user accounts (all of the accounts are mine). I also have FTP and SSH access to the server, but not adequate permissions to do anything with the aliases file.

I would need the hosting company to send me the file, allow me to edit it, and then overwrite the one on the server for me, correct? Or is there some way I can do it myself?
 
Of course you can do it manually, one by one, through the control panel. Or see if your hosting company will cooperate as you've mentioned.

Jeff
 
Right, what I meant was some way I could edit the file myself, or otherwise make a bulk change. What about the API, is that something I'd have access to?
 
The user-level and reseller-level APIs only let you do what you can do from the same login. Of course they're programmable, so using an editor with a meta language you may be able to do what you want.

You might want to read up on the API calls available to you (I'm not sure where they are but I'm sure you can find them as easily as I could).

Jeff
 
Back
Top