HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/676643/root/usr/local/CyberCP/mailServer/__pycache__/views.cpython-310.pyc
o

��h_�@s�ddlmZddlmZddlmZddlZddlmZddl	m	Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�ZdS)4�)�redirect)�HttpResponse)�
loadLoginPageN�)�MailServerManager)�
pluginManagercC�.z	t|�}|��WStytt�YSw�N)r�
loadEmailHome�KeyErrorrr��request�msM�r�&/usr/local/CyberCP/mailServer/views.pyr
�
�r
cCrr	)r�createEmailAccountrrrrrrrrrrcCrr	)r�
listEmailsrrrrrrrrrrcCrr	)r�fetchEmailsrrrrrrrr!rrcCsdz$t�|�}|dkr
|WSt|�}|��}t�||�}|dkr"|WS|WSty1tt�YSw)N��)r�preSubmitEmailCreationr�submitEmailCreation�postSubmitEmailCreationrrr)r
�resultr�
coreResultrrrr(s
�rcCrr	)r�deleteEmailAccountrrrrrrrr:rrc
C�Xz	t|�}|��WSty+}zdt|�d�}t�|�}t|�WYd}~Sd}~ww�Nr)�fetchStatus�
error_message)r�getEmailsForDomainr�str�json�dumpsr�r
r�msg�data_ret�	json_datarrrr A�

��r c
C�z$t�|�}|dkr
|WSt|�}|��}t�||�}|dkr"|WS|WStyF}zdt|�d�}t�|�}t	|�WYd}~Sd}~ww�Nrr��deleteEmailStatusr)
r�preSubmitEmailDeletionr�submitEmailDeletion�postSubmitEmailDeletionrr!r"r#r�r
rrrr%r&r'rrrr.J� 

��r.c
C�\zt|�}|��}|WSty-}zdt|�d�}t�|�}t|�WYd}~Sd}~ww)Nrr+)r�
fixMailSSLrr!r"r#r�r
rrr%r&r'rrrr3^s
��r3cCrr	)r�emailForwardingrrrrrrrr5jrr5c
Crr)r�fetchCurrentForwardingsrr!r"r#rr$rrrr6qr(r6c
Cr)r*)
r�preSubmitForwardDeletionr�submitForwardDeletion�postSubmitForwardDeletionrr!r"r#rr0rrrr8zr1r8c
Cr))Nrr��createStatusr)
r� preSubmitEmailForwardingCreationr�submitEmailForwardingCreation�!postSubmitEmailForwardingCreationrr!r"r#rr0rrrr=�r1r=cCrr	)r�changeEmailAccountPasswordrrrrrrrr?�rr?c
Cr))Nrr)�passChangeStatusr)
r�preSubmitPasswordChanger�submitPasswordChange�postSubmitPasswordChangerr!r"r#rr0rrrrB�r1rBcCrr	)r�dkimManagerrrrrrrrrD�rrDc
Crr)r�
fetchDKIMKeysrr!r"r#rr$rrrrE�r(rEc
Cr))Nrr)�generateStatusr)
r�preGenerateDKIMKeysr�generateDKIMKeys�postGenerateDKIMKeys�
BaseExceptionr!r"r#rr0rrrrH�r1rHcCsBz	t|�}|��WSty ddd�}t�|�}t|�YSw)Nr�6Not Logged In, please refresh the page or login again.)�installOpenDKIMr)rrLrr"r#r�r
r�	final_dic�
final_jsonrrrrL�s


�rLcCsBzt�}|��WSty dddd�}t�|�}t|�YSw)NrrrK)�abort�	installedr)r�installStatusOpenDKIMrr"r#rrMrrrrR�s

�rRcCrr	)r�EmailLimitsrrrrrrrrS�rrSc
Cr2)Nrr:)r�SaveEmailLimitsNewrr!r"r#rr4rrrrT�s
��rT) �django.shortcutsr�django.httpr�loginSystem.viewsrr"�mailserverManagerrrr
rrrrrr r.r3r5r6r8r=r?rBrDrErHrLrRrSrTrrrr�<module>s8