HEX
Server: Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System: Linux ns565604.ip-54-39-133.net 4.18.0-553.50.1.el8_10.x86_64 #1 SMP Tue Apr 15 08:09:22 EDT 2025 x86_64
User: greer489 (1034)
PHP: 8.3.19
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/spf_engine/__pycache__/policydspfuser.cpython-36.pyc
3

t��^
�@s:dZddlZddlZddlZejd�Zdd�Zdd�ZdS)a(
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
�Nz	^(.*)#.*$cCs�|jdd�}|dkr"tjd|�|dkr.i}ttttttttttttttttttttttttd�}ytj|�dWnDtk
r�}z(|dkr�tjtjd||jf�|dfSd}~XnXt	|d	�}�x|j
�}|s�P|jd
d�dj�}|s�q�dd
�|jdd�D�}|\}	}
|	|k�r d}q�i}|
jd�}
x$|
D]}|jd�\}}|||<�q4Wx~|j
�D]r}|j|d�}|\}}
|dk�r�|dk�r^tjtjd||f��q^|dk�r�tjd||
f�||
�||<�q^Wd}Pq�W|j�||fS)z�Reads a configuration file from the specified path, merging it
    with the configuration data specified in configData for the identified
    recipient.  Returns updated configData for the user.�
debugLevelr�z readUserConfigFile: Loading "%s"N)rZHELO_rejectZMail_From_rejectZPermError_rejectZTempError_DeferZMail_From_pass_restrictionZHELO_pass_restrictionZProspectiveZ	WhitelistZskip_addressesZDomain_WhitelistZDomain_Whitelist_PTRZHELO_WhitelistZNo_MailZReject_Not_Pass_DomainsZdefaultSeedOnlyZSPF_Enhanced_Status_CodesZHeader_TypeZ
Hide_ReceiverzAuthserv-IdZLookup_TimeZWhitelist_Lookup_TimeZ
Void_LimitZReason_MessagezERROR stating "%s": %sF�r�#�cSsg|]}|j��qS�)�strip)�.0�qrr�$/usr/lib/python3.6/policydspfuser.py�
<listcomp>Lsz'_readUserConfigFile.<locals>.<listcomp>�,�|�=z:ERROR: Unknown name "%s" in file "%s" in per user settings�z<readUserConfigFile: Found entry "%s=%s" in per user settingsT)�get�syslog�int�str�os�stat�OSErrorZLOG_ERR�strerror�open�readline�splitr�items�close)�path�	recipient�
configDatarZnameConversion�e�fp�line�data�user�value�peruser�valuesZ	valuelistZ	valuepair�key�item�configZ
conversion�namerrr�_readUserConfigFiles�






r-c	Cs�|jdd�}|dkrtjd�|jd�}|dkrBtjdt|��|jd�\}}|dkr�|d	krntjd
|�t|||�\}}|d	kr�tjd|t|�f�x|D]}||||<q�W||fS)Nrr�z%Starting to process per-user settingsZPer_UserzUser data: r
�textrz-Reading per user data (type text) from:  "%s"z Per-user settings for "%s": "%s")rrrrr-)	r rrZuserdataZusertypeZuserlocationZuserconfigDatar'r*rrr�
_datacheckgs 


r0)�__doc__r�rer�compileZ	commentRxr-r0rrrr�<module>s
N