all_post.sh problem

Dedi

Verified User
Joined
Nov 1, 2012
Messages
6
Hi!

Newly registered but have been a user here before (head tech @ webhost with DA servers for almost 10 years now), so please expect me to have tried all options known throughout doc's and forum's.

We're working on a new external email cluster using dbmail and various other software, connecting DA to it through the custom scripting available. This works fine with email_create_post.sh, etc.. pretty much all documented _pre and _post.sh scripts work fine and it's been a blast to code.

However! There is no custom script for running before or after a forwarder is created. Nor does either the all_post.sh nor the all_pre.sh execute after adding a forwarder in DA. I have a simple 'touch file' kind of command entered in both those scripts just to see if they get executed at all, which they don't.

What are my options here? As it stands, I might have to code a new DA plugin and simply replace DA's email pages altogether in the control panel, directly communicating with our mail cluster.. but I'd prefer to manage all account creation/modification through DA.

Would appreciate a pointer if someone has any ideas.
 
OK I discussed this with my colleagues and we decided to simply replace all of DA's email functionality after all, we're pretty much half-way there already since we have a ReST API on the mail cluster that executes all commands needed for creation/modification/deletion functions, we just need to code some simple functions for returning user info for display in the control panel..

But I'd still want to know why all_post.sh or all_pre.sh does not execute for all DA functions as reported by DA, so if anyone has a clue please respond regardless :)
 
Hello,
However! There is no custom script for running before or after a forwarder is created.
There is now (just added it for you)
http://www.directadmin.com/features.php?id=1388

As for all_post.sh, looking over the code, it should be called for all CMD_ functions.
The only time it wouldn't be called (assuming it exists, and has the correct permissions) would be if the all_pre.sh returned a non-zero result, which aborts the command.

So things to check:
- ensure the all_pre.sh is not aborting the process
- ensure that the all_post.sh is chmod 700 and working correctly (test manually in ssh)

That's about all I can think of right now.. there isn't much else that could go wrong.

John
 
Much appreciated! I'll set to updating and trying that out right now. :)

Although we did manage to get a pretty decent implementation of our own going, it's certainly preferrable to use DA's system.

On a similar note, do you have a suggestion as to how we could manipulate a users' disk and bandwidth usage? I have API calls setup for reporting quota/bw usage from the mail cluster, so if there's any way to add it into DA's reporting, that'd be fantastic.
 
Ah just remembered the user.usage file. But if it's changed through non-DA interaction, would the next DA update of that file take into consideration the changes or just reset them?

Thank you!
 
Back
Top