1

Topic: Cant remove email value in ldapadmin

Hi.

Because I didn't read the wiki well enough, i made a mistake.
I have a user mailbox (user1) on my server, and I wanted to add an email forward (alias1 -> user1).
I added it under the user1 entry, but now I receive 2 emails everytime. I am aware of, that I didn't set up a forward propertly, but I cant seem to remove the "alias1" email value.

I hope someone kan help me out, so I can get the forward added correctly.

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: Debian 6
- iRedMail version and backend (LDAP/MySQL): 0.7.4, ldap 1.2.0.5
- Any related log? Log is helpful for troubleshooting.
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cant remove email value in ldapadmin

phpLDAPadmin should works fine. How did you remove it? and what's the error message?

3 (edited by weedo 2012-03-21 19:26:48)

Re: Cant remove email value in ldapadmin

I didn't remove it, as I also write. There is no error message.
Its under:
dc=examaple,dc=com -> o=domains -> domainName=example.com -> ou=Users -> mail=user1@example.com.

Under "Email" i have added the Alias1, which was a mistake, because now I get all emails twice. But I cant remove the email I have added. I can choose "add value" or "rename". Rename only alows you to rename the first email given (User1).

4

Re: Cant remove email value in ldapadmin

No help on this one? Other than to remove the user and create it again? sad

5

Re: Cant remove email value in ldapadmin

Could you please post the LDIF data of this user? Replace password and other sensitive information before posting.

6

Re: Cant remove email value in ldapadmin

Im sorry, but where is this located?

7

Re: Cant remove email value in ldapadmin

You can export LDIF data with phpLDAPadmin.

8

Re: Cant remove email value in ldapadmin

Sorry for the late reply. Here is the LDIF data.

# LDIF Export for mail=user1@example.com,ou=Users,domainName=example.com,o=domains,dc=example,dc=com
# Server: My LDAP Server (127.0.0.1)
# Search Scope: base
# Search Filter: (objectClass=*)
# Total Entries: 1
#
# Generated by phpLDAPadmin (http://phpldapadmin.sourceforge.net) on March 27, 2012 4:06 pm
# Version: 1.2.0.5

version: 1

# Entry 1: mail=user1@example.com,ou=Users,domainName=example...
dn: mail=user1@example.com,ou=Users,domainName=example.com,o=do
mains,dc=example,dc=com
accountstatus: active
amavislocal: TRUE
cn: user1
enabledservice: mail
enabledservice: deliver
enabledservice: lda
enabledservice: smtp
enabledservice: smtpsecured
enabledservice: pop3
enabledservice: pop3secured
enabledservice: imap
enabledservice: imapsecured
enabledservice: managesieve
enabledservice: managesievesecured
enabledservice: sieve
enabledservice: sievesecured
enabledservice: forward
enabledservice: senderbcc
enabledservice: recipientbcc
enabledservice: internal
enabledservice: shadowaddress
enabledservice: displayedInGlobalAddressBook
homedirectory: /var/vmail/vmail1/example.com/h/e/n/user1-2012.01.04.0
7.44.30/
mail: user1@example.com
mail: alias1@example.com
mailmessagestore: vmail1/example.com/h/e/n/user1-2012.01.04.07.44.30/
mailquota: 0
objectclass: inetOrgPerson
objectclass: mailUser
objectclass: shadowAccount
objectclass: amavisAccount
sn: user1
storagebasedirectory: /var/vmail
uid: user1
userpassword: xxx

9

Re: Cant remove email value in ldapadmin

OK, you can remove it with below steps:

1) Create file 'entrymods' with below content:

dn: mail=user1@example.com,ou=Users,domainName=example.com,o=domains,dc=example,dc=com
changetype: modify
delete: mail
mail: alias1@example.com

IMPORTANT NOTE:
* Please leave an empty line at the bottom, it's required. (The 5th line is an empty line in our example.)
* Make sure you have email address which you want to remove in this file.

2) Execute command 'ldapmodify' to modify your ldap user object.

# ldapmodify -x -D 'cn=Manager,dc=example,dc=com' -W -f entrymods

That's all.

10

Re: Cant remove email value in ldapadmin

Thank you SO MUCH! This has been a real pain for me, but your fix works like a charm smile