# Automatically Create an abuse@domain.com Email Address Using Event Hooks

**URL:** <https://forums.interworx.com/t/automatically-create-an-abuse-domain-com-email-address-using-event-hooks/13828>\
**Category:** Hacks / Tools / Tips / Tricks\
**Created:** [May 15, 2015, 8:10am UTC](https://forums.interworx.com/t/automatically-create-an-abuse-domain-com-email-address-using-event-hooks/13828 "2015-05-15T08:10:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IWorx-Jenna](https://forums.interworx.com/user_avatar/forums.interworx.com/iworx-jenna/32/41_2.png) [@IWorx-Jenna](https://forums.interworx.com/u/IWorx-Jenna)\
**Post date:** [May 15, 2015, 8:10am UTC](https://forums.interworx.com/t/automatically-create-an-abuse-domain-com-email-address-using-event-hooks/13828/1 "2015-05-15T08:10:26Z")

</div>

```auto

#!/bin/bash
#
# INSTALLATION:
#
# First, ensure the InterWorx CLI is installed via 'yum install interworx-cli'
# 
# Install this script at /usr/local/bin/email_abuse.sh:

if [["$iw_master_domain" == ""]]; then
  exit 1
fi

export IWORX_UNIXUSER=root

~iworx/bin/siteworx.pex -u --login_domain $iw_master_domain -n -c EmailBox -a add --username abuse --password $iw_password --confirm_password $iw_password

-
# Enable the Event Hooks plugin in NodeWorx.
# Add the following line to your InterWorx Event Hook Configuration:
# 
   Ctrl_Nodeworx_Siteworx add /usr/local/bin/email_abuse.sh
# 
# Ensure that both this file *and* the Event Hook config are both readable
# and executable by the iworx user:
# 
# chmod 0770 /usr/local/bin/email_abuse.sh
# chown iworx /usr/local/bin/email_abuse.sh
# 

```

For more information on installing Event Hooks, go here: [http://forums.interworx.com/threads/8043-Event-Hooks-Setup](http://forums.interworx.com/threads/8043-Event-Hooks-Setup)

---

<div class="post-metadata">

**Author:** ![d2d4j](https://forums.interworx.com/user_avatar/forums.interworx.com/d2d4j/32/16_2.png) [@d2d4j](https://forums.interworx.com/u/d2d4j)\
**Post date:** [May 15, 2015, 1:01pm UTC](https://forums.interworx.com/t/automatically-create-an-abuse-domain-com-email-address-using-event-hooks/13828/2 "2015-05-15T13:01:31Z")

</div>

Hi Jenna

Many thanks, looks good but please confirm this does not replace the email address auto setup defined from nodeworx.

Also, if it does not, looking at the code, it should be easy to change to auto setup an alias email address for new siteworx account, which is the missing feature a few users wanted.

Many thanks

John

---

<div class="post-metadata">

**Author:** ![bblori](https://forums.interworx.com/letter_avatar_proxy/v4/letter/b/82dd89/32.png) [@bblori](https://forums.interworx.com/u/bblori)\
**Post date:** [May 16, 2015, 10:08am UTC](https://forums.interworx.com/t/automatically-create-an-abuse-domain-com-email-address-using-event-hooks/13828/3 "2015-05-16T10:08:23Z")

</div>

Plugins / Create Email Accounts for New Domains Automatically create a list of email accounts for new domains
