# Patent

## Title
Method and apparatus for electronic mail filtering

## Abstract

A message processing apparatus (200) is provided in an electronic messaging system. The message processing apparatus (200) holds an ordered queue (232) of the electronic messages (101) and adds a new incoming message (101) to the queue (232) according to a reputation score (201) allocated to each incoming message. Messages having a highest reputation score (201) are extracted from a top of the queue (232) for detailed analysis according to one or more filtering mechanisms. A message forwarding unit (250) forwards wanted messages to a server unit (300) for onward transmission to a recipient terminal (20). Messages from a trusted client identity (105) who is most likely to send wanted messages are allocated a high reputation score (201) and take priority through the queue (232). Messages from a non-trusted client identity (105) are allocated a lower reputation score (201) and remain in the queue (232) until all messages with a higher reputation score (201) have been extracted.

## Background
FIELD OF THE INVENTION
The present invention relates generally to the field of electronic messaging systems such as Internet email. More particularly, the present invention relates to a message processing apparatus and a message processing method for processing messages in an electronic messaging system.
DESCRIPTION OF THE BACKGROUND ART
Electronic messaging systems of the related art come in various different forms, of which one particularly well known and widely used system is Internet e-mail. However, electronic messaging systems like Internet e-mail are inherently insecure and suffer from a large number of unwanted messages. As a result, many workers in this field have spent considerable effort developing mechanisms for filtering such unwanted messages. Most of these filtering mechanisms are based on intensive processing of messages to remove the unwanted messages, whilst allowing the wanted messages to proceed unhindered. In particular, these filtering mechanisms include anti-virus filtering mechanisms to automatically block messages containing viruses, worms, phishing attacks, spyware and Trojans as various forms of malicious message content. Further, anti-spam filtering mechanisms identify and block delivery of junk e-mail messages containing unsolicited advertising for products and services. Further still, content filtering mechanisms provide highly sophisticated lexical analysis of messages to automatically filter offensive terms in many different languages and also to identify messages which relate to certain words, terms and phrases where a filtering action is required in relation to privacy, confidentiality, a regulatory compliance requirement or other security concerns. It is often desirable to employ these differing technologies in combination to provide more effective multi-layered filtering. However, a problem arises in that these more complex filtering mechanisms and the combined use of multiple separate filtering mechanisms places heavy loads on the apparatus which perform these filtering functions. In many cases, these limitations of the hardware infrastructure are one of the main factors that inhibit growth of such electronic messaging systems.
In the related art, Internet email and SMTP (Simple Mail Transfer Protocol) are discussed in detail in RFC2821 of April 2001 (see www.rfc.net). SMTP runs over TCP/IP as discussed in detail in RFC793 of September 1981 and subsequent RFC publications.
SUMMARY
An aim of the present invention is to provide a message processing apparatus, and a message processing method, which improve efficiency in an electronic messaging system. More particularly, an aim of the present invention is to provide a message processing apparatus, and a message processing method, which assist in making more effective use of hardware which supports an electronic messaging system. A further aim of the present invention is to provide a message processing apparatus and method which allow an electronic messaging system to operate more efficiently, particularly in relation to unwanted messages.
According to the present invention there is provided an apparatus and method as set forth in the appended claims. Other, optional, features of the invention will be apparent from the dependent claims, and the description which follows.
The following is a summary of various aspects and advantages realizable according to embodiments of the invention. It is provided as an introduction to assist those skilled in the art to more rapidly assimilate the detailed design discussion that ensues and does not and is not intended in any way to limit the scope of the claims that are appended hereto.
The exemplary embodiments of the present invention provide a message processing apparatus arranged to process electronic messages on a communication path between a client unit and a server unit. The message processing apparatus holds an ordered queue of the electronic messages and adds a new incoming message to the queue according to a reputation score allocated to the incoming message by a reputation scoring unit. Messages having a highest reputation score are then extracted from a top of the queue for detailed analysis in a message analysis unit according to one or more filtering mechanisms. Where the analysis determines the message to be a wanted message, a message forwarding unit then performs onward transmission of the wanted message along the communication path towards the recipient terminal. By contrast, messages having a lower reputation score remain in the queue. Thus, the message analysis unit is directed to concentrate the available hardware resources towards the messages having the highest allocated reputation scores—which are most likely to be wanted messages.
Notably, the exemplary embodiments allocate the reputation score according to a client identity associated with the client unit in relation to the incoming message. Thus, messages from a trusted client who is most likely to send wanted messages are allocated a high reputation score and are quickly passed through the queue. Messages from a non-trusted or unknown client are allocated a low reputation score and remain in the queue until all messages with a higher reputation score have been extracted.
The exemplary embodiments provide a queue that is self-organised in relation to loading conditions of the system. That is, messages having a high reputation score quickly reach the top of the queue and are extracted for onward processing towards the server unit, whereas messages having a low reputation score are added at a lowly position on the queue and will only be forwarded when the loading conditions of the system allow, and at the busiest times are discarded even before being added to the queue.
The exemplary embodiments have further advantages in that at times when the system is relatively quiet then more messages having a relatively low reputation score will be passed through the queue and are then available for detailed analysis in the message processing apparatus to improve future allocated reputation scores. Thus, the queuing system provides a load-balancing effect and allows the message processing apparatus to concentrate the available resources on dealing with mostly wanted messages during key business hours, whilst also exposing the system to sufficient unwanted messages during an overnight sampling period to maintain a high degree of accuracy in relation to allocated reputation scores.
The exemplary system includes a connection unit arranged to maintain an incoming connection in relation to the incoming message. This connection is maintained until the message is removed from the queue, and is thus maintained during the initial phase of allocating a reputation score and whilst the message resides in the queue.
In the exemplary embodiments, each message is associated with a respective total time to live (TTL). If the TTL expires before a particular message is extracted from the head of the queue, then that message is discarded and the connection is closed. Thus, messages having a low reputation score are discarded if the total time to live expires before those messages reach the top of the queue.
The exemplary embodiments further provide that the queue has a predetermined maximum size. When the system is busy and the queue is already full, an incoming message having a low reputation score is not added to the queue. Here, the message is discarded and the incoming connection for that message is closed.
In the exemplary embodiments, only messages having a reputation score higher than at least one message already on the queue are added to the queue when the queue has already reached the predetermined maximum permitted size. Thus, in this case, one or more messages having a low reputation score are discarded from a bottom of the queue in favour of a new incoming message having a higher reputation score.
The exemplary embodiments are particularly useful in the context of Internet e-mail, wherein mail delivery protocols (i.e. SMTP) allow a connection for an incoming message to be held open for a limited time period and during this period the message processing apparatus does not assume responsibility for onward transmission of the message. Thus, the message processing apparatus is able to selectively accept only those messages having a highest reputation score for detailed analysis, without adversely affecting the operations performed by other parts of the electronic messaging system.
In a further aspect of the present invention there is provided an electronic messaging system incorporating the message processing apparatus discussed herein.
In a still further aspect of the present invention there is provided a message processing method which performs the steps discussed herein.
In a yet further aspect of the present invention there is provided a computer-readable storage medium having recorded thereon instructions executable by a computer to perform the message processing method discussed herein.
At least some embodiments of the invention may be constructed, partially or wholly, using dedicated special-purpose hardware. Terms such as ‘component’, ‘module’ or ‘unit’ used herein may include, but are not limited to, a hardware device, such as a Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC), which performs certain tasks. Alternatively, elements of the invention may be embodied in software, or as a combination of software and hardware. Here, the software is configured to reside on an addressable storage medium and is configured to execute on one or more processors. The medium may take any suitable structure including an optical medium such as CD or DVD, a magnetic medium such as tape, floppy disk, or hard disk, or a solid-state medium such as dynamic or static random access memories (DRAMs or SRAMs), erasable and programmable read-only memories (EPROMs), electrically erasable and programmable read-only memories (EEPROMs) and flash memories. Thus, functional elements of the invention may in some embodiments include, by way of example, components, such as software components, object-oriented software components, class components and task components, processes, functions, attributes, procedures, subroutines, segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables. Further, although the exemplary embodiments have been described with reference to the components, modules and units discussed herein, such functional elements may be combined into fewer elements or separated into additional elements.



BRIEF DESCRIPTION OF THE DRAWINGS
For a better understanding of the invention, and to show how embodiments of the same may be carried into effect, reference will now be made, by way of example, to the accompanying diagrammatic drawings in which:
FIG. 1 is a schematic overview of an electronic messaging system for Internet e-mail relating to embodiments of the present invention;
FIG. 2 is a schematic diagram illustrating an exemplary message processing apparatus;
FIG. 3 is a more detailed schematic diagram of the message processing apparatus according to exemplary embodiments of the present invention;
FIG. 4 is a schematic diagram showing the exemplary message processing apparatus in more detail;
FIG. 5 is a schematic diagram showing further details of the exemplary message processing apparatus; and
FIG. 6 is a schematic diagram showing further details of the exemplary message processing apparatus.



DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS OF THE INVENTION
The exemplary embodiments of the present invention will be discussed in detail in relation to Internet e-mail systems which send electronic messages under SMTP. However, the teachings, principles and techniques of the present invention are also applicable in other exemplary embodiments. For example, embodiments of the present invention are also applicable to other electronic messaging systems including in particular messaging systems which perform store-and-forward type messaging. Here, exemplary systems include SMS (Short Message Service), MMS (Multimedia Messaging Service) and IM (Instant Messaging) systems, which will all benefit from the teachings of the present invention.
FIG. 1 is a schematic overview of an Internet e-mail system in which embodiments of the present invention are applicable.
In FIG. 1, the messaging system 1 comprises a sending terminal 10, a recipient terminal 20, a originating mail server 30, a receiving mail server 60, a Domain Name Server (DNS) 40, one or more gateways 70, and one or more relays or Mail Transfer Agents (MTA) 50. These elements are connected together in a network, which here is based on Internet Protocol (IP). Further, the messaging system of FIG. 1 comprises at least one message processing apparatus (MPA) 200 according to the exemplary embodiments of the present invention.
In general terms, a message is transmitted through the messaging system 1 from the sending terminal 10 to the receiving terminal 20, and will pass through one or more of the other elements along the way. The sending terminal 10 is identified by a sender identity, which for Internet email gives the address of the sender's mailbox—in this example <userA@domainone.com>. Similarly, the recipient terminal 20 is identified by a recipient identity—in this example <userB@domaintwo.com>. As will be familiar to those skilled in the art, typically an e-mail message is prepared by an end-user mail program and sent from the sending terminal 10 to the local mail server 30, which may reside on the same local area network as the sending terminal 10 or may reside elsewhere such as at an Internet Service Provider (ISP). The mail server 30 refers to the Domain Name Server (DNS) 40 to determine a delivery path with respect to the recipient identity. Here, the DNS 40 supplies a Mail eXchange (MX) record associated with the recipient. The originating mail server 30 then forwards the e-mail to a next element of the electronic messaging system according to the MX record, until eventually the message reaches the local mail server 60 associated with the recipient terminal 20. This receiving mail server 60 hosts the mailbox addressed by the recipient identity <userB@domaintwo.com> ready for the recipient terminal 20 to access the transmitted message.
As shown in FIG. 1, the electronic messaging system includes one or more relay servers or message transfer agents (MTAs) 50. One of these MTAs 50 is usually set as the target of the MX record of the recipient identity at the DNS 40 and the MTA 50 may then accept or reject the task of relaying the message toward the recipient. If the relay server 50 accepts this task, then the relay server now assumes responsibility for establishing a transmission channel to the next specified element in the system.
The exemplary message processing apparatus (MPA) 200 is arranged to intercept messages using store-and-forward type interception. The MPA 200 is provided at any suitable point in the system 1 prior to the messages reaching the receiving mail server 60, or at least prior to the messages reaching the receiving terminal 20.
In a first embodiment as illustrated in FIG. 1 and considered in more detail below, the MPA 200 is arranged to function as a mail transfer agent. That is, the MX record held by the DNS 40 is configured to direct email messages intended for the recipient identity of the receiving terminal 20 to the message processing apparatus 200. These messages are processed by the message processing apparatus 200 to remove (e.g. quarantine) unwanted messages. The remaining wanted messages are then delivered from the message processing apparatus 200 to the receiving mail server 60 as a cleaned message stream ready for the receiving terminal 20.
In a second exemplary embodiment, the MPA 200 is arranged to function in co-operation with the receiving mail server 60. In a third exemplary embodiment, the MPA 200 is arranged to function in co-operation with the receiving terminal 20. Here, the MPA 200 is most conveniently provided as a hardware appliance which is arranged in use to perform the message processing operations discussed herein. These embodiments of the MPA 200 are most conveniently provided as a stand-alone appliance, such as a rack-mounted unit with cabling ports to connect the MPA inline with the stream of incoming and outgoing messages.
For completeness, FIG. 1 also shows a gateway 70 which acts as a transfer point between networks. That is, the gateway 70 is arranged to transfer messages between two different IP-based networks, or from the exemplary IP-based network 1 to another non-IP network 2—such as the GSM cellular network for SMS messages. Thus, the gateway 70 allows electronic messages to enter and leave the Internet email system 1 by bridging the system to another form or type of electronic messaging system.
FIG. 2 is a schematic diagram illustrating the exemplary message processing apparatus 200 in more detail, together with a client unit 100 and a server unit 300.
As shown in FIG. 2, the message processing apparatus 200 of the exemplary embodiment is arranged to make a SMTP connection 110 with a client unit 100 and receive an incoming e-mail message 101. In most cases, the client unit 100 is the originating mail server 30 or a message transfer agent 50 as discussed above. However, in other cases the client unit is the sending terminal 10, or some other part of the messaging system which is not shown in these exemplary drawings.
That is, the client unit 100 represents whichever upstream unit is sending the incoming message 101 to the message processing apparatus 200. In the terminology of SMTP email systems, the term “client” is understood to refer to any unit which is transmitting a message.
Similarly, the term “server” refers generally to any unit which is receiving a message. Hence, the server unit 300 represents whichever downstream unit now receives an outgoing message from the message processing apparatus 200. Typically, the server unit 300 will be the receiving mail server 60 or the receiving terminal 20 as discussed above. However, in other cases the server unit 300 will be another message transfer agent 50, or some other part of the messaging system which is not shown in these exemplary drawings.
The message processing apparatus 200 stores the incoming message 101 in a message queue 232, along with one or more other previously received messages 102, 103, 104 etc. A message analysis unit 240 is arranged to remove a topmost message from the message queue 232—in this case message 104—and then analyse the message with respect to one or more filtering functions which will be discussed in more detail below. Here, the message analysis unit 240 determines whether to allow or block onward transmission of the e-mail message. In particular, e-mail messages which are considered to be undesirable, such as viruses or junk e-mail are quarantined by the message analysis unit 240, whilst wanted e-mails are allowed to pass unhindered. In this case, the analysed message 104 is determined to be a wanted message and therefore the message processing apparatus 200 opens an outgoing SMTP connection 120 and delivers the outgoing message 104 to the server unit 300 such that the outgoing message 104 is forwarded towards the intended recipient terminal 20. The message analysis unit 240 now returns to extract the next topmost message from the message queue 232 and the above process is repeated, until eventually the incoming message 101 reaches the top of the queue 232 to be extracted, analysed and selectively forwarded to the server unit 300 toward the recipient terminal 20.
It will of course be appreciated that the messaging system discussed herein is arranged to deal with many hundreds of thousands or many millions of individual senders and recipients and thus the flow of e-mail messages occurs on a massive scale. The electronic messaging system has necessarily been simplified in this initial overview.
FIG. 3 is a more detailed schematic diagram of the message processing apparatus 200 according to the exemplary embodiments of the present invention.
As shown in FIG. 3, the message processing apparatus 200 comprises the message analysis unit 240 discussed above, and further includes a message receiving unit 210, a reputation score allocation unit 220, a message queuing unit 230, a message forwarding unit 250, and a quarantine storage unit 260.
The message receiving unit 210 is arranged to receive the incoming e-mail message 101 over the incoming message connection 110 with the client unit 100, which in the exemplary embodiments is a SMTP connection. Here, the SMTP connection 110 is a connection supported by TCP/IP (Transmission Control Protocol over Internet Protocol). According to the Internet Protocol, the client unit 100 has a client identity 105 which is unique to the client unit 100 within the relevant IP network. As a simple example, the email messaging system runs on a private local area IP network and the client identity is thus a locally-unique IP address according to IPv6 or IPv4, such as <192.168.114.1>. In most practical embodiments, the client identity 105 is a globally unique IP address.
The message receiving unit 210 is arranged to determine the client identity 105 of the client unit 100 with respect to the incoming SMTP connection 110. In the exemplary embodiments, the IP address of the client unit is transmitted in the IP packet header. Also, it is relatively difficult for the client unit 100 to provide a false or misleading IP address 105, because of the three-way (three-step) handshake performed with the client unit 100 upon opening the SMTP connection. Thus, the client identity 105 is a relatively trustworthy identifier for the client unit 100.
The reputation score allocation unit 220 determines a reputation score for the incoming message 101 according to the client identity 105—in this case the IP address of the client unit 100 such as <192.168.114.1>. In the exemplary embodiments, the reputation score is a numerical value on a predetermined scale, such as a value on the scale from 0 to 100. In the example of FIG. 3, the allocated score is “10” for this particular incoming message 101.
The reputation score allocation unit 220 appends a new data field 201 containing the allocated reputation score to the incoming message 101. This reputation score data field 201 is suitably appended to a header portion of the incoming message while the message is stored within the message processing apparatus 200. The reputation score data field is later removed or deleted from the message before the message is forwarded from the apparatus 200. Thus, the reputation score data field 201 is temporarily added to the message 101 in order to improve processing of the message within the message processing apparatus 200.
The message queuing unit 230 stores the incoming message 101 in the message queue according to the allocated reputation score 201. The message queue is numerically ordered according to the reputation score of each of a plurality of messages residing in the queue. In this example, the incoming message 101 with a score of “10” is placed above the previously received message 102 with a score of “5” and below the previously received messages 103 and 104 with scores of “20” and “50” respectively.
The message analysis unit 240 extracts the uppermost message from the queue 230, whereby the message 104 having the highest reputation score is extracted from the queue. The extracted message is then subject to a detailed analysis including performing one or more filtering functions—such as an anti-virus filtering function, an anti-spam filtering function and a lexical content filtering function, amongst others. As discussed above, these filtering functions require significant hardware resources in terms of processing power, memory, disc space and so on, and thus it is important to make best use of these hardware resources with respect to the stream of messages passing through the message processing apparatus 200.
In the exemplary embodiment, unwanted messages are diverted by the message analysis unit 240 into the quarantine storage unit 260. That is, the quarantine storage unit 260 is arranged to store unwanted messages as determined by the message analysis unit 240. The unwanted messages stored in the quarantine storage unit 260 are still available for separate treatment and analysis according to the requirements of the message processing apparatus 200. That is, the quarantine storage unit 260 may be used to later search and examine the stored unwanted messages and perhaps release any wanted messages which have been quarantined in error.
In other exemplary embodiments, the message analysis unit 240 may take other actions as a result of the various filtering functions employed. For example, the message analysis unit 240 is arranged to raise an alert notification message when an unwanted message is detected, but still allow the unwanted message to proceed through the system. As another example, the message analysis unit is arranged to mark unwanted messages (e.g. by appending the marker “**JUNK**” to a subject line of an email message), but to otherwise forward all messages. Many other specific implementations will be apparent to those skilled in the art, depending upon the purposes of the mail processing system and the environment in which it is deployed.
The message forwarding unit 250 is arranged to initiate the outgoing connection 120 and forward the wanted message 104 on from the message processing apparatus 200 to the next downstream server unit 300 and hence onward the recipient terminal 20.
FIG. 4 is a schematic diagram showing a further exemplary embodiment of the message processing apparatus.
As shown in FIG. 4, the reputation score allocation unit 220 comprises a reputation score database 225 which stores reputation scores according to a large number of already encountered client identities 105. Each of these client identities 105 has a corresponding reputation score 201 and, as noted above, the client identity 105 for a particular incoming message 101 allows a corresponding reputation score 201 to be derived appropriate to that incoming message. The reputation score database 225 is suitably embodied by any of the many commercially available fast access database technologies, such as a relational database management system. The reputation score database 225 is suitably provided locally within the message processing apparatus 200. However, alternate embodiments of the present invention allow the database 225 to be hosted remotely from the message processing apparatus 200, for example as a remote service available over the Internet.
In the exemplary embodiments, the reputation score database 225 stores of the order of 5 to 6 million known IP addresses with a corresponding reputation score for each of these client identities. It is envisaged that the reputation score database 225 will expand to hold 100 million or more IP addresses as more client units are encountered and analysed by the system and the system becomes more experienced. Thus, the reputation score allocation unit 220 is able to allocate a reputation score for almost all incoming messages. However, where the client identity is not available in the reputation score database 225, then the reputation score allocation unit 220 allocates a default reputation score. In the exemplary embodiments, the default score is weighted to allow the incoming message to pass through the message queue for analysis by the message analysis unit 240.
As also shown in FIG. 4, the message processing apparatus 200 further includes a reputation score updating unit 270. Here, the reputation score updating unit 270 is arranged to update the reputation scores 201 stored in the reputation score database 225, including adding new database entries and replacing or amending existing values. In particular, the reputation score updating unit 270 is arranged to communicate with the message analysis unit 240 to update the reputation score 201 associated with a particular client identity 105. Here, the reputation score updating unit 270 sets a high reputation score associated with those client identities which send a high proportion of wanted messages as determined by the filtering functions performed by the message analysis unit 240. Thus, a client identity 105 is determined to be a trusted and reliable source from experience in analysing the messages from that client. By contrast, a client identity 105 which is associated with a high proportion of unwanted messages as determined by the filtering functions performed by the message analysis unit 240 is associated with a low reputation score 201. Further, the reputation score updating unit 270 is arranged to update existing reputation scores according to new messages received from a particular client identity, so that the reputation score better reflects the experience of the message processing apparatus 200 in dealing with that particular client identity. The reputation score updating unit 270 is arranged to update the reputation score database 225 with the one or more newly determined reputation scores, which are then available for use by the reputation score allocation unit 220 with respect to subsequent incoming messages.
In further exemplary embodiments of the present invention, a plurality of the message processing apparatuses 200 are provided at various different locations within the electronic messaging system. These message processing apparatuses 200 are arranged to co-operate, whereby the stored reputation scores are updated by such co-operation between the message processing apparatuses. In FIG. 4, a communication line 275 represents the external updating of the reputation score database 225 in the message processing apparatus 200 with reference to an external source such as a reputation score updating unit 270 in another of the message processing apparatuses.
In the exemplary embodiments, the reputation score updating unit 270 sets an updated reputation score 201 according to the volume of traffic received from a particular client identity 105, the rate at which the traffic is received (e.g. messages per day or messages per hour) and a percentage of that message traffic which is considered to be unwanted messages. Here, the reputation score updating unit 270 determines an updated reputation score associated with a particular client identity 105 according to statistics derived from a history of previous messages from the particular client identity 105.
It is desirable that the exemplary reputation score updating unit 270 is exposed both to wanted messages from trusted sources and also to a large number of unwanted messages—so that reputation scores are created and updated with respect to a large body of non-trusted client identities. Here, the message queuing unit 230 restricts the number and type of messages which enter the message analysis unit 240 for detailed analysis so that, in busy periods such as during key daytime business hours, the message analysis unit 240 is devoted mostly to the processing of wanted messages passing through the message processing apparatus 200. By contrast, during quieter periods the message queuing unit 230 now allows messages having a lower reputation score through to the message analysis unit 240 and in consequence the reputation score updating unit 270 is now better able to update the reputation scores associated with client identities which send large quantities of unwanted messages. The inventor has noted that typical behaviour of the electronic messaging system is that many unwanted messages are sent out of key business hours—such as overnight. Thus, the message processing apparatus 200 effectively uses the quieter off-peak periods to perform sampling and analysis of the unwanted message traffic in order to provide more accurate and more effective reputation scores, but without detracting from the processing of wanted message traffic.
FIG. 5 is a schematic diagram further showing the exemplary message processing apparatus in more detail.
As shown in FIG. 5, the message receiving unit 210 is arranged to simultaneously hold open many incoming connections 110a-110z each associated with a corresponding incoming message. In the exemplary e-mail messaging system, each of these connections 110a-z is a separate SMTP connection over TCP/IP. Here, the message processing apparatus 200 will in practice hold open many hundreds or even many thousands of connections simultaneously.
As will be familiar to those skilled in the art, the SMTP protocol has four main stages in order to complete the transmission of an incoming email message from the client unit 100 (see FIG. 2) to the message processing apparatus 200:

    
    
        1. Session Initiation.
        2. Client Initiation (HELO or EHLO message).
        3. Mail Transaction (MAIL command followed by a sender identity, e.g. FROM: <userA@domianone.com>, followed by recipient identity, e.g. RCPT: userB@domiantwo.com, then followed by a DATA command and a payload of the message).
        4. Session Termination (e.g. a QUIT command from the client followed by a 221-type acknowledgement from the MPA 200 in reply).
    
    


Here, the message receiving unit 210 holds open each of the connections 110a-110z whereby the message processing apparatus 200 does not, at this stage, accept responsibility for the incoming messages. Only when the message receiving unit 210 acknowledges receipt of the complete message payload (e.g. by sending a 250-type control command) does the message processing apparatus 200 assume responsibility for onward transmission of that incoming message.
Conveniently, this configuration enables the message receiving unit 210 to hold open each connection while the reputation score allocation unit 220 allocates the reputation score 201 to the incoming message and the message queuing unit 230 holds the incoming message on the message queue. The connection is held open until the incoming message 101 is removed from the queue. As discussed above, messages having a higher reputation score quickly reach the top of the queue and are extracted by the message analysis unit. However, some messages are also removed from lower positions in the queue, as will now be discussed in more detail.
As shown in FIG. 5, the message processing apparatus 200 further comprises a TTL (Total Time to Live) timing unit 280 arranged to allocate and monitor a timing field 202 associated with each of the messages 101-104 in the message queue 230 with respect to a permitted total time to live. In this example, the maximum total time to live that a particular message is allowed to reside in the queue is 60 seconds. Conveniently, the SMTP protocol specifically allows for delays in processing of messages sent over a SMTP connection 110 and thus the one-minute total time to live applied by the TTL timing unit 280 remains within the restrictions of the SMTP protocol. The timing field 202 is conveniently a time stamp (TS) allocated to each of the incoming messages. In this illustrated example of FIG. 5, the four messages 101-104 on the message queue 232 have arrived at different times. Comparing this time stamp field 202 with a current time allows the timing unit 280 to determine those messages in the queue where the permitted total time to live has expired. In which case, the TTL timing unit 280 signals the message receiving unit 210 to terminate the respective connection 110 for that message so that the message transaction is not successfully completed. Here, the message receiving unit 210 sends a failure command to the relevant client, such as a 421 type command indicating that the transmission channel is being closed. Also, the TTL timing unit 280 removes the timed-out message from the queue 232 and that message is discarded.
FIG. 6 is a schematic diagram showing further details of the exemplary message processing apparatus.
As shown in FIG. 6, the exemplary message processing apparatus 200 further comprises a queue size unit 290 arranged to control a size of the message queue held by the message queuing unit 230. In particular, the queue size unit 290 imposes a maximum size on the message queue 230. Suitably, the maximum queue size is determined with respect to the number of messages within the queue and/or the total quantity of data held within the queue. Here, the queue size unit 290 does not permit new messages to be added to the queue when the predetermined maximum size has already been reached. In this case, the incoming message is rejected with an error command (such as a 452-type command indicating “insufficient storage”) and the incoming connection is closed.
In the exemplary embodiments, the queue size unit 290 is arranged to remove one or more messages from the message queue 232 having a relatively low allocated reputation score in order to make room on the queue 232 to add a new incoming message having a higher reputation score. The queue size unit 290 signals the message receiving unit 210 to close the incoming connection 110 for the removed messages, and then those messages are discarded. Thus, the queue size unit 290 selectively removes messages having a low reputation score in favour of new messages having a higher reputation score, whilst maintaining the predetermined maximum size of the message queue. Thus, in the busiest periods, the higher reputation scored messages are given priority over messages having a lower reputation score.
The exemplary embodiments have many advantages as have been discussed herein. In particular, the exemplary embodiments enable hardware resources within the message processing apparatus to be concentrated on messages having a higher reputation score and which are most likely to come from client identities that transmit wanted messages. However, the message queuing system still allows detailed in depth analysis of messages from senders having a lower reputation score and provide effective load balancing over typical operational cycles of the system.
Although a few preferred embodiments have been shown and described, it will be appreciated by those skilled in the art that various changes and modifications might be made without departing from the scope of the invention, as defined in the appended claims.
Attention is directed to all papers and documents which are filed concurrently with or previous to this specification in connection with this application and which are open to public inspection with this specification, and the contents of all such papers and documents are incorporated herein by reference.
All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and/or all of the steps of any method or process so disclosed, may be combined in any combination, except combinations where at least some of such features and/or steps are mutually exclusive.
Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. Thus, unless expressly stated otherwise, each feature disclosed is one example only of a generic series of equivalent or similar features.
The invention is not restricted to the details of the foregoing embodiment(s). The invention extends to any novel one, or any novel combination, of the features disclosed in this specification (including any accompanying claims, abstract and drawings), or to any novel one, or any novel combination, of the steps of any method or process so disclosed.

## Claims

1. A message processing apparatus for processing messages on a communication path between a client unit and a server unit, the message processing apparatus comprising:
a processor; and
a non-transitory computer readable medium, operatively coupled to the processor, and configured to store:
a message receiving unit arranged to receive an incoming message from a client unit and to determine a client identity with respect to the client unit,
a reputation score allocation unit arranged to allocate a reputation score to the incoming message with respect to the determined client identity,
a message queuing unit arranged to store the incoming message with a plurality of messages in a message queue ordered according to the reputation score allocated to the incoming message,
a message analysis unit arranged to extract a message with the highest reputation score in the message queue from the message queue, and to analyze the extracted message, and
a message forwarding unit arranged to forward the extracted message along the communication path to a server unit,
wherein messages from a trusted client unit are allocated a high reputation score and take priority for analysis through the message queue, and messages from a non-trusted client unit are allocated a lower reputation score and remain in the message queue until all messages with a higher reputation score have been extracted.

2. The message processing apparatus of claim 1, further comprising a reputation score database arranged to store a plurality of reputation scores each associated one of a plurality of client identities; and
wherein the reputation score allocation unit is arranged to allocate the reputation score to the incoming message according to the reputation score stored in the reputation score database with respect to the determined client identity.

3. The message processing apparatus of claim 2, further comprising a reputation score updating unit arranged to update one or more of the plurality of reputation scores stored in the reputation score database.

4. The message processing apparatus of claim 3, wherein the reputation score updating unit is arranged to communicate with the message analysis unit to update the reputation score associated with a particular client identity.

5. The message processing apparatus of claim 4, wherein the reputation score updating unit is arranged to determine an updated reputation score associated with a particular client identity according to statistics derived from a history of previous messages from the particular client identity.

6. The message processing apparatus of claim 5, wherein the reputation score updating unit is arranged to determine the updated reputation score for a particular client identity according to a proportion of wanted messages as determined by one or more filtering functions performed by the message analysis unit with respect to a total number of messages from the particular client identity.

7. The message processing apparatus of claim 5, wherein the reputation score updating unit is arranged to determine the updated reputation score according to a volume of traffic received from a particular client identity a rate at which the traffic is received and a percentage of the traffic which is determined to be unwanted messages.

8. The message processing apparatus of claim 3, further comprising a communication line coupled to the reputation score database to update the stored reputation scores with reference to an external source.

9. The message processing apparatus of claim 8, wherein the external source is a reputation score updating unit in another of the message processing apparatuses.

10. The message processing apparatus of claim 1, wherein the reputation score is a numerical value on a predetermined numerical scale.

11. The message processing apparatus of claim 1, wherein the message receiving unit is arranged to hold open each of the plurality of incoming connections while the reputation score allocation unit allocates the reputation score to each of the incoming messages and the message queuing unit holds the incoming messages on the message queue.

12. The message processing apparatus of claim 1, wherein the message receiving unit is arranged to determine the client identity with respect to an IP address of the client unit.

13. The message processing apparatus of claim 1, further comprising a timing unit arranged to allocate and monitor a timing field associated with the incoming message with respect to a permitted total time to live wherein the timing unit is arranged to determine the incoming message as a timed-out message when the timing field indicates that the permitted total time to live has expired.

14. The message processing apparatus of claim 13, wherein the timing unit is arranged to remove the timed-out message from the message queue when the timing field indicates that the permitted total time to live has expired.

15. The message processing apparatus of claim 13, wherein the message receiving unit is arranged terminate a connection to the client unit for the incoming message so that a message transaction is not successfully completed, in response to a signal from the timing unit indicating that the incoming message is a timed-out message.

16. The message processing apparatus of claim 1, further comprising a queue size unit arranged to control a size of the message queue held by the message queuing unit wherein the queue size unit is arranged to selectively remove one or more incoming messages from the message queue having a low reputation score in favor of a new incoming message having a higher allocated reputation score, while maintaining a predetermined maximum size of the message queue.

17. The message processing apparatus of claim 16, wherein the message receiving unit is arranged terminate a connection to the client unit for the one or more incoming messages so that a message transaction is not successfully completed, in response to a signal from the queue size unit indicating that one or more incoming messages have been removed from the message queue.

18. The message processing apparatus of claim 1, wherein the message analysis unit is arranged to analyze the extracted message with respect to one or more message filtering functions wherein the message analysis unit is arranged to determine the extracted message as either a wanted message or an unwanted message according to the one or more message filtering functions.

19. The message processing apparatus of claim 18, wherein the message forwarding unit is arranged to selectively forward the wanted message according to the analysis of the message analysis unit.

20. The message processing apparatus of claim 18, further comprising a quarantine store arranged to selectively quarantine the unwanted message according to the analysis of the message analysis unit.

21. The message processing apparatus of claim 1, wherein the message processing apparatus is arranged to store and forward the messages between the client unit and the server unit.

22. The message processing apparatus of claim 1, wherein the message processing apparatus is arranged to be coupled in use as a message transfer agent between the client unit and the server unit.

23. The message processing apparatus of claim 1, wherein the message processing apparatus is a stand-alone appliance arranged to be coupled in use to a receiving server which stores the incoming message for retrieval by a receiving terminal.

24. The message processing apparatus of claim 1, wherein the message processing apparatus is a stand-alone appliance arranged to be coupled in use to a receiving terminal as an ultimate destination of the incoming message.

25. The message processing apparatus of claim 1, wherein the message processing apparatus is arranged to process the incoming message in the form of an Internet email sent over SMTP.

26. A message processing apparatus for processing messages from a plurality of client units, comprising:
a processor; and
a non transitory computer readable medium, operatively coupled to the processor, and configured to store:
a message receiving unit arranged to receive a plurality of incoming messages each from a respective client unit and to determine a client identity with respect to each of the client units,
a reputation score allocation unit arranged to allocate a reputation score to each of the plurality of incoming messages according to the respective client identity,
a message queuing unit arranged to store the plurality of incoming messages in an ordered message queue, wherein the messages in the message queue are ordered according to the reputation score allocated to each of the incoming messages, and
a message analysis unit arranged to extract a message from the ordered message queue with a higher reputation score before extracting a message with a lower reputation score, and to analyze each of the extracted messages,
wherein messages from a trusted client unit are allocated a high reputation score and take priority for analysis through the message queue, and messages from a non-trusted client unit are allocated a lower reputation score and remain in the message queue until all messages with a higher reputation score have been extracted.

27. The message processing apparatus of claim 26, further comprising: a message forwarding unit arranged to selectively forward one or more of the extracted messages toward a respective receiving terminal, according to the analysis of the message analysis unit.

28. The message processing apparatus of claim 26, further comprising: a quarantine unit arranged to selectively quarantine one or more of the extracted messages, according to the analysis of the message analysis unit.

29. An electronic messaging system, comprising:
a processor; and
a non transitory computer readable medium, operatively coupled to the processor, and configured to store:
a plurality of client units arranged to send electronic messages wherein each of the client units is associated with a predetermined client identity in the system;
a plurality of server units arranged to receive the electronic messages sent by the plurality of client units;
at least one message processing apparatus arranged to intercept the electronic messages with store-and-forward type interception between the plurality of client units and at least one of the plurality of server units, wherein the message processing apparatus comprises:
a message receiving unit arranged to receive one of the electronic messages from a particular client unit amongst the plurality of client units and to determine the client identity with respect to the particular client unit;
a reputation score allocation unit arranged to allocate a reputation score to the electronic message with respect to the client identity;
a message queuing unit arranged to store the electronic message in a message queue containing a plurality of the electronic messages and ordered according to the reputation score allocated to each of the electronic messages;
a message analysis unit arranged to extract an electronic message with the highest reputation score in the message queue from the message queue and to analyze the extracted electronic message with respect to one or more message filtering functions; and
a message forwarding unit arranged to forward the extracted electronic message to the at least one of the plurality of server units,
wherein messages from a trusted client unit are allocated a high reputation score and take priority for analysis through the message queue, and messages from a non-trusted client unit are allocated a lower reputation score and remain in the message queue until all messages with a higher reputation score have been extracted.

30. The electronic messaging system of claim 29, wherein the plurality of client units include a plurality of sending terminals arranged to originate the electronic messages and a plurality of outgoing message servers arranged to send the electronic messages originating from the plurality of sending terminals.

31. The electronic messaging system of claim 29, wherein the plurality of server units include a plurality of receiving message servers arranged to receive one or more of the electronic messages according to a recipient identity provided for each electronic message, and a plurality of recipient terminals arranged to accept one or more of the electronic messages from one of the receiving message servers according to the recipient identity of each electronic message.

32. A method of processing electronic messages between a client unit and a server unit in an electronic messaging system, comprising:
receiving an electronic message from a client unit;
determining a client identity with respect to the client unit;
allocating a reputation score to the electronic message with respect to the determined client identity;
storing the electronic message in a message queue ordered according to the reputation score allocated to the electronic message;
extracting an electronic message with the highest reputation score in the message queue from the message queue;
analyzing the extracted electronic message with respect to one or more message filtering functions;
selectively forwarding the extracted electronic message to the server unit according to a result of the one or more filtering functions; and
allocating a high reputation score to a message from a trusted client unit, and allocating a lower reputation score to a message from a non-trusted client unit;
wherein all messages in the message queue with a higher reputation score are extracted from the message queue before messages with a lower reputation score are extracted from the message queue.

33. A non-transitory computer-readable storage medium having recorded thereon instructions executable by a computer to perform:
receiving an electronic message from a client unit; determining a client identity with respect to the client unit;
allocating a reputation score to the electronic message with respect to the determined client identity;
storing the electronic message in a message queue ordered according to the reputation score allocated to the electronic message;
extracting an electronic message with the highest reputation score in the message queue from the message queue;
analyzing the extracted electronic message with respect to one or more message filtering functions;
selectively forwarding the extracted electronic message according to a result of the one or more filtering functions; and
allocate a high reputation score to a message from a trusted client unit, and allocate a lower reputation score to a message from a non-trusted client unit; wherein all messages in the message queue with a higher reputation score are extracted from the message queue before messages with a lower reputation score are extracted from the message queue.

34. A system for processing electronic messages between a client unit and a server unit in an electronic messaging system, comprising:
a memory configured to store an ordered message queue;
at least one processor configured to:
receive an electronic message from a client unit; determine a client identity with respect to the client unit;
allocate a reputation score to the electronic message with respect to the determined client identity;
store the electronic message in the ordered message queue with a plurality of electronic messages, the messages ordered according to the reputation score allocated to the electronic messages;
extract an electronic message with the highest reputation score in the message queue from the message queue;
analyze the extracted electronic message with respect to one or more message filtering functions; and
selectively forward the extracted electronic message to the server unit according to a result of the one or more filtering functions, wherein messages from a trusted client unit are allocated a high reputation score and take priority for analysis through the message queue, and messages from a non-trusted client unit are allocated a lower reputation score and remain in the message queue until all messages with a higher reputation score have been extracted.