Results 1 to 3 of 3

Thread: [SOLVED] How to delete a specific Emailed Contact?

  1. #1
    Join Date
    Oct 2006
    Posts
    45
    Rep Power
    9

    Default [SOLVED] How to delete a specific Emailed Contact?

    Hello,

    We have automatic addition of email addresses into the Emailed Contacts set up for our users (a required feature). Unfortunately, someone mistyped an email address such that <username>@wrongdomain.com has now virally made its' way into a bunch of our user's address books.

    While I have put up an FAQ on our Intranet instructing people how to remove Emailed Contacts, a number of people, including the owners of the company are getting confused and I have been requested to delete the specific contact from everyone's Emailed Contacts.

    How do I do that?

    The closest I have come up with so far is to run:

    zmprov selectMailbox <username>@domain getAllContacts email

    which provides a complete dump, but I can't find a way to get the ID of the contact directly from the email address (without writing a parser anyway).

    Is there a way to do this easily?

    Cheers,
    David

  2. #2
    Join Date
    Mar 2007
    Location
    Austin
    Posts
    441
    Rep Power
    8

    Default

    You'll need a script to look through that. Try this:

    Code:
    #!/usr/bin/ruby
    
    user = ARGV[0]
    bad_email = 'user@domain.com'
    
    data = `zmmailbox  -z -m #{user} gact`
    array = data.split('Id: ')
    array.each do |item|
            puts 'Id: ' + /\d+/.match(item).to_s if /#{bad_email}/.match(item)
    end
    change the 'bad_email' to match what you need, and pass it the user's email as an argument.

  3. #3
    Join Date
    Oct 2006
    Posts
    45
    Rep Power
    9

    Default

    Magic!

    That was just what I was after, thanks.

    Cheers,
    David

Similar Threads

  1. Replies: 12
    Last Post: 06-13-2013, 09:55 AM
  2. Can't Delete Contact Out of Contact Group
    By hurstel in forum Administrators
    Replies: 5
    Last Post: 06-03-2008, 10:11 AM
  3. Stumped: Emailed Contact Problem
    By leog21 in forum Administrators
    Replies: 0
    Last Post: 04-30-2008, 07:12 PM
  4. Replies: 0
    Last Post: 09-10-2007, 02:27 AM
  5. Replies: 3
    Last Post: 08-11-2007, 01:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •