Anomaly detection method and system for automated configuration of mail services
Through automated configuration query and detection report generation, the problem of mail server configuration deployment status detection is solved, and the efficiency and security of mail services are improved.
Patent Information
- Application Number
- CN202411204049.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The prior art is difficult to efficiently check the automated configuration deployment status of mail servers, analyze the effectiveness, security and consistency of configuration parameters, and provide real-time alarms and fault location.
By constructing the automated configuration query request of the target mail server corresponding to the email address, parsing multiple initial configuration parameter information, performing syntax checks, security detection and consistency comparison, generating validity, security and consistency detection reports, and based on the detection As a result, an alarm message was sent to the email service provider to realize fault location.
Real-time validity, security and consistency detection of mail server configuration information is realized, the availability and connection security of mail services are improved, and configuration abnormalities are discovered and located in a timely manner.
Smart Images

Figure CN118740597B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to an anomaly detection method and system for automatic configuration of mail services. Background Art
[0002] Email is one of the most important communication media in today's Internet. Email clients are widely used in scenarios such as email reading and sending because they provide a wealth of customization options and functions. However, email clients (such as PC clients and mobile clients) usually rely on users to manually enter mail server configuration parameter information (such as host name, port number, and connection type, etc.) to establish a connection with the target mail server, which makes the client-based login process cumbersome and affects the usability of the client software. Among them, the target mail server includes the incoming server (i.e., IMAP or POP server) and the outgoing server (SMTP server).
[0003] The automatic mail configuration mechanism enables the mail client to automatically obtain the configuration parameter information of the mail server, so that users do not need to consider the details of the connection, and can complete the login by simply entering the email address information and password information, which greatly improves the user experience. To this end, the mail server administrator usually pre-publishes the configuration information on the designated server, and the mail client constructs a specific query request to obtain the configuration information. The currently widely deployed automatic mail configuration mechanisms include the Autodiscover mechanism proposed by Microsoft, the Autoconfig mechanism proposed by Thunderbird, and the service discovery mechanism based on DNS SRV records proposed by the International Organization for Standardization IETF (The Internet Engineering Task Force). In addition, some clients or third-party organizations will also maintain their own mail service provider configuration lists.
[0004] Although the automatic configuration mechanism of mail has significantly improved the availability of clients, the existence of multiple mechanisms has also increased the complexity of these mechanisms in actual deployment. For example, the Autodiscover mechanism and the Autoconfig mechanism have their own format definitions and request methods. Mail server administrators must strictly follow the corresponding specification definitions when deploying them. Once the server administrator has misconfigured (for example, parameter settings do not meet the specifications) or mismanaged configuration files (for example, there are semantic differences between configuration parameters of different configuration mechanisms) due to configuration negligence or misunderstanding, it will affect the availability of mail services and the security of connections.
[0005] There is currently no relevant technical solution for efficiently checking the automated configuration and deployment status of the mail server, analyzing the validity, security and consistency of the configuration parameter information, and providing real-time alarms and fault location. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides an anomaly detection method and system for automatic configuration of email services, which can query the email server configuration information of the target email address in real time, perform configuration validity detection, security detection and consistency detection on the configuration information under different configuration mechanisms, and realize alarm and fault location.
[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0008] An anomaly detection method for automatic configuration of mail services, comprising:
[0009] For the email address to be queried, construct an automated configuration query request for the target email server corresponding to the email address, return multiple initial configuration parameter information through multiple automated configuration mechanisms deployed by the email service provider, parse the initial configuration parameter information, and obtain multiple configuration parameter sets consisting of configuration parameters; the configuration parameters include host name, port number and connection type parameters;
[0010] Performing syntax checks on multiple configuration parameter sets respectively, extracting host names and port numbers and establishing connections, generating configuration parameter validity detection reports, and sending configuration validity warning information to the mail service provider that deploys the corresponding automated configuration mechanism when there are syntax check errors in the configuration parameter sets and / or the connection cannot be established;
[0011] Extract connection type parameters from multiple configuration parameter sets respectively, and compare them with the highest security level parameter settings to generate a configuration security detection report; when the connection type parameters are not the highest security level parameter settings, send a configuration security warning message to the mail service provider that deploys the corresponding automatic configuration mechanism;
[0012] After formatting the configuration parameter sets from different automated configuration mechanisms, extract the configuration parameters one by one and compare them for consistency, generate a configuration parameter consistency detection report, and send a configuration consistency warning message to the mail service provider that deploys the corresponding automated configuration mechanism if there is any inconsistency in the configuration parameters;
[0013] According to the configuration parameter set, the validity test report, the security test report and the consistency test report, fault location and feedback are performed on the automated configuration deployment status of the email service provider.
[0014] Furthermore, for the email address to be queried, an automated configuration query request for the target email server corresponding to the email address is constructed, and multiple initial configuration parameter information is returned through multiple automated configuration mechanisms deployed by the email service provider, and the initial configuration parameter information is parsed to obtain multiple configuration parameter sets consisting of configuration parameters, specifically including:
[0015] Check whether the email domain name of the email address to be queried is an accessible domain name;
[0016] Generating an automated configuration query request for each automated configuration mechanism according to a specification definition of the automated configuration mechanism;
[0017] According to the specification definition of the automatic configuration mechanism, the initial configuration parameter information is parsed.
[0018] Further, checking whether the email domain name of the email address to be queried is an accessible domain name, specifically including: extracting the email domain name according to the structure definition of the email address, and querying the A record and MX record of the email domain name through a public domain name server or a private domain name server;
[0019] The automatic configuration mechanisms include the Autodiscover mechanism proposed by Microsoft, the Autoconfig mechanism proposed by Thunderbird, and the DNS SRV service discovery mechanism proposed by the International Organization for Standardization IETF;
[0020] The automated configuration mechanism also includes querying a common mail service provider configuration list to check whether the configuration parameters of the target mail server are included;
[0021] The parsing of the initial configuration parameter information includes: creating key-value pairs to store the configuration parameters and the values of the configuration parameters respectively, and adding a configuration source field to record the method of obtaining the configuration parameters.
[0022] Furthermore, when there is a syntax check error in the configuration parameter set, a configuration validity warning message is sent to the mail service provider that deploys the corresponding automatic configuration mechanism, specifically including:
[0023] According to the specification definition of the automatic configuration mechanism corresponding to the configuration parameter set, check the value of each configuration parameter in the configuration parameter set one by one, and send a configuration validity warning message to the email service provider when the value of the configuration parameter does not conform to the specification definition;
[0024] If a connection cannot be established, a configuration validity warning message is sent to the mail service provider that has deployed the corresponding automatic configuration mechanism, including:
[0025] If the syntax check of the configuration parameter set is correct, a connection is established with the target mail server according to the extracted host name and port number, and the type of connection established is recorded; if a connection cannot be established according to the host name and port number, a configuration validity alarm message is sent to the mail service provider.
[0026] Further, the configuration parameter set includes configuration parameters of an incoming server and / or an outgoing server of an email address, and the checking of the values of each configuration parameter in the configuration parameter set one by one includes checking the value of a host name, a value of a port number, and a value of a connection type parameter;
[0027] The configuration parameters of the incoming server include configuration parameters of the IMAP server and / or the POP server;
[0028] The configuration parameters of the outgoing server include configuration parameters of the SMTP server;
[0029] The values of the connection type parameter include a plain text connection type, a STARTTLS connection type that establishes an encrypted connection based on a plain text port, and an encryption-only connection type based on a dedicated port;
[0030] When there is a difference between the connection type actually established with the target mail server and the value of the connection type parameter in the configuration parameter set, a configuration validity warning message is sent to the mail service provider.
[0031] Furthermore, the connection type parameters are extracted from the multiple configuration parameter sets respectively, and compared with the highest security level parameter setting to generate a configuration security detection report; when the connection type parameter is not the highest security level parameter setting, a configuration security warning message is sent to the mail service provider that deploys the corresponding automatic configuration mechanism, specifically including:
[0032] Extracting a connection type parameter from the configuration parameter set according to the specification definition of the automatic configuration mechanism, and sending a configuration security warning message to the email service provider when the connection type parameter does not include an encryption-only connection type;
[0033] In the case that the connection type parameter does not include the encrypted-only connection type, the host name in the corresponding configuration parameter set is extracted, and a host name and encrypted-only connection port pair is constructed according to the encrypted-only connection port defined in the IETF RFC standard specification, and a connection test is performed to check the deployment of the target mail server for the encrypted-only connection type. If the connection is successful, there is a security lag in the current configuration parameter set, and a configured security warning message is issued to the mail service provider.
[0034] Furthermore, the encryption-only connection ports include port 993 of the IMAP protocol, port 995 of the POP3 protocol, and port 465 of the SMTP protocol.
[0035] Furthermore, the configuration parameter sets from different automatic configuration mechanisms are formatted, the configuration parameters are extracted one by one and compared for consistency, specifically including:
[0036] According to the specification definition of the automatic configuration mechanism and the corresponding configuration parameter set, at least the consistency comparison of the host name, port number and connection type parameters in different configuration parameter sets is performed.
[0037] Further, according to the configuration parameter set, the validity test report, the security test report and the consistency test report, fault location and feedback are performed on the automatic configuration deployment status of the email service provider, specifically including:
[0038] In the case where the configuration parameter set is empty, it is determined that the fault is that the email service provider has not deployed an automated configuration mechanism;
[0039] In the case where the validity detection report is abnormal, determining that the fault is caused by an incorrect configuration problem of the email service provider;
[0040] In the case where the security detection report is abnormal, determining that the fault is that the mail service provider does not deploy connection type parameters of the encryption-only connection type or there is a security lag in the configuration parameters;
[0041] When there is an abnormality in the consistency detection report, it is determined that the fault is a management problem of the configuration mechanism of the mail service provider. For example, the configuration information provided by the mail service provider under different automatic configuration mechanisms is not synchronized, resulting in different results obtained by using different automatic configuration mechanism requests.
[0042] An anomaly detection system for automated configuration of mail services, comprising:
[0043] The configuration query module is used to construct an automated configuration query request for the target mail server corresponding to the mail address to be queried, and return multiple initial configuration parameter information through multiple automated configuration mechanisms deployed by the mail service provider, and parse the initial configuration parameter information to obtain multiple configuration parameter sets consisting of configuration parameters; the configuration parameters include host name, port number and connection type parameters;
[0044] A configuration validity detection module is used to perform syntax checks on multiple configuration parameter sets, extract host names and port numbers and establish connections, generate configuration parameter validity detection reports, and send configuration validity warning information to the mail service provider that deploys the corresponding automatic configuration mechanism when there are syntax check errors in the configuration parameter sets and / or the connection cannot be established;
[0045] A configuration security detection module is used to extract connection type parameters from multiple configuration parameter sets, compare them with the highest security level parameter settings, and generate a configuration security detection report; when the connection type parameter is not the highest security level parameter setting, a configuration security warning message is sent to the mail service provider that deploys the corresponding automatic configuration mechanism;
[0046] A configuration consistency detection module is used to format the configuration parameter sets from different automated configuration mechanisms, extract the configuration parameters one by one and compare the consistency, generate a configuration parameter consistency detection report, and send a configuration consistency warning message to the mail service provider that deploys the corresponding automated configuration mechanism when there is inconsistency in the configuration parameters;
[0047] The fault analysis and location module is used to locate and provide feedback on the automatic configuration deployment status of the email service provider based on the configuration parameter set, the validity test report, the security test report and the consistency test report.
[0048] Compared with the prior art, the beneficial technical effects of the present invention are:
[0049] The anomaly detection method and system for automatic configuration of mail services provided by the present invention realizes the validity and security detection of configuration information for any input mail address by real-time requesting and querying multiple automatic configuration mechanisms, and combining syntax checking, connection testing of designated ports, etc.; further, by comparing the configuration parameter information of multiple automatic configuration mechanisms, the consistency detection of configuration parameters is realized. In the case where there are anomalies in the detection results of the above stages, timely error alarms and anomaly location can be realized with the help of the scheme of the present invention. At the same time, the above method provided by the present invention can improve the analysis efficiency of mail server connection failures, and plays a significant role in the effectiveness of mail services and the security of connections. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of an anomaly detection method for automated configuration of mail services according to an embodiment of the present invention;
[0051] Figure 2 is a flow chart of configuration query according to an embodiment of the present invention;
[0052] Figure 3 is a flowchart of configuration validity detection according to an embodiment of the present invention;
[0053] Figure 4 is a flow chart of configuration security detection according to an embodiment of the present invention;
[0054] Figure 5 is a flow chart of configuration consistency detection according to an embodiment of the present invention;
[0055] Figure 6 is a flowchart of fault analysis and location according to an embodiment of the present invention;
[0056] Figure 7 It is a structural diagram of an anomaly detection system for automatic configuration of mail services according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] A preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0058] In the technical solution disclosed in the present invention, in the process of obtaining the automated configuration of the target mail server, detecting the validity of the configuration parameters, the security of the configuration parameters and the consistency of the configuration parameters, etc., the processing, application and storage of the above data are based on publicly accessible data, and the relevant processes comply with the provisions of laws and regulations and meet the requirements of public order and good morals.
[0059] Figure 1 The figure is a flow chart of an anomaly detection method for automatic configuration of mail services according to an embodiment of the present invention.
[0060] like Figure 1 As shown, the anomaly detection method for automatic configuration of mail service of the present invention comprises the following steps:
[0061] Step 1: The querying party enters the email address to be queried through the query interface or interface, and checks whether the email address is a syntactically valid address according to the format construction requirements of the email address in the IETF RFC standard specification; if so, proceed to step 2; if not, directly return the detection failure, and do not perform subsequent configuration queries and anomaly detection.
[0062] Step 2: Extract the email domain name part in the email address, and query the A record and MX record of the email domain name through a public or private domain name server to check whether the email domain name to be queried is an accessible domain name; if so, proceed to step 3; if not, directly return the detection failure, and do not perform subsequent configuration query and anomaly detection.
[0063] Step 3: According to the existing automatic configuration mechanism specification, construct an automatic configuration query request to obtain the configuration parameter set of the target mail server; if no configuration parameters can be obtained, directly return the detection failure and do not perform subsequent anomaly detection.
[0064] Step 4: Based on the multiple configuration parameter sets obtained from the request, refer to the corresponding automated configuration mechanism specification definition, perform syntax checks on the values of the configuration parameters in the configuration parameter sets, and record the check results; if the syntax check is correct, extract the host name, port number and connection type parameters, establish a connection with the target mail server, and generate a configuration validity check report and validity warning information.
[0065] Step 5: Based on the multiple configuration parameter sets obtained from the request, refer to the corresponding automated configuration mechanism specification definition and extract the connection type parameters respectively; when the connection type parameters are not the highest security level parameters, further construct the host name and port pair to perform the connection test, and generate the configuration security detection report and configuration security warning information.
[0066] Step 6: Based on the multiple configuration parameter sets obtained from the request, refer to the corresponding automatic configuration mechanism specification definition, format the configuration parameters in a unified format, extract and compare the configuration parameters from different automatic configuration mechanisms one by one, and generate a configuration consistency detection report and configuration consistency alarm information.
[0067] Step 7: Based on the multiple configuration parameter sets, validity test reports, security test reports, and consistency test reports obtained above, fault location and feedback are performed on the automated configuration deployment status of the email service provider.
[0068] Figure 2 is a flowchart of configuration query according to an embodiment of the present invention, comprising steps 21 to 25:
[0069] Step 21: According to the specification definition of the Autodiscover mechanism released by Microsoft and the email address to be queried, an Autodiscover configuration query request is constructed, and the Autodiscover configuration query is executed;
[0070] In particular, although the Autodiscover mechanism is primarily designed for Microsoft's Exchange product line, it can also be used for service discovery of mail-based protocols.
[0071] Step 22: According to the draft definition of the Autoconfig mechanism released by the International Organization for Standardization IETF and the email address to be queried, an Autoconfig configuration query request is constructed, and the Autoconfig configuration query is executed.
[0072] In particular, the Autoconfig mechanism is an automated configuration solution first proposed by Thunderbird, and the International Organization for Standardization (IETF) is promoting its standardization process.
[0073] Step 23: According to the specification definition of the DNS SRV service discovery mechanism in the RFC 6186 / 8314 standard issued by the International Organization for Standardization IETF and the email address to be queried, a DNS SRV record query request is constructed and the DNS SRV record query is executed.
[0074] Step 24: Query the common mail service provider configuration list to check whether the configuration parameters of the target mail server are included.
[0075] The above operations are intended to obtain a configuration parameter set of the target mail server. The above operations are further described in detail below in conjunction with specific implementation methods.
[0076] First, the email automation configuration mechanism currently deployed in the real system is analyzed and extracted. When analyzing and constructing the query request, the embodiment of the present invention mainly focuses on the basic email protocols, including Simple Mail Transfer Protocol (SMTP), Post Office Protocol (POP) and Internet Message Access Protocol (IMAP).
[0077] Secondly, for the Autodiscover mechanism and the Autoconfig mechanism, an HTTP query request with a specific format (such as a URL) and a POST request method or a GET request method is generated; for the DNS SRV service discovery mechanism, an SRV record query request with a specific format is generated.
[0078] Optionally, when performing an automated configuration parameter information query, the embodiment of the present invention uses a multi-threaded manner to simultaneously send multiple automated configuration mechanism query requests to improve the retrieval efficiency of the configuration parameters.
[0079] Optionally, the embodiment of the present invention further provides configuration parameters based on a common mail service provider configuration list. For well-known mail service providers that do not deploy an automated configuration mechanism, the list may be further queried to obtain configuration parameters.
[0080] In particular, the above common mail service provider configuration list can be obtained through the built-in list of open source mail clients, or by actively scanning the portal websites of well-known mail service providers to collect configuration parameters.
[0081] Finally, the embodiment of the present invention extracts configuration parameters and values according to the sources of configuration parameters and related specification definitions, and constructs key-value pairs to store configuration parameter sets respectively.
[0082] The above configuration parameter set at least includes the configuration parameters of the incoming server or the configuration parameters of the outgoing server; in addition, according to the source of the configuration parameters, it at least includes the following information, mainly: (1) For the Autodiscover mechanism, the configuration parameter set includes configuration parameters such as host name, port number, whether to enable encrypted connection, whether to enable authentication, etc.; (2) For the Autoconfig mechanism, the configuration parameter set includes configuration parameters such as host name, port number, connection type and authentication method; (3) For the DNS SRV service discovery mechanism, the configuration parameter set includes configuration parameters such as host name and port number; (4) A list of common service provider configurations, including configuration parameters such as host name, port number and connection type.
[0083] In particular, for the Autodiscover and Autoconfig mechanisms, the order in which the above configuration parameters appear in the corresponding configuration parameter set also represents the order in which the client prioritizes the configuration parameters when establishing an actual connection; for the DNS SRV service discovery mechanism, the priority order of the configuration parameters depends on the sorting rules of the SRV records defined in the IETF RFC specification.
[0084] Optionally, the configuration parameters of the above configuration parameter set may also include a Uniform Resource Locator (URL) address for accessing a Webmail service of the mail service provider and an address of a portal website where the mail service provider publishes configuration information.
[0085] Figure 3 3 is a flow chart of configuration validity detection according to an embodiment of the present invention, comprising the following steps 31 to 34:
[0086] Step 31, based on the source of the configuration parameter set, extract all configuration parameters and configuration parameter values defined in the corresponding automated configuration mechanism specification, perform syntax checking, check and compare the configuration parameters and configuration parameter values in the configuration parameter set one by one to see if they comply with the specification definition, and record the syntax checking results.
[0087] Step 32, extract all host name and port pairs in the configuration parameter set for connection establishment in step 33; at the same time, extract the connection type parameter in the configuration parameter set for establishing a specific connection type in step 33.
[0088] Step 33: Establish a connection with the target mail server based on the host name, port number and connection type parameters extracted in step 32.
[0089] Step 34, based on the syntax check result of step 31 and the connection result of step 33, a validity check report of the mail server configuration is generated and an alarm message is sent to the mail service provider in real time.
[0090] In order to better illustrate the above steps 31 to 34, the above operations are further explained in detail below in conjunction with specific implementation methods.
[0091] First, according to an embodiment of the present invention, situations where syntax checking does not comply with specification definitions include: (1) configuration parameters in a configuration parameter set are not defined in the specification; (2) values of configuration parameters are not defined in the specification.
[0092] Secondly, the configuration validity test report includes: (1) the syntax check results of the mail server configuration parameters; (2) the connection test results of the mail server.
[0093] Specifically, if the syntax of the mail server configuration parameters is correct, step 33 is further executed to test the real-time connection; the mail server connection test result includes whether the host name is resolvable, whether the port is accessible, and whether the established connection meets the connection type specified in the configuration parameters.
[0094] Finally, the alarm information sent to the mail service provider includes: (1) when the configuration parameter syntax is incorrect, a configuration parameter syntax detection abnormality alarm is sent; (2) when the mail server cannot be accessed or the expected connection type cannot be established, a configuration parameter connection abnormality alarm is sent.
[0095] Figure 4 4 is a flowchart of configuration security detection according to an embodiment of the present invention, comprising the following steps 41 to 44:
[0096] Step 41: extract connection type parameters related to the connection type according to the source of the configuration parameter set.
[0097] Step 42: Check, based on the extracted connection type parameters, whether the current connection type parameters in the configuration parameter set comply with the highest security level parameter settings.
[0098] Step 43, extract the host name in the configuration parameter set, construct a host name and port pair according to the dedicated port of the encryption-only connection type defined in the IETF RFC specification, perform port scanning, and establish a connection with the target mail server.
[0099] Step 44, based on the connection type parameter check results and connection test results of steps 42 and 43, a mail server configuration security detection report is generated and an alarm message is sent to the mail service provider in real time.
[0100] In order to better illustrate the above steps 41 to 44, the present invention further explains the above operations in detail in conjunction with a specific implementation method.
[0101] First, according to an embodiment of the present invention, the configuration parameters related to the connection type in the above-mentioned different configuration mechanisms include: (1) for the Autodiscover mechanism, the connection type parameters include the Secure Socket Layer (SSL) and Encryption configuration parameters; (2) for the Autoconfig mechanism, the connection type parameters include the socket type (socketType) configuration parameters; (3) for the DNS SRV service discovery mechanism, the connection type parameters include determining the connection type used according to different SRV record labels; (4) a configuration list of common mail service providers, the configuration list directly indicates the specific connection type.
[0102] Specifically, the connection types include a plaintext connection type, a STARTTLS connection type that establishes an encrypted connection based on a plaintext port, and an encryption-only connection type based on a dedicated port.
[0103] Secondly, the highest security level parameter setting includes: (1) the connection type parameter in the configuration parameter set includes an encryption-only connection type; (2) if the configuration parameter set includes an encryption-only connection type, its priority order in the configuration parameter set is higher than other connection types.
[0104] In particular, when the connection type parameter in the configuration parameter set does not set the encryption-only connection type, step 43 is further performed to test whether the target mail server has actually deployed the encryption-only connection type.
[0105] Secondly, the security test report includes: (1) whether the connection parameter settings meet the highest security level parameter settings; (2) whether the connection parameter settings are consistent with the actual server deployment.
[0106] Finally, the security warning information sent to the email service provider includes: (1) the configuration parameter set includes the encryption-only connection type, but its priority in the configuration parameter set is lower than other connection types; (2) the configuration parameter set does not include the encryption-only connection type and the server is not actually deployed; (3) the configuration parameter set does not include the encryption-only connection type and the server is actually deployed with the encryption-only connection type, but the configuration parameter information is not updated in a timely manner.
[0107] Figure 5 is a flow chart of configuration consistency detection according to an embodiment of the present invention, including steps 51 to 54:
[0108] Step 51 : Based on the multiple configuration parameter sets obtained in the above configuration query phase, refer to the corresponding automatic configuration mechanism specification definition, format the above configuration parameter sets to generate a configuration parameter set with a unified format.
[0109] Step 52 , extracting configuration parameters in the configuration parameter set one by one according to the sequence of configuration parameter information in the configuration parameter set, for use in step 53 to perform configuration parameter comparison.
[0110] Step 53 , comparing the configuration parameters extracted in step 52 , and checking whether the configuration parameters generated by different automatic configuration mechanisms are consistent and whether the priority order of the configuration parameters is consistent.
[0111] Step 54: Generate a configuration consistency detection report based on the configuration parameter comparison result of step 53 and send an alarm message to the mail service provider in real time.
[0112] In order to better illustrate the above steps 51 to 54, the present invention further explains the above operations in detail in conjunction with a specific implementation method.
[0113] First, considering the differences in the definitions of different automatic configuration mechanism specifications, the embodiments of the present invention mainly focus on configuration parameters such as host name, port number and connection type parameters.
[0114] Specifically, the embodiment of the present invention formats different configuration parameter sets according to the following rules, including: (1) for the Autodiscover mechanism, when the Secure Socket Layer (SSL) or Encryption element is set to support encrypted connections, the connection type parameter is determined based on whether the port number is a well-known port, and the default setting is the STARTTLS connection type; (2) for the Autoconfig mechanism, the connection type parameter is determined based on the socket type (socketType) parameter; (3) for the DNS SRV service discovery mechanism, the connection type parameter is determined based on the results obtained from different SRV record tags, and the default setting is the STARTTLS connection type.
[0115] In particular, the connection type parameters determined based on whether the port number is a well-known port include: (1) encryption-only connection type, including port numbers 993, 995, and 465; (2) STARTTLS connection type or plaintext connection type, including port numbers 143, 110, and 587.
[0116] In particular, the mapping relationship between Secure Socket Layer (SSL) or Encryption and the connection type parameter includes: (1) For plain text connection type, the value of the Secure Socket Layer (SSL) or Encryption parameter includes the string "off" and "None"; (2) For encrypted connection type, the value of the Secure Socket Layer (SSL) or Encryption parameter includes the string "on", "SSL" and "TLS".
[0117] Specifically, the mapping relationship between the value of the socketType parameter and the connection type parameter includes: (1) plain text connection type, the value of the socketType parameter includes the string "plain"; (2) STARTTLS connection type, the value of the socketType parameter includes the string "STARTTLS"; (3) encryption-only connection type, the value of the socketType parameter includes the string "SSL".
[0118] In particular, the mapping relationship between the SRV record tag value and the connection type parameter includes: (1) plain text connection type or STARTTLS connection type, the SRV record tag value includes the string "_imap._tcp", "_pop3._tcp" and "_submission._tcp"; (2) encryption-only connection type, the SRV record tag value includes the string "_imaps._tcp", "_pop3s._tcp" and "_submissions._tcp".
[0119] Secondly, the consistency detection report at least includes: (1) whether the host name is consistent; (2) whether the port number is consistent; (3) whether the connection type parameters are consistent; (4) whether the priority order of the configuration parameters is consistent.
[0120] Finally, the alarm information sent to the mail service provider includes: (1) an alarm sent when the configuration parameter settings are inconsistent; (2) an alarm sent when the priority order of the configuration parameters is inconsistent.
[0121] Figure 6 6 is a flowchart of fault analysis and location according to an embodiment of the present invention, including steps 61 to 62:
[0122] Step 61, analyzing the possible location of the fault according to the input configuration parameter set, validity test report, safety test report and consistency test report and corresponding alarm information;
[0123] Step 62: Feedback to the email service provider based on the result of fault location.
[0124] In order to better illustrate the above steps 61 to 62, the present invention further explains the above operations in detail in conjunction with a specific implementation method.
[0125] Specifically, fault location and feedback are provided for the automated configuration and deployment status of the email service provider, including:
[0126] When the configuration parameter set is empty, it is determined that the fault is that the email service provider has not deployed an automated configuration mechanism;
[0127] In the case where there is an abnormality in the validity detection report, it is determined that the fault is caused by an incorrect configuration problem of the email service provider;
[0128] In the case where the security detection report is abnormal, determining that the fault is that the mail service provider does not deploy connection type parameters of the encryption-only connection type or there is a security lag in the configuration parameters;
[0129] When there is an abnormality in the consistency detection report, it is determined that the fault is a management problem of the configuration mechanism of the mail service provider. For example, the configuration information provided by the mail service provider under different automatic configuration mechanisms is not synchronized, resulting in different results obtained by using different automatic configuration mechanism requests.
[0130] Figure 7 It is a structural diagram of an anomaly detection system for automatic configuration of mail services according to an embodiment of the present invention.
[0131] like Figure 7 As shown, the above-mentioned anomaly detection system for automatic configuration of email services includes a configuration query module, a configuration validity detection module, a configuration security detection module, a configuration consistency detection module, and a fault analysis and location module.
[0132] The configuration query module is used to construct an automated configuration query request for the target mail server corresponding to the mail address to be queried, and return multiple initial configuration parameter information through multiple automated configuration mechanisms deployed by the mail service provider, and parse the initial configuration parameter information to obtain multiple configuration parameter sets consisting of configuration parameters; the configuration parameters include host name, port number and connection type parameters.
[0133] The configuration validity detection module is used to perform syntax checks on multiple configuration parameter sets respectively, extract host names and port numbers and establish connections, generate configuration parameter validity detection reports, and send configuration validity warning information to the email service provider that deploys the corresponding automated configuration mechanism when there are syntax check errors in the configuration parameter sets and / or the connection cannot be established.
[0134] The configuration security detection module is used to extract connection type parameters from multiple configuration parameter sets respectively, and compare them with the highest security level parameter settings to generate a configuration security detection report; when the connection type parameter is not the highest security level parameter setting, a configuration security warning message is sent to the email service provider that deploys the corresponding automated configuration mechanism.
[0135] The configuration consistency detection module is used to format the configuration parameter sets originating from different automated configuration mechanisms, extract the configuration parameters one by one and compare the consistency, generate a configuration parameter consistency detection report, and in the event of inconsistency in the configuration parameters, send a configuration consistency alarm message to the email service provider that deploys the corresponding automated configuration mechanism.
[0136] The fault analysis and location module is used to locate and provide feedback on the automatic configuration deployment status of the email service provider based on the configuration parameter set, the validity test report, the security test report and the consistency test report.
[0137] The system in the present invention corresponds to the method, and the specific technical scheme and technical effects of the method are also applicable to the system.
[0138] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.
[0139] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A method for detecting anomalies in automatic configuration of mail services, characterized in that: include: For the email address to be queried, construct an automated configuration query request for the target email server corresponding to the email address, return multiple initial configuration parameter information through multiple automated configuration mechanisms deployed by the email service provider, parse the initial configuration parameter information, and obtain multiple configuration parameter sets consisting of configuration parameters; the configuration parameters include host name, port number and connection type parameters; Performing syntax checks on multiple configuration parameter sets respectively, extracting host names and port numbers and establishing connections, generating configuration parameter validity detection reports, and sending configuration validity warning information to the mail service provider that deploys the corresponding automated configuration mechanism when there are syntax check errors in the configuration parameter sets and / or the connection cannot be established; Extract connection type parameters from multiple configuration parameter sets respectively, compare them with the highest security level parameter settings, and generate a configuration security detection report; When the connection type parameter is not the highest security level parameter setting, a configuration security warning message is issued to the mail service provider that deploys the corresponding automatic configuration mechanism, specifically including: extracting the connection type parameter in the configuration parameter set according to the specification definition of the automatic configuration mechanism, and when the connection type parameter does not include the encryption-only connection type, issuing the configuration security warning message to the mail service provider; when the connection type parameter does not include the encryption-only connection type, extracting the host name in the corresponding configuration parameter set, and constructing a host name and an encryption-only connection port pair according to the encryption-only connection port defined in the IETF RFC standard specification, performing a connection test, checking the deployment of the target mail server for the encryption-only connection type, if the connection is successful, then the current configuration parameter set has a security lag, and issuing the configuration security warning message to the mail service provider; After formatting the configuration parameter sets from different automated configuration mechanisms, extract the configuration parameters one by one and compare them for consistency, generate a configuration parameter consistency detection report, and send a configuration consistency warning message to the mail service provider that deploys the corresponding automated configuration mechanism if there is any inconsistency in the configuration parameters; According to the configuration parameter set, the validity test report, the security test report and the consistency test report, fault location and feedback are performed on the automated configuration deployment status of the email service provider.
2. The anomaly detection method for automatic configuration of mail services according to claim 1, characterized in that: For the email address to be queried, an automated configuration query request for the target email server corresponding to the email address is constructed, and multiple initial configuration parameter information is returned through multiple automated configuration mechanisms deployed by the email service provider, and the initial configuration parameter information is parsed to obtain multiple configuration parameter sets consisting of configuration parameters, specifically including: Check whether the email domain name of the email address to be queried is an accessible domain name; Generating an automated configuration query request for each automated configuration mechanism according to a specification definition of the automated configuration mechanism; According to the specification definition of the automatic configuration mechanism, the initial configuration parameter information is parsed.
3. The anomaly detection method for automatic configuration of mail services according to claim 2, characterized in that: Check whether the email domain name of the email address to be queried is an accessible domain name, specifically including: extracting the email domain name according to the structure definition of the email address, and querying the A record and MX record of the email domain name through a public domain name server or a private domain name server; The automatic configuration mechanisms include the Autodiscover mechanism proposed by Microsoft, the Autoconfig mechanism proposed by Thunderbird, and the DNS SRV service discovery mechanism proposed by the International Organization for Standardization; The automated configuration mechanism also includes querying a common mail service provider configuration list to check whether the configuration parameters of the target mail server are included; The parsing of the initial configuration parameter information includes: creating key-value pairs to store the configuration parameters and the values of the configuration parameters respectively, and adding a configuration source field to record the method of obtaining the configuration parameters.
4. The anomaly detection method for automated configuration of mail services according to claim 1, characterized in that: When there is a syntax check error in the configuration parameter set, a configuration validity warning message is sent to the mail service provider that deploys the corresponding automatic configuration mechanism, specifically including: According to the specification definition of the automatic configuration mechanism corresponding to the configuration parameter set, check the value of each configuration parameter in the configuration parameter set one by one, and send a configuration validity warning message to the email service provider when the value of the configuration parameter does not conform to the specification definition; If a connection cannot be established, a configuration validity warning message is sent to the mail service provider that has deployed the corresponding automatic configuration mechanism, including: If the syntax check of the configuration parameter set is correct, a connection is established with the target mail server according to the extracted host name and port number, and the type of connection established is recorded; if a connection cannot be established according to the host name and port number, a configuration validity alarm message is sent to the mail service provider.
5. The anomaly detection method for automatic configuration of mail services according to claim 4, characterized in that: The configuration parameter set includes configuration parameters of an incoming server and / or an outgoing server of an email address, and the step of checking the values of each configuration parameter in the configuration parameter set one by one includes checking the value of a host name, a value of a port number, and a value of a connection type parameter; The configuration parameters of the incoming server include configuration parameters of the IMAP server and / or the POP server; The configuration parameters of the outgoing server include configuration parameters of the SMTP server; The values of the connection type parameter include a plain text connection type, a STARTTLS connection type that establishes an encrypted connection based on a plain text port, and an encryption-only connection type based on a dedicated port; When there is a difference between the connection type actually established with the target mail server and the value of the connection type parameter in the configuration parameter set, a configuration validity warning message is sent to the mail service provider.
6. The anomaly detection method for automated configuration of mail services according to claim 1, characterized in that: The encryption-only connection ports include port 993 of the IMAP protocol, port 995 of the POP3 protocol, and port 465 of the SMTP protocol.
7. The anomaly detection method for automated configuration of mail services according to claim 1, characterized in that: The formatting of the configuration parameter sets from different automatic configuration mechanisms, extracting the configuration parameters one by one and performing consistency comparison specifically includes: According to the specification definition of the automatic configuration mechanism and the corresponding configuration parameter set, at least the consistency comparison of the host name, port number and connection type parameters in different configuration parameter sets is performed.
8. The anomaly detection method for automated configuration of mail services according to claim 1, characterized in that: According to the configuration parameter set, the validity test report, the security test report and the consistency test report, fault location and feedback are performed on the automatic configuration deployment status of the email service provider, specifically including: In the case where the configuration parameter set is empty, it is determined that the fault is that the email service provider has not deployed an automated configuration mechanism; In the case where the validity detection report is abnormal, determining that the fault is caused by an incorrect configuration problem of the email service provider; In the case where the security detection report is abnormal, determining that the fault is that the mail service provider does not deploy connection type parameters of the encryption-only connection type or there is a security lag in the configuration parameters; When there is an abnormality in the consistency detection report, it is determined that the fault is a management problem of the configuration mechanism of the mail service provider.
9. An anomaly detection system for automated configuration of mail services, characterized in that: include: The configuration query module is used to construct an automated configuration query request for the target mail server corresponding to the mail address to be queried, and return multiple initial configuration parameter information through multiple automated configuration mechanisms deployed by the mail service provider, and parse the initial configuration parameter information to obtain multiple configuration parameter sets consisting of configuration parameters; the configuration parameters include host name, port number and connection type parameters; A configuration validity detection module is used to perform syntax checks on multiple configuration parameter sets, extract host names and port numbers and establish connections, generate configuration parameter validity detection reports, and send configuration validity warning information to the mail service provider that deploys the corresponding automatic configuration mechanism when there are syntax check errors in the configuration parameter sets and / or the connection cannot be established; A configuration security detection module is used to extract connection type parameters from multiple configuration parameter sets respectively, and compare them with the highest security level parameter settings to generate a configuration security detection report; When the connection type parameter is not the highest security level parameter setting, a configuration security warning message is issued to the mail service provider that deploys the corresponding automatic configuration mechanism; specifically including: extracting the connection type parameter in the configuration parameter set according to the specification definition of the automatic configuration mechanism, and when the connection type parameter does not include the encryption-only connection type, issuing the configuration security warning message to the mail service provider; when the connection type parameter does not include the encryption-only connection type, extracting the host name in the corresponding configuration parameter set, and constructing a host name and an encryption-only connection port pair according to the encryption-only connection port defined in the IETF RFC standard specification, performing a connection test, checking the deployment of the target mail server for the encryption-only connection type, if the connection is successful, then the current configuration parameter set has a security lag, and issuing the configuration security warning message to the mail service provider; A configuration consistency detection module is used to format the configuration parameter sets from different automated configuration mechanisms, extract the configuration parameters one by one and compare the consistency, generate a configuration parameter consistency detection report, and send a configuration consistency warning message to the mail service provider that deploys the corresponding automated configuration mechanism when there is inconsistency in the configuration parameters; The fault analysis and location module is used to locate and provide feedback on the automatic configuration deployment status of the email service provider based on the configuration parameter set, the validity test report, the security test report and the consistency test report.
