Mail transmission method, electronic equipment, storage medium and program product

By adding a mail receiving server and a back-end server of Nginx mail proxy to the one-way optical gate, processing email requests and returning response information, the function of external machine-side devices can promptly understand the mail sending situation, and solving the one-way optical gate The problem of not being able to monitor email transmission in real time.

CN119484465AActive Publication Date: 2025-02-18BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411654997.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-18
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

In the hardware architecture of the one-way optical gate, the devices on the external terminal cannot understand the mail transmission situation in a timely manner, resulting in the inability to monitor the mail transmission process in real time.

Method used

By adding a mail receiving server to run as a standalone process, it serves as a backend server for Nginx mail proxy, providing the mail protocol interaction function with Nginx. Process mail requests according to pre-set business policies, return response information to the external terminal, and send corresponding mail files to the internal terminal, thereby realizing the two-way transmission function.

Benefits of technology

Through the one-way gate, the two-way transmission function can be realized, and external terminals can promptly understand the sending of emails, ensuring the security and real-time nature of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484465A_ABST
    Figure CN119484465A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a mail transmission method, electronic equipment, a storage medium and a program product. The method comprises the following steps: receiving a mail request sent by an external terminal; according to a preset service strategy, processing the mail request to obtain a processed mail request; and returning response information to the external terminal according to the processed mail request, sending a mail file corresponding to the processed mail request to the internal terminal, adding a mail receiving server and a rear-end server as an Nginx mail proxy, and only providing mail protocol interaction with Nginx, namely processing the mail request according to a preset service strategy. According to the method, the mail request is processed through the one-way gatekeeper to obtain the processed mail request, and the response information is returned to the external terminal according to the processed mail request, so that the two-way transmission function is realized through the one-way gatekeeper, and for the external terminal, the sending condition of the mail can be known in time through the received response information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an email transmission method, electronic device, storage medium and program product. Background Art

[0002] As a physical isolation device between different networks and different security domains, the one-way optical gate (also known as a one-way network gate) only allows one-way transmission of data without feedback. To prevent important information from being leaked, data in the external network can only be transmitted one-way to the internal network. The hardware architecture of the one-way optical gate is a 2+1 architecture, that is, it consists of an external terminal, an internal terminal and a one-way isolation component. The one-way isolation component is composed of two one-way isolation cards connected by a one-way optical fiber. The external terminal and the internal terminal provide services to the outside as a whole machine, and run proxy software respectively. The external terminal and the internal terminal communicate physically one-way. However, this method does not allow the device on the external terminal side to understand the email sending status. Therefore, how to timely understand the email sending status is an urgent problem to be solved. Summary of the invention

[0003] Some embodiments of the present application aim to provide a mail transmission method, an electronic device, a storage medium and a program product. Through the technical solution of the embodiments of the present application, a mail request sent by an external terminal is received; the mail request is processed according to a preset business policy to obtain a processed mail request; a response message is returned to the external terminal according to the processed mail request, and a mail file corresponding to the processed mail request is sent to the internal terminal. In the embodiments of the present application, a mail receiving server is added, which runs as an independent process and serves as a back-end server of the Nginx mail proxy. It only provides mail protocol interaction with Nginx, that is, the mail request is processed according to a preset business policy to obtain a processed mail request; and a response message is returned to the external terminal according to the processed mail request. In this way, a two-way transmission function is realized through a one-way network gate. For the external terminal, the sending status of the mail can be timely understood through the received response information.

[0004] In a first aspect, some embodiments of the present application provide an email transmission method, including:

[0005] Receive email requests sent by external terminals;

[0006] Processing the email request according to a preset business policy to obtain a processed email request;

[0007] According to the processed mail request, response information is returned to the external terminal, and a mail file corresponding to the processed mail request is sent to the internal terminal.

[0008] Some embodiments of the present application add a mail receiving server, which runs as an independent process and serves as the back-end server of the Nginx mail proxy. It only provides mail protocol interaction with Nginx, that is, it processes mail requests according to pre-set business policies, obtains processed mail requests, and returns response information to the external terminal based on the processed mail requests. In this way, a two-way transmission function is realized through a one-way network gate. For the external terminal, the sending status of the mail can be timely understood through the received response information.

[0009] Optionally, the method further comprises:

[0010] Parsing the email request sent by the external terminal to obtain authentication information;

[0011] Comparing the authentication information with preset authentication information;

[0012] Based on the comparison result, it is determined whether the external terminal has passed the authentication.

[0013] Optionally, judging whether the external terminal passes the verification according to the comparison result includes:

[0014] If the authentication information matches the preset authentication information, it is determined that the external terminal has passed the authentication.

[0015] Optionally, the authentication information includes at least email account information and password information.

[0016] Some embodiments of the present application use the SMTPD library to create a local mail authentication server, and verify the user name and password of the mail by reading the authentication information configured by the Web, without doing any other processing, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system. Optionally, sending the mail file corresponding to the processed mail request to the internal terminal includes:

[0017] The external machine uses the UDP protocol to send the mail file corresponding to the processed mail request to the internal machine through the isolation card, so that the internal machine sends the mail file to the internal terminal.

[0018] In some embodiments of the present application, a lightweight mail sending server is created using the SMTPLIB library in Python language, which runs as an independent process to send the landed mail files to the intranet server, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system.

[0019] Optionally, the preset business policy includes at least one or more control policies of the protocol type, sender, recipient, attachment or email content of the external network email.

[0020] Optionally, the processing the email request according to a preset business policy to obtain a processed email request includes:

[0021] Filtering the email request according to a preset business policy to obtain filtered email data;

[0022] A mail file corresponding to the mail data is generated according to the filtered mail data.

[0023] Some embodiments of the present application configure the mail reverse proxy function to proxy the mail requests from the external network to the local pseudo mail server, thereby completing the mail proxy forwarding function.

[0024] In a second aspect, some embodiments of the present application provide a mail transmission device, including:

[0025] A receiving module, used for receiving an email request sent by an external terminal;

[0026] A processing module, used to process the email request according to a preset business policy to obtain a processed email request;

[0027] The sending module is used to return response information to the external terminal according to the processed mail request, and send a mail file corresponding to the processed mail request to the internal terminal.

[0028] Some embodiments of the present application add a mail receiving server, which runs as an independent process and serves as the back-end server of the Nginx mail proxy. It only provides mail protocol interaction with Nginx, that is, it processes mail requests according to pre-set business policies, obtains processed mail requests, and returns response information to the external terminal based on the processed mail requests. In this way, a two-way transmission function is realized through a one-way network gate. For the external terminal, the sending status of the mail can be timely understood through the received response information.

[0029] Optionally, the processing module is used to:

[0030] Parsing the email request sent by the external terminal to obtain authentication information;

[0031] Comparing the authentication information with preset authentication information;

[0032] Based on the comparison result, it is determined whether the external terminal has passed the authentication.

[0033] Optionally, the processing module is used to:

[0034] If the authentication information matches the preset authentication information, it is determined that the external terminal has passed the authentication.

[0035] Optionally, the authentication information includes at least email account information and password information.

[0036] Some embodiments of the present application use the SMTPD library to create a local mail authentication server, and verify the user name and password of the mail by reading the authentication information configured by the Web, without doing any other processing, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system. Optionally, sending the mail file corresponding to the processed mail request to the internal terminal includes:

[0037] The external machine uses the UDP protocol to send the mail file corresponding to the processed mail request to the internal machine through the isolation card, so that the internal machine sends the mail file to the internal terminal.

[0038] In some embodiments of the present application, a lightweight mail sending server is created using the SMTPLIB library in Python language, which runs as an independent process to send the landed mail files to the intranet server, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system.

[0039] Optionally, the preset business policy includes at least one or more control policies of the protocol type, sender, recipient, attachment or email content of the external network email.

[0040] Optionally, the processing module is used to:

[0041] Filtering the email request according to a preset business policy to obtain filtered email data;

[0042] A mail file corresponding to the mail data is generated according to the filtered mail data.

[0043] Some embodiments of the present application configure the mail reverse proxy function to proxy the mail requests from the external network to the local pseudo mail server, thereby completing the mail proxy forwarding function.

[0044] In a third aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the email transmission method as described in any embodiment of the first aspect can be implemented.

[0045] In a fourth aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the email transmission method as described in any embodiment of the first aspect.

[0046] In a fifth aspect, some embodiments of the present application provide a computer program product, wherein the computer program product includes a computer program, wherein when the computer program is executed by a processor, it can implement the email transmission method as described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A flowchart of an email transmission method provided in an embodiment of the present application;

[0049] Figure 2 A flowchart of another email transmission method provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of the structure of a mail transmission device provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.

[0053] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0054] As a physical isolation device between different networks and different security domains, the one-way optical gate (also known as a one-way network gate) only allows one-way transmission of data without feedback. To prevent important information from being leaked, data in the external network can only be transmitted one-way to the internal network. The hardware architecture of the one-way optical gate is a 2+1 architecture, that is, it consists of an external terminal, an internal terminal and a one-way isolation component. The one-way isolation component is composed of two one-way isolation cards connected by a one-way optical fiber. The external terminal and the internal terminal provide services to the outside as a whole machine, respectively running agent software, and the external terminal and the internal terminal communicate physically one-way. However, this method cannot help the device on the external terminal side understand the email sending status. Therefore, how to timely understand the email sending status is a problem that needs to be solved urgently. In view of this, some embodiments of the present application provide a mail transmission method, which includes receiving an email request sent by an external terminal; processing the email request according to a preset business policy to obtain a processed email request; returning response information to the external terminal according to the processed email request, and sending an email file corresponding to the processed email request to the internal terminal. In the embodiment of the present application, a mail receiving server is added to run as an independent process. As the back-end server of the Nginx mail proxy, it only provides mail protocol interaction with Nginx, that is, processing the email request according to a preset business policy to obtain a processed email request; returning response information to the external terminal according to the processed email request. In this way, a two-way transmission function is realized through a one-way network gate. For the external terminal, the email sending status can be timely understood through the received response information.

[0055] like Figure 1 As shown, an embodiment of the present application provides an email transmission method, the method comprising:

[0056] S101, receiving an email request sent by an external terminal;

[0057] Specifically, the external terminal and the internal terminal are connected through a one-way firewall, which includes an external terminal, an internal terminal and a one-way isolation component. The external terminal communicates with the external terminal, and the internal terminal communicates with the internal terminal. The external terminal of the one-way firewall receives the email request sent by the external terminal.

[0058] S102, processing the email request according to a preset business policy to obtain a processed email request;

[0059] Specifically, the external terminal is pre-set with a business policy, which includes at least one or more control policies of the protocol type, sender, recipient, attachment or email content of the external network email. The business policy is used to filter the received email request to obtain the filtered email request.

[0060] Exemplarily, the service policy set by the external terminal is set according to the address information of the recipient. Therefore, filtering is performed upon receiving an email request, that is, only emails with the recipient address information in the service policy are received.

[0061] S103. Return response information to the external terminal according to the processed mail request, and send a mail file corresponding to the processed mail request to the internal terminal.

[0062] Specifically, after the external machine obtains the processed mail request, it returns the response information to the external terminal, and at the same time, sends the mail file corresponding to the mail request to the internal machine, and the internal machine then sends the mail file to the internal terminal. In this way, the external terminal receives the response information and can learn about the mail sending status in time, while for the internal terminal, it is still a one-way transmission, ensuring the security of data transmission. In the external machine of the one-way network gate, the native mail proxy function of Nginx is used, and the backend server is configured as the SMTPD mail receiving server created by the Python language. Nginx lands the received mail as a mail file, performs content filtering and virus killing on the mail file, and retains the high-performance processing and stability of Nginx.

[0063] Some embodiments of the present application add a mail receiving server, which runs as an independent process and serves as the back-end server of the Nginx mail proxy. It only provides mail protocol interaction with Nginx, that is, it processes mail requests according to pre-set business policies, obtains processed mail requests, and returns response information to the external terminal based on the processed mail requests. In this way, a two-way transmission function is realized through a one-way network gate. For the external terminal, the sending status of the mail can be timely understood through the received response information.

[0064] Another embodiment of the present application further supplements the email transmission method provided in the above embodiment.

[0065] Optionally, the method further comprises:

[0066] Parse the email request sent by the external terminal to obtain authentication information;

[0067] comparing the authentication information with the preset authentication information;

[0068] Based on the comparison result, it is determined whether the external terminal has passed the authentication.

[0069] Optionally, judging whether the external terminal passes the verification according to the comparison result includes:

[0070] If the authentication information matches the preset authentication information, it is determined that the external terminal has passed the authentication.

[0071] Optionally, the authentication information includes at least email account information and password information.

[0072] On the external machine of the one-way network firewall, use the Python language and the SMTPD library to create a local mail authentication server. By reading the authentication information of the Web configuration, the username and password of the mail are verified without any other processing. This reduces the complexity of implementation, reduces the difficulty of debugging, reduces erroneous sending, and improves the stability of the system.

[0073] Some embodiments of the present application use the SMTPD library to create a local mail authentication server, and verify the user name and password of the mail by reading the authentication information configured by the Web, without doing any other processing, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system. Optionally, sending a mail file corresponding to the processed mail request to the internal terminal includes:

[0074] The external machine uses the UDP protocol to send the mail file corresponding to the processed mail request to the internal machine through the isolation card, so that the internal machine sends the mail file to the internal terminal.

[0075] In some embodiments of the present application, a lightweight mail sending server is created using the SMTPLIB library in Python language, which runs as an independent process to send the landed mail files to the intranet server, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system.

[0076] Optionally, the preset business policy includes at least one or more control policies of the protocol type, sender, recipient, attachment or email content of the external network email.

[0077] Optionally, the email request is processed according to a preset business policy to obtain a processed email request, including:

[0078] Filter the email request according to the pre-set business policy to obtain the filtered email data;

[0079] Based on the filtered mail data, a mail file corresponding to the mail data is generated.

[0080] Some embodiments of the present application configure the mail reverse proxy function to proxy the mail requests from the external network to the local pseudo mail server, thereby completing the mail proxy forwarding function.

[0081] Figure 2This is a schematic diagram of the mail proxy design of a one-way network gate. In the embodiment of the present application, key modules are added to the one-way network gate, including an Nginx mail proxy module, an SMTPD mail authentication server module, an SMTPD mail receiving server module, and an SMTPLIB sending client module. These modules together constitute a solution that combines the Nginx mail proxy with the mail server to realize the mail proxy function of the one-way network gate.

[0082] The native mail proxy function of Nginx is used on the external machine, combined with the SMTPD mail receiving server and the SMTPD mail authentication server, to receive mails from the external network, complete the mail landing and filter the mail content according to the business policy. The synchronization module uses the UDP protocol to send the legitimate mail files to the internal machine through the isolation card. On the internal machine, the SMTPLIB sending client sends the mail to the internal network, realizing the mail proxy of the one-way network gate, that is, a one-way mail data transmission without feedback.

[0083] Among them, 1) Nginx mail proxy module, Nginx as a high-performance reverse proxy server, can handle a large number of concurrent connections, has high throughput and low latency, easy to expand and maintain.

[0084] By configuring the mail reverse proxy function, mail requests from the external network are proxied to the local pseudo mail server, completing the mail proxy forwarding function.

[0085] By configuring the email authentication function, the authentication request is forwarded to the local authentication server, and the authentication information is verified and authenticated according to the username and password configured on the Web.

[0086] By configuring the email backup function, emails can be saved in the form of files.

[0087] 2) The SMTPD authentication server module uses the Python language and the SMTPD library to create a lightweight mail receiving server on the external machine of the one-way network gate. It runs as an independent process and serves as the back-end server of the Nginx mail proxy. It only provides mail protocol interaction with Nginx and discards all received mails without any processing. This reduces the complexity of implementation, the difficulty of debugging, the error sending, and improves the stability of the system.

[0088] Use Python's SMTPD library to create a local mail authentication server, run it as a separate process, and initialize the web configuration mail authentication information when the system starts.

[0089] The system configures email authentication information, such as user name and password, through the Web, saves the authentication information in a file, and sends an authentication information update signal to the local email authentication server.

[0090] After receiving the update signal, the local authentication server reads the Web configuration email authentication information and caches the user name and password.

[0091] Receive the authentication request from the Nginx mail proxy module, verify the username and password of the email, and do not do any other processing.

[0092] 3) SMTPD receiving server module, using Python's SMTPD library to create a local pseudo mail receiving server, running as an independent process, and starting during system initialization.

[0093] The SMTPD mail receiving server is used as the backend receiving server of the Nginx mail proxy. It agrees with the Nging mail proxy on the IP and port number of the mail proxy and configures them in the Nginx mail proxy configuration file.

[0094] The SMTPD mail receiving server receives the protocol interaction and mail data conversion request from the Nginx mail proxy module, discards all received mail data, maintains the communication connection with the Nginx proxy, and provides support for the complete mail reception of the Nginx mail proxy.

[0095] 4) Synchronization module: On the external machine, after Nginx receives the email and lands it as an email file, the synchronization module uses the UDP protocol to send the email file to the internal machine through the isolation card and saves it in the internal machine's email proxy directory.

[0096] 5) SMTPLIB sending client module. On the internal machine, the SMTPLIB sending client module acts as an independent process, accesses the internal machine mail proxy directory, reads mail files, and sends mail files to the mail receiving server of the internal network.

[0097] The SMTPLIB sending client configures the configuration information of the intranet receiving server through the Web and saves it in a file. The sending mail module reads the configuration information of the mail server before sending, sets the address, user name and password of the internal network mail receiving server, uses the SMTPLIB library to communicate with the mail receiving server through the SMTP protocol, and sends the mail to the mail receiving server of the internal network.

[0098] For example:

[0099] The embodiment of the present application describes a process in which an email is sent from an external network to an internal network through a one-way network gate, as shown below:

[0100] 1. Initialize each module of the mail agent;

[0101] On the external machine, the Nginx mail proxy process is started, and the address and port of the SMTPD authentication server and SMTPD receiving server are configured by default in the configuration file.

[0102] On the external machine, the SMTPD authentication server is started as a separate process.

[0103] On the external machine, the SMTPD mail receiving server is started as an independent process.

[0104] 2. Configure the mail proxy policy through the Web;

[0105] For external machines, the configured mail proxy policy includes access control of the protocol type, sender, recipient, attachment, mail content, and other black and white lists of external mail.

[0106] Internal machine, configure internal and external mail server information.

[0107] 3. The external terminal receives the email request and performs email authentication;

[0108] On the external machine, the Nginx mail proxy module receives mail requests from the external network, parses the mail requests, and sends authentication requests to the SMTPD authentication server.

[0109] After the external machine, SMTPD authentication server receives the email authentication request from Nginx, it reads the email authentication information configured in the Web, performs authentication verification, and responds with the authentication result to the Nginx email proxy.

[0110] On the external machine, the Nginx proxy receives the authentication result from the SMTPD authentication server. If the authentication fails, the connection is disconnected and the transmission ends.

[0111] On the external machine, the Nginx proxy receives the authentication result from the SMTPD authentication server. If the authentication is successful, the mail request is proxied to the local mail receiving server to start the mail data transmission.

[0112] 4. The external machine receives the email data and performs content filtering;

[0113] The Nginx mail proxy module filters the mail data for access control, such as access control on the protocol type, sender, recipient, attachment, mail content, and other black and white lists.

[0114] The Nginx mail proxy module forwards the mail data to the SMTPD receiving server, and at the same time converts the mail data into mail files and saves them in the mail file directory of the external machine.

[0115] The SMTPD receiving server only interacts with the Nginx mail agent through protocols and discards all received mail data without any processing.

[0116] 5. Use the isolation card to synchronize the mail files from the external terminal to the internal terminal;

[0117] The external machine sends the mail file to the internal machine via the isolation card using the UDP protocol. After receiving the mail file, the internal machine saves it to the mail file directory.

[0118] 6. The internal machine sends email files;

[0119] The SMTPLIB client polls the internal machine's mail file directory and sends mail files to the internal network.

[0120] The embodiment of the present application maximizes the reuse of the mail proxy function in the Nginx reverse proxy, can handle a large number of concurrent connections, has high throughput and low latency, and improves the scalability and maintainability of the system. It realizes the effective combination of the Nginx mail proxy function and the SMTPD mail server, reuses a lot of advantages of Nginx, has high performance and can handle a large number of concurrent connections, has high throughput and low latency, is easy to expand and maintain, provides SSL / TLS encryption support, can help protect the security of mail transmission, and has good stability and resource utilization efficiency.

[0121] Use Python language and SMTPD library to create a lightweight mail receiving server, which runs as an independent process and acts as the backend server of Nginx mail proxy. It only provides mail protocol interaction with Nginx and discards all received mails without any processing, which reduces the complexity of implementation, the difficulty of debugging, the error sending and improves the stability of the system.

[0122] Use Python language and SMTPD library to create a local mail authentication server. By reading the authentication information of Web configuration, the username and password of the mail are verified without any other processing. This reduces the complexity of implementation, reduces the difficulty of debugging, reduces the number of erroneous sending, and improves the stability of the system.

[0123] Using Python language and SMTPD library to write SMTPD mail authentication server and SMTPD mail receiving server is a lightweight process that only performs simple authentication and SMTP protocol interaction, and does not perform complex business logic processing, which simplifies the difficulty of implementation, reduces the error sending rate, and improves the stability of the system.

[0124] The email sending client is written in Python using SMTPLIB. It is a lightweight process that runs as an independent process and sends the landed email files to the intranet server. It does not perform complex business logic processing, simplifies the difficulty of implementation, reduces the error sending rate, reduces the complexity of implementation, reduces the difficulty of debugging, and improves the stability of the system.

[0125] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any manner without conflict, and this application is not limited thereto.

[0126] Another embodiment of the present application provides an email transmission device, which is used to execute the email transmission method provided in the above embodiment.

[0127] like Figure 3 , which is a schematic diagram of the structure of the mail transmission device provided in the embodiment of the present application. The mail transmission device includes a receiving module 301, a processing module 302 and a sending module 303, wherein:

[0128] The receiving module 301 is used to receive an email request sent by an external terminal;

[0129] The processing module 302 is used to process the email request according to the preset business policy to obtain the processed email request;

[0130] The sending module 303 is used to return response information to the external terminal according to the processed email request, and send the email file corresponding to the processed email request to the internal terminal.

[0131] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0132] Some embodiments of the present application add a mail receiving server, which runs as an independent process and serves as the back-end server of the Nginx mail proxy. It only provides mail protocol interaction with Nginx, that is, it processes mail requests according to pre-set business policies, obtains processed mail requests, and returns response information to the external terminal based on the processed mail requests. In this way, a two-way transmission function is realized through a one-way network gate. For the external terminal, the sending status of the mail can be timely understood through the received response information.

[0133] Another embodiment of the present application further supplements the mail transmission device provided in the above embodiment.

[0134] Optionally, the processing module is used to:

[0135] Parse the email request sent by the external terminal to obtain authentication information;

[0136] comparing the authentication information with the preset authentication information;

[0137] Based on the comparison result, it is determined whether the external terminal has passed the authentication.

[0138] Optionally, the processing module is used to:

[0139] If the authentication information matches the preset authentication information, it is determined that the external terminal has passed the authentication.

[0140] Optionally, the authentication information includes at least email account information and password information.

[0141] Some embodiments of the present application use the SMTPD library to create a local mail authentication server, and verify the user name and password of the mail by reading the authentication information configured by the Web, without doing any other processing, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system. Optionally, sending a mail file corresponding to the processed mail request to the internal terminal includes:

[0142] The external machine uses the UDP protocol to send the mail file corresponding to the processed mail request to the internal machine through the isolation card, so that the internal machine sends the mail file to the internal terminal.

[0143] In some embodiments of the present application, a lightweight mail sending server is created using the SMTPLIB library in Python language, which runs as an independent process to send the landed mail files to the intranet server, thereby reducing the complexity of implementation, reducing the difficulty of debugging, reducing erroneous sending, and improving the stability of the system.

[0144] Optionally, the preset business policy includes at least one or more control policies of the protocol type, sender, recipient, attachment or email content of the external network email.

[0145] Optionally, the processing module is used to:

[0146] Filter the email request according to the pre-set business policy to obtain the filtered email data;

[0147] Based on the filtered mail data, a mail file corresponding to the mail data is generated.

[0148] Some embodiments of the present application configure the mail reverse proxy function to proxy the mail requests from the external network to the local pseudo mail server, thereby completing the mail proxy forwarding function.

[0149] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0150] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any manner without conflict, and this application is not limited thereto.

[0151] The embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the operation of the method corresponding to any embodiment of the email transmission method provided in the above embodiments can be implemented.

[0152] An embodiment of the present application further provides a computer program product, wherein the computer program product includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations of the method corresponding to any embodiment of the email transmission method provided in the above embodiments.

[0153] like Figure 4 As shown, some embodiments of the present application provide an electronic device 400, which includes: a memory 410, a processor 420, and a computer program stored in the memory 410 and executable on the processor 420, wherein the processor 420 can implement a method of any embodiment included in the above-mentioned email transmission method when reading the program from the memory 410 through a bus 430 and executing the program.

[0154] Processor 420 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 420 can be a microprocessor.

[0155] The memory 410 may be used to store instructions executed by the processor 420 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 420 of the disclosed embodiment may be used to execute instructions in the memory 410 to implement the method shown above. The memory 410 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.

[0156] The above are only embodiments of the present application and are not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0157] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0158] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A mail transmission method, characterized in that: The method comprises: Receive email requests sent by external terminals; Processing the email request according to a preset business policy to obtain a processed email request; According to the processed mail request, response information is returned to the external terminal, and a mail file corresponding to the processed mail request is sent to the internal terminal.

2. The mail transmission method according to claim 1, characterized in that: The method further comprises: Parsing the email request sent by the external terminal to obtain authentication information; Comparing the authentication information with preset authentication information; Based on the comparison result, it is determined whether the external terminal has passed the authentication.

3. The mail transmission method according to claim 2, characterized in that: The step of judging whether the external terminal passes the verification according to the comparison result includes: If the authentication information matches the preset authentication information, it is determined that the external terminal has passed the authentication.

4. The mail transmission method according to claim 2, characterized in that: The authentication information includes at least email account information and password information.

5. The mail transmission method according to claim 4, characterized in that: The sending the mail file corresponding to the processed mail request to the internal terminal includes: The external machine uses the UDP protocol to send the mail file corresponding to the processed mail request to the internal machine through the isolation card, so that the internal machine sends the mail file to the internal terminal.

6. The mail transmission method according to claim 1, characterized in that: The preset business policy at least includes one or more control policies of the protocol type, sender, recipient, attachment or email content of the external network email.

7. The mail transmission method according to claim 6, characterized in that: The step of processing the email request according to the preset business policy to obtain the processed email request includes: Filtering the email request according to a preset business policy to obtain filtered email data; A mail file corresponding to the mail data is generated according to the filtered mail data.

8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor can implement the mail transmission method described in any one of claims 1 to 7 when executing the program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the program, when executed by a processor, can implement the mail transmission method described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, wherein: When the computer program is executed by a processor, the email transmission method described in any one of claims 1 to 7 can be implemented.

Citation Information

Patent Citations

  • One-way data transmission method and device

    CN112866206A

  • Mail delivery method, device and equipment and storage medium

    CN116962341A

  • Cross-network one-way mail operation and data access method and system

    CN117176392A

  • Data transmission method and device, electronic equipment and storage medium

    CN117294503A

  • Transparent proxy method of mail server, electronic equipment and storage medium

    CN118473806A