Mail forwarding settings & LDAP

Hello !

I have headed a bug.

Setup: postfix + virtualmin (3.76.gpl) + LDAP using the guide provided in vittualmin domains.

Issue: 1. Create domain, enter domain name and password, all else is untouched. [OK] 2. Edit Mail and FTP users 3. Add a user to server, enter only name and password, all else is untouched. [OK] 4. Edit Mailbox (click on new user). 5. Click on "Mail forwarding settings"

Now one can see that "Deliver to this user normally" is unchecked. "Forward to other addresses" is checked, and user email is in square below.

PROBLEM 1) This must be wrong, the user is local and should have it's email delivered locally. Also it is impossible to deliver to himself again (loop)...

  1. Delete the user.
  2. Delete Now.
  3. Failed to save mailbox : LDAP delete of mailLocalAddress=nizze,dc=aliases,dc=radio2,dc=ing-steen,dc=se failed : No such object

  4. Click on the "Return to previous page" result in: User does not exist!

  5. Click on "Edit Mail and FTP users"

The user is gone but the homedir is still there.

Manually removing the "Forward to other addresses" in step 5 and check the "Deliver to this user normally", makes everything back to normal again.

What is wrong here ? Is there a fix or workaround available ?

Status: 
Closed (fixed)

Comments

Sounds like some LDAP attributes for the user are incorrect.

If you go to Webmin -> System -> LDAP Users and Groups, click on the user and then on the "LDAP Attributes" button, what does it show?

Hello Jamie!

Thanks for the swift anser!

Here are my ldap attributes for one such user:

LDAP Attributes

For uid=sigge,ou=People, dc=radio2, dc=ing-steen, dc=se
Attribute name Values
cn sigge
uid sigge
uidNumber 501
loginShell /dev/null
homeDirectory /home/domains/activeinredning/homes/sigge
gidNumber 503
shadowLastChange 14633
mail sigge@activeinredning.se
objectClass posixAccount , shadowAccount , organizationalPerson , inetorgperson , person , top
sn punk
userPassword {crypt}lkjfalksjflasjkkds

Hello again!

I still have no success on this, fully stuck...

I have tested to remove the aliases using ldap browswer, after that the "Deliver to this user normally" is checked when checking the user that got aliases removed.

Further observations is the following: ldap tree cn=Virtual contains hostmaster@, webmaster@, abuse@, postmaster@ and sigge@ ldap tree cn=Aliases contains activeinredning@ ldap tree cn=Groups contains activeinredning ldap tree cn=People contains activeinredning and sigge

I have searched the forums herein and the internet, result so far is zero.

What now ?

So when you get that error about the deletion of mailLocalAddress=nizze,dc=aliases,dc=radio2,dc=ing-steen,dc=se , if you browse the LDAP tree is there actually an entry with that DN (or something similar) ?

Yes the user is there as you write, however the user is gone just before the message comes.

In any case, I have managed a workaround/correction in my setup. The virtualmin + ldap guide leaves some details out :-). WIth other word, I advanced a some steps, but get stuck again.

In addition to the guide I did:

The eway way, just untick (in System settings/Module config) Also update outgoing addresses for mailboxes? But then From address becomes hostname....

  1. LDAP server: Add LDAP tree Canonical (same way as Aliases and Virtual). If not, various problems arrive, "From address" becomes same as hostname and error is thrown out when trying to create a new virtual server in virtualmin.

  2. LDAP Client: Add "Other objectClasses to add to new users": inetOrgPerson If not it fails to add mail attribute.

  3. Users and Groups module, New user options: Lowest UID/GID: 1000 If not, a conflict with group sshonly will arrive. A BUG is also detected, when trying to add LDAP user, the group is not automatically added, instead an error appairs, one have to put same GID as UID manually to have a group for unix user!

  4. Add loocup LDAP in usermin module "read mail" User From addresses and Qmail + LDAP options, add the LDAP server address and also Base Users. Here a new issue comes, domain owner's from address will be activeinredning only, because mail attribute does not exist for that user.

Observation outover this, users with shell access cannot change their passwords from command line. -bash-3.2 (nizze) $ passwd Changing password for user nizze. Enter login(LDAP) password: passwd: Authentication token manipulation error

Any suggestions, (virtualmin is complicated)!

Ok .. so are you still seeing the original issue, or have you progressed to a new bug now? :-)

Issue solved!

  1. You must use mail attribute only in Add mail attribute to LDAP users. There must be some unknown problem with mailalternateaddress.

  2. You must also add mail attribute using postscript if you want the domain owner to be able using email in at least usermin.

Ok, great! I will close this bug then ..

Automatically closed -- issue fixed for 2 weeks with no activity.