glpi icon indicating copy to clipboard operation
glpi copied to clipboard

[Entity] Permit mail_domain as a semicolum separated list of domains

Open Berthe01 opened this issue 2 years ago • 1 comments

Updated getEntityIDByDomain function to be abale to retrive the first Entity wich includes "domain" in mail_domain attribute as a semicolum separated list of domains.

If multiple Entities found, return the first one of SQL query. Could eventually be modified to return -1 if needed to be more strict about domain unicity.

I think this update can address many use cases, because this was ofen requested on forums, but I don't know if this function behavior modification implies other functionnality than MailCollector Rules.

Hope this can help :)

Q A
Bug fix? no
New feature? yes

Berthe01 avatar Sep 29 '23 21:09 Berthe01

Hi,

Any news about this PR ?

The only potential problem I see is about 'mail_domain' type which is VARCHAR(255) type in the entites table, and may be should be switched to LONGTEXT() type to handle much more domains than 2 or 3 depending on the length of domain name.

Berthe01 avatar Oct 12 '23 12:10 Berthe01

no feedback from a while, closing.

trasher avatar Jul 31 '24 07:07 trasher