Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member GeekPatrolMille's Avatar
    Join Date
    Mar 2004
    Location
    McKinney, Texas, USA
    Posts
    84

    Default Contact Email - Batch Update/Change

    Can anyone direct me to where the contact email address for a domain account is stored. I am speaking of the email address that appears on the Main >> Account Information >> List Accounts screen.

    I have a reseller who did not provid a contact email address for his clients and he has requested me to put a default email address on all of the accounts.

    Thank you in advance...
    Gregory A. Miller
    AGBSM Networks, LLC
    McKinney, Texas
    469-247-1444

    removespam.gmiller@agbsm.net

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    The email address is stored in /home/*/.contactemail for each account. You would have to write a script that populated that file with an email address for the list of accounts where it is needed.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member GeekPatrolMille's Avatar
    Join Date
    Mar 2004
    Location
    McKinney, Texas, USA
    Posts
    84

    Default

    Who would have thought of looking in the most obvious place... <grin>

    Thanks chirpy...
    Gregory A. Miller
    AGBSM Networks, LLC
    McKinney, Texas
    469-247-1444

    removespam.gmiller@agbsm.net

  4. #4
    Member sawbuck's Avatar
    Join Date
    Jan 2004
    Posts
    1,313
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Along the same lines, have found the attached script handy to extract all contactemail addresses.
    Attached Files

  5. #5
    Member GeekPatrolMille's Avatar
    Join Date
    Mar 2004
    Location
    McKinney, Texas, USA
    Posts
    84

    Default

    Thanks sawbuck...

    Here is my modified version of your offerings. This script will insert the email address provided into any /home/<ACCTNAME>/.contactemail file which is currently missing one. It does not overwrite the email address if it exists. It does not test for valid existing or invalid existing emails so be very cautious...

    My original request was to fix this for a reseller... Since only the reseller in question had missing contact emails, I did not do any lookups for the reseller account. This script will touch *ALL* empty .contactemail files. It will not create the file if it is missing, so system accounts should be safe. Use at your own risk...

    -greg


    #!/bin/bash

    myEmail = "email@address.com

    for i in `awk -F: '{print $1}' /etc/passwd`
    do
    if [[ -e '/home/'$i'/.contactemail' ]]; then
    email="cat /home/$i/.contactemail"
    em=`$email`
    if [[ -n $em ]]; then
    echo $em
    else
    echo $myEmail > '/home/'$i'/.contactemail'
    fi
    fi
    done
    Gregory A. Miller
    AGBSM Networks, LLC
    McKinney, Texas
    469-247-1444

    removespam.gmiller@agbsm.net

Similar Threads & Tags
Similar threads

  1. Cant update Contact Email for accounts
    By absolutenetwork in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-25-2007, 06:57 PM
  2. Change Contact email
    By fhh in forum E-mail Discussions
    Replies: 3
    Last Post: 04-08-2007, 01:11 AM
  3. Can't change contact email...
    By dexus in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-05-2006, 04:48 AM
  4. Change Root Contact Email Address - URGENT!!
    By Cronikeys in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-06-2005, 02:30 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube