RFC 4161

Guidelines for Optional Services for Internet Fax Gateways

πŸ“… published September 2005, from ietf

RFC 4161: Guidelines for Optional Services for Internet Fax Gateways πŸŽ€

Network Working Group Β· Request for Comments: 4161 Β· Category: Informational Β· August 2005

Written by K. Mimura, K. Yokoyama, T. Satoh, K. Watanabe, and C. Kanaide from TOYO Communication Equipment πŸ¦‹

Status of This Memo ✨

This memo is here to share info with the Internet community πŸ“š It does not specify an internet standard of any kind. Distribution of this memo is unlimited πŸ’–

Copyright (C) The Internet Society (2005).

Abstract 🌸

Okay so, to get the old-school phone network's fax service (GSTN fax) talking to email-based Internet Fax (i-fax), you need an "Internet Fax Gateway". This doc gives guidelines for the optional stuff a gateway can do 🫢 An "offramp gateway" sends fax data from i-fax out to GSTN fax, and the reverse is an "onramp gateway", which sends GSTN fax data into i-fax. The recs here cover the whole setup: Internet Fax terminals, computers running i-fax software on the Internet, and GSTN fax machines on the GSTN 🧚

This doc adds to the recs for the minimal features of an Internet Fax Gateway. It's all about dropping duplicated fax messages, automatic fax re-transmission, error and return notice handling, log handling, and possible DTMF (Dual Tone Multi-Frequency) authorization methods for onramp gateways πŸ”₯

1. Introduction πŸ“

An Internet Fax Gateway can be either an offramp gateway or an onramp gateway πŸ‘‘ This doc gives guidelines for optional services and examples of how Internet Fax Gateway operations work. It covers dropping duplicated fax messages, automatic fax re-transmission, error, return notice, and log handling, plus possible DTMF (Dual Tone Multi-Frequency) authorization methods for onramp gateways πŸ’œ

A more detailed definition of onramps and offramps is in [1]. The recommended behaviors for Internet Fax Gateway functions are defined in [15] 🌈

This doc only gives recommendations for these specific cases:

  1. The operational mode of the Internet Fax is "store and forward", as defined in Section 2.5 of [1].
  2. The format of image data is the data format defined by "simple mode" in [16].

This doc does NOT apply to gateway functions for "real-time Internet Fax", as described and defined in [18] πŸ™ˆ

1.1. Key Words πŸ”‘

The key words "MUST", "SHOULD", "SHOULD NOT", and "MAY" in this document are to be interpreted as described in [17] ✨

2. Optional Services for an Offramp Gateway πŸš€

2.1. Drop Duplicated GSTN Fax Transmission πŸ’…

Okay, so electronic mail transport agents (MTA) deliver an Internet Fax message either into the recipient's mailbox or into an offramp gateway mailbox. That means the message gets pulled out for further action, and for an offramp gateway, that action is delivering it to the GSTN fax service πŸ“ 

The offramp gateway mailbox ends up getting every message the gateway will process, no matter what their final, separate GSTN destinations are. So addresses like these:

Fax=+12224567654@example.com
Fax=+38155234578@example.com
Fax=+3904567437777@example.com

will all land in the offramp gateway mailbox for the "example.com" domain πŸ“¬

BUT (and this is the tea πŸ«–) how email messages with more than one recipient get handled can vary, even when they're all going to the same final MTA. It depends on the MTA configuration or features. A single message with multiple recipients in the SMTP envelope [19] is probably the most common case on mail transport systems, but it's also possible that multiple copies of the same message get sent, one per recipient. Or the final MTA might be set up to deliver a separate copy of the message to each recipient's mailbox, assuming it's delivering to real mailboxes for different endusers πŸ₯Ή

So the offramp gateway might receive multiple copies of the same Internet Fax message that are meant for different GSTN destinations. Those destinations are listed together, over and over, in the e-mail message headers [20] of the Internet Fax 😭 In those cases, the offramp gateway SHOULD implement techniques to avoid duplicate or multiple transmission over GSTN of the same fax message to the same recipient πŸ”₯

Here are some possible (but not exclusive) examples of these techniques 🧚

2.1.1. SMTP Envelope Addresses Check πŸ’Œ

Using the SMTP [19] envelope destination address from the "RCPT TO" field is usually the best technique for making sure a received message gets delivered to that address and for avoiding duplicate deliveries 🎯

If the offramp gateway still has the "RCPT TO" information available during processing, then it MUST use it to figure out the recipients over GSTN fax service πŸ’–

2.1.2 Message-ID Check πŸͺͺ

If the SMTP "RCPT TO" information isn't available (for example, when the offramp gateway pulls messages from its mailbox using either POP [21] or IMAP [22]), the message header "Message-ID" (see [20]) MAY be used to check whether a message has already been processed. That way it can avoid retransmission to all its GSTN recipients handled by the offramp gateway πŸ¦‹

2.2. Error Handling πŸ™ˆ

2.2.1. Recoverable Errors 🌷

Recoverable errors during GSTN transmission are the ones where there's a good chance the error won't happen on the next attempt. This category includes things like "busy signal" and "no line/carrier signal" πŸ“ž

For all of these errors, the offramp gateway SHOULD re-queue the message and try retransmitting later on, as specified in Section 2.3 ⏰

2.2.2. Non-Recoverable Errors πŸ’€

If the error during GSTN transmission is likely non-recoverable, the offramp gateway SHOULD NOT attempt retransmission. Instead, an error Message Delivery Notification (MDN) with appropriate error codes MUST be generated for the Internet Fax message sender πŸ“© Examples of non-recoverable errors include paper-related errors at a remote device (like a jam or an empty tray), no response from a remote destination, voice response errors, data modem response errors, and stop event errors 😱

2.3. Automatic Re-Transmission Handling πŸ”

An offramp gateway SHOULD implement a function that automatically tries to send facsimile data again if a recoverable delivery failure happens 🫢 If this function is implemented, then:

  • the retry times and retry interval MAY be specified as options by the administrator of the offramp gateway;
  • any error return notice SHOULD be sent only after the maximum number of retries has been completed without success;
  • if transmission is suspended due to an error, then the next transmission attempt SHOULD avoid retransmitting the pages already delivered successfully, if any πŸ“„

2.4. Multiple Return Notice Handling πŸ“¬

An offramp gateway can receive an Internet Fax meant for multiple GSTN recipients. If errors happen that the Internet Fax sender needs to know about, or if the sender asked for delivery notifications, then the offramp gateway has a few ways to handle these multiple return notices 🧩

  1. An offramp gateway sends a return notice as soon as an error or a successful delivery happens, per single GSTN recipient.
  2. An offramp gateway gathers all the info about the message, but only sends a return notice after all, or a number of, GSTN recipients have been handled (successfully or not).

If Case 2 is implemented, the offramp gateway MAY also choose to send separate success and failure notices, or to limit how many GSTN recipients get handled per single return note (for example, no more than 10 recipients per return note) ✨

2.5. Handling Transmission Errors for a Return Notice πŸ› οΈ

When an offramp gateway fails to transmit a return notice, the Internet Fax Gateway SHOULD process the notice in one of the following ways πŸ’…

  1. The return notices SHOULD be re-queued, and delivery retried later. The number of retry attempts and the time interval between them MAY be a feature configured by the offramp gateway administrator. This is the preferred method to implement, but if all the retransmission attempts fail, processing SHOULD continue as in Case 2 🌟
  2. If the gateway doesn't have enough capabilities to handle notice re-queuing, but it does have a log information preservation function, the error information SHOULD be recorded to a log, and processing SHOULD end. At this point, the administrator of the gateway system SHOULD be notified of these errors using a specific method (for example, by an e-mail message) πŸ“§
  3. If the gateway doesn't even have a log information preservation function, the administrator SHOULD be notified about the failure (for example, via an e-mail message), and processing SHOULD end πŸ₯€

2.6. Offramp Gateway Log πŸ“’

An offramp gateway SHOULD have a function that keeps information listed as a log. That log can be specific to the fax gateway or be in a log file stored locally on the gateway or remotely. If the fax gateway or the remote system has recording media, the log information SHOULD be saved as a log file. As a last resort, if no recording media are available, the log MAY be printed πŸ–¨οΈ

The information listed in the log MAY be the following:

  • Date and time when the Internet Fax is received
  • Sender address
  • Recipient address(es)
  • Start date and time of transmission over GSTN
  • End date and time of transmission over GSTN
  • Number of actually transmitted pages
  • Number of actually transmitted bytes
  • Fax resolution used
  • Error codes/text that occurred during transmission
  • Number of transmission attempts (retries)
  • Date and time of transmission of the (eventual) delivery notice

3. Optional Services for an Onramp Gateway 🌈

3.1. Examples of User Authorization πŸ”

An onramp gateway MAY have a user authorization function to confirm that the user is allowed to send a fax into the Internet fax service πŸ’– For example, user authorization may be done by getting a user ID and password entered via DTMF, or through a local authorization table based on the GSTN caller-ID. The following subsections give some possible examples, but other methods are also possible 🧚

3.1.1. Authorization via GSTN Caller-ID πŸ“±

The simplest method for authenticating and authorizing a GSTN fax service user is to use the GSTN caller-ID. When it's available, the caller-ID is generated by the GSTN network service itself, and it's quite difficult to produce fake caller-IDs πŸ•΅οΈ In other words, the security of this authentication method relies on confidence that the GSTN caller-ID service is secure by itself. That's the part to take seriously 🚨

The GSTN sender MAY be authorized through a lookup into a table managed by the onramp gateway administrator, using complete or partial (wildcard) matches πŸ’

3.1.2. Authorization via GSTN Fax "Station ID" πŸ“ βœ¨

Okay so, during the very first GSTN fax service negotiation, the sender fax can send all kinds of info to the onramp gateway, including this alphanumeric string called the "station ID" 🧚. This string MAY be used to transmit authentication and authorization info for the onramp gateway to look up later. So yes, a user ID and maybe even a password MAY be sent inside it πŸ”‘.

BUT, ngl, if this is the only authentication you use, it's way less secure than caller-ID 😬. The user of the calling GSTN station gets to pick whatever string they want to send, and the string travels in clear form over the GSTN πŸ’€. Given that warning, this method is super flexible though πŸ’…. It's not tied to one GSTN fax terminal, so authorization can be obtained from anywhere, as long as the sender can configure the "station ID" on whatever device they're using 🌍.

A combination of caller-ID and station ID checks MAY, on the other hand, result in a greatly improved level of security πŸ”₯πŸ‘‘.

3.1.3. Authorization via DTMF 🎹

An onramp gateway MAY implement the Authorization function by requesting that a user ID and password are sent over GSTN via DTMF πŸ”’. For example, this function MAY be accomplished by requesting that the DTMF info is sent right after the GSTN connection is established, before the GSTN fax negotiation even starts πŸ¦‹. But other methods are also possible, bestie πŸ’œ.

3.2. Onramp Gateway Log πŸ“’

An onramp gateway SHOULD have a function that keeps information listed as a log, either specific to the fax gateway or in a log file that exists locally on the gateway or remotely πŸ“. If the fax gateway or the remote system are equipped with recording media, the log information SHOULD be saved as a log file πŸ’Ύ. As a last resort, if no recording media are available, the log MAY be printed πŸ–¨οΈ.

The information listed in the log MAY be the following:

  • Start date and time of transmission from GSTN
  • End date and time of transmission from GSTN
  • Number of actually received pages
  • Number of actually received bytes
  • Fax resolution used
  • Sender address (if available)
  • Recipient address(es)
  • Date and time when the Internet Fax is sent
  • Error codes/text that occurred during Internet Fax transmission
  • Number of transmission attempts (retries)
  • Date and time of transmission of the (eventual) delivery notice

4. Security Considerations πŸ”

Refer to Section 3.1 ("User Authorization") for authentication for an onramp gateway. In particular, sending user IDs and passwords in clear, as described in Section 3.1.2, can pose high security risks, and thus is NOT RECOMMENDED 🚨.

Seriously, this one is a big deal. Sending user IDs and passwords in clear is a major no-no πŸ™ˆ.

S/MIME [2][11][12][13][14] and OpenPGP [3][10] can also be used to encrypt an Internet Fax message. A signed or encrypted message is protected while transported along the network; however, when a message reaches an Internet Fax Gateway, either onramp or offramp, this kind of protection cannot be applied anymore. In this situation, security must rely on trusted operations of the gateway itself. A gateway might have its own certificate/key to improve security operations when sending Internet Faxes, but, as with any gateway, it breaks the end-to-end security pattern of both S/MIME and OpenPGP πŸ’”.

Other security mechanisms, like IPsec [4][5][6][7][8] or TLS [9] also do not ensure a secure gateway operation πŸ”’.

Denial-of-service attacks are beyond the scope of this document. Host compromise caused by flaws in the implementation is beyond the scope of this document πŸ™…β€β™€οΈ.

5. Acknowledgments 🫢

Thanks to Claudio Allocchio (Consortium GARR, Italy) for his final review of this document, and for contributing the authorization and security sections of this document 🌸.

6. References πŸ“š

6.1. Informative References

[1]  Masinter, L., "Terminology and Goals for Internet Fax", RFC
     2542, March 1999.

[2]  Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3852,
     July 2004.

[3]  Callas, J., Donnerhacke, L., Finney, H., and R. Thayer, "OpenPGP
     Message Format", RFC 2440, November 1998.

[4]  Kent, S. and R. Atkinson, "Security Architecture for the
     Internet Protocol", RFC 2401, November 1998.

[5]  Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402,
     November 1998.

[6]  Ramakrishnan, K., Floyd, S., and D. Black, "The Addition of
     Explicit Congestion Notification (ECN) to IP", RFC 3168,
     September 2001.

[7]  Piper, D., "The Internet IP Security Domain of Interpretation
     for ISAKMP", RFC 2407, November 1998.

[8]  Thayer, R., Doraswamy, N., and R. Glenn, "IP Security Document
     Roadmap", RFC 2411, November 1998.

[9]  Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., and
     T. Wright, "Transport Layer Security (TLS) Extensions", RFC
     3546, June 2003.

[10] Elkins, M., Del Torto, D., Levien, R., and T. Roessler, "MIME
     Security with OpenPGP", RFC 3156, August 2001.

[11] Rescorla, E., "Diffie-Hellman Key Agreement Method", RFC 2631,
     June 1999.

[12] Ramsdell, B., "Secure/Multipurpose Internet Mail Extensions
     (S/MIME) Version 3.1 Certificate Handling", RFC 3850, July 2004.

[13] Ramsdell, B., "Secure/Multipurpose Internet Mail Extensions
     (S/MIME) Version 3.1 Message Specification", RFC 3851, July
     2004.

[14] Hoffman, P., "Enhanced Security Services for S/MIME", RFC 2634,
     June 1999.

6.2. Normative References

[15] Mimura, K., Yokoyama, K., Satoh, T., Kanaide, C., and C.
     Allocchio, "Internet Fax Gateway Requirements", RFC 4160, August
     2005.

[16] Toyoda, K., Ohno, H., Murai, J., and D. Wing, "A Simple Mode of
     Facsimile Using Internet Mail", RFC 3965, December 2004.

[17] Bradner, S., "Key words for use in RFCs to Indicate Requirement
     Levels", BCP 14, RFC 2119, March 1997.

[18] "Procedures for real-time Group 3 facsimile communication over
     IP networks", ITU-T Recommendation T.38, June 1998.

[19] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, April
     2001.

[20] Resnick, P., "Internet Message Format", RFC 2822, April 2001.

[21] Myers, J. and M. Rose, "Post Office Protocol - Version 3", STD
     53, RFC 1939, May 1996.

[22] Crispin, M., "Internet Message Access Protocol - Version 4rev1",
     RFC 3501, March 2003.

Authors' Addresses ✍️

Katsuhiko Mimura
TOYO Communication Equipment CO., LTD.
2-1-1 Koyato, Samukawa-machi, Koza-gun
Kanagawa-pref., Japan

Fax: +81 467 74 5743
EMail: mimu@miyabi-labo.net


Keiichi Yokoyama
TOYO Communication Equipment CO., LTD.
2-1-1 Koyato, Samukawa-machi, Koza-gun
Kanagawa-pref., Japan

Fax: +81 467 74 5743
EMail: keiyoko@msn.com


Takahisa Satoh
TOYO Communication Equipment CO., LTD.
2-1-1 Koyato, Samukawa-machi, Koza-gun
Kanagawa-pref., Japan

Fax: +81 467 74 5743
EMail: zsatou@t-ns.co.jp


Ken Watanabe
TOYO Communication Equipment CO., LTD.
2-1-1 Koyato, Samukawa-machi, Koza-gun
Kanagawa-pref., Japan

Fax: +81 467 74 5743
EMail: knabe@ad.cyberhome.ne.jp


Chie Kanaide
TOYO Communication Equipment CO., LTD.
2-1-1 Koyato, Samukawa-machi, Koza-gun
Kanagawa-pref., Japan

Fax: +81 467 74 5743
EMail: icemilk77@yahoo.co.jp

Copyright (C) The Internet Society (2005).

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property 🧾

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

Acknowledgement πŸ’–

Funding for the RFC Editor function is currently provided by the Internet Society. The end, bestie 🌈✨

πŸ“¦ where this page comes from