baruwaproject / baruwa2

Baruwa 2.0
http://www.baruwa.org
GNU General Public License v3.0
21 stars 9 forks source link

Alias Domain adding to user account - The domain: xxxxxxxxxxxxxxxx.com is not local #51

Closed TetraAsh closed 9 years ago

TetraAsh commented 9 years ago

We have a domain setup domain.co.uk and we added an alias of domain.com.

Then we added a user account on that domain user@domain.co.uk and tried to add a alias address to that user user@domain.com but when we try to add this we get an error "The domain: domain.com is not local" As a note: Installation was done with www.baruwa-install.com, it could be related but doubting it.

My Poor solution so far

https://github.com/akissa/baruwa2/blob/master/baruwa/forms/accounts.py

class AddressForm(Form): """Add alias address""" address = TextField(_('Email Address'), [validators.Required(message=REQ_MSG), validators.Email(message=EMAIL_MSG), checkdomain]) enabled = BooleanField(('Enabled'))

Can be edited to

class AddressForm(Form): """Add alias address""" address = TextField(_('Email Address'), [validators.Required(message=REQ_MSG), validators.Email(message=EMAILMSG)]) enabled = BooleanField(('Enabled'))

This removes the CHECK_DOMAIN validation and rely on user competence (dangerous i know) but works.

akissa commented 9 years ago

Will backport this to community.

akissa commented 9 years ago

Fixed in dad10eb36ad27c1115380159a765ee6b93518400