This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Cannot reuse previously deleted email address
#16
RE: Cannot reuse previously deleted email address
(12-21-2018, 12:30 PM)fearworks Wrote: To solve the client account issue where, if you delete a client and then one day want to add a new client with the same email address, the following file is all that needs changing:

Code:
/etc/sentora/panel/dryden/ctrl/users.class.php

the last function at the bottom, "CheckUserEmailIsUnique", has a line:

Code:
$sql = "SELECT COUNT(*) FROM x_accounts WHERE LOWER(ac_email_vc)=:email";

change this to:

Code:
$sql = "SELECT COUNT(*) FROM x_accounts WHERE LOWER(ac_email_vc)=:email AND ac_deleted_ts IS NULL";

and save the file.

You will now be able to create a client account using an email address that was used before to create an account that has since been deleted. It does NOT allow multiple active accounts with the same email address, as that would just be silly.

This modification does not increase, allow or create any additional opportunities for spam.

If the issue is to do with email addresses being left in tables when mailboxes/aliases/forwarders/dist lists are deleted, the only thing I am aware of there being an issue with is mailboxes left in the Postfix database, which I discussed (and proposed the fix for) this in this thread a while back:

http://forums.sentora.org/showthread.php?tid=10597

I'm fairly sure I have been able to create a mailbox for a client, then later delete it, and then even later, create it again for the same client or another client if they want it moving, etc.

I could be wrong - but it would be really useful for that step-by-step description of how to recreate an error with this as I am not seeing any.

Keith.

I like this solution. I will add it to the master. I'm not sure why it wasn't done this way originally. And, you will still have a record of all the times the same email was deleted/re-used.

Thanks Keith!

I will also take a look at the proposed postfix fix too.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Messages In This Thread
RE: Cannot reuse previously deleted email address - by TGates - 12-22-2018, 07:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Email has suddenly stopped coming through rsthomas 4 4 ,811 10-12-2022, 09:29 PM
Last Post: rsthomas
can not send email - SMTP error on roundcube wolvepy 9 29 ,282 01-03-2020, 08:37 AM
Last Post: Telepuzik
SMTP Error every time i try to send an email wormsunited 7 19 ,000 12-22-2018, 08:02 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)