Hi there,
I've starting working with the various custom scripts that are invoked when domain or users are created and destroyed. This is a great feature!
What I'm trying to do is create a forwarder on each new account with the address "postmaster@<domain>". This address will forward to the email address entered on the "Create a User" page.
To do this, I created the script user_create_post.sh and verified that it is called. From what I can see, there is no API for creating an email forwarder yet, so I just use this curl command in my script:
/usr/local/bin/curl -u $username:$passwd -d "action=create&create=Create&domain=$domain&user=$username&email=$email" http://mysubdomain.domain.com:2222/CMD_EMAIL_FORWARDER
This command is invoked correctly, but if I redirect the output of the command to a temp file, I see these messages in it:
Unable to determine Usertype
user.conf needs to be repaired
However, I can run the command manually at the command line after the new account has been created in DA. Is there some kind of race condition where I cannot do certain things through the DA API until the function that has called my script is completely done? Is there any other way to do what I want?
Thank you,
Greg Larkin
I've starting working with the various custom scripts that are invoked when domain or users are created and destroyed. This is a great feature!
What I'm trying to do is create a forwarder on each new account with the address "postmaster@<domain>". This address will forward to the email address entered on the "Create a User" page.
To do this, I created the script user_create_post.sh and verified that it is called. From what I can see, there is no API for creating an email forwarder yet, so I just use this curl command in my script:
/usr/local/bin/curl -u $username:$passwd -d "action=create&create=Create&domain=$domain&user=$username&email=$email" http://mysubdomain.domain.com:2222/CMD_EMAIL_FORWARDER
This command is invoked correctly, but if I redirect the output of the command to a temp file, I see these messages in it:
Unable to determine Usertype
user.conf needs to be repaired
However, I can run the command manually at the command line after the new account has been created in DA. Is there some kind of race condition where I cannot do certain things through the DA API until the function that has called my script is completely done? Is there any other way to do what I want?
Thank you,
Greg Larkin