RFC 2426

vCard MIME Directory Profile

๐Ÿ“… published September 1998, from ietf

RFC 2426: vCard MIME Directory Profile โœจ

okay bestie, this one is the vCard MIME Directory Profile ๐Ÿ’Œ It's RFC 2426, a Standards Track document from September 1998, so it's an actual Internet standard and not just a vibe. It was written by F. Dawson (Lotus Development Corporation) and T. Howes (Netscape Communications). The title block doesn't list anything it obsoletes or updates, so it's standing on its own ๐Ÿฆ‹


Status of this Memo

Okay so this section is the official "here's what this is" part ๐Ÿ“œ It's an Internet standards track protocol for the Internet community, and it asks for discussion and suggestions for improvements. If you want to know where it sits in the standardization process, check the current edition of "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited ๐ŸŒธ

Copyright (C) The Internet Society (1998). All Rights Reserved. ๐Ÿ”’

Abstract

So basically this memo defines a profile of the MIME Content-Type [MIME-DIR] for directory info about a white-pages person object, built on a vCard electronic business card ๐Ÿ’ผ The profile isn't tied to any one directory service or protocol, which is very iconic of it tbh. It's meant for representing and swapping all sorts of info about a person: formatted and structured names, delivery addresses, email, multiple phone numbers, a photo, a logo, audio clips, and more โœจ The directory info is based on the person object attributes from the X.520 and X.521 directory services recommendations. The profile also gives a way to include a [VCARD] representation of a white-pages directory entry inside the MIME Content-Type that [MIME-DIR] defines ๐ŸŽ€

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119]. ๐Ÿ’…

Table of Contents

Overview.........................................................3
1. THE VCARD MIME DIRECTORY PROFILE REGISTRATION.................4
2. MIME DIRECTORY FEATURES.......................................5
 2.1 PREDEFINED TYPE USAGE ......................................5
  2.1.1 BEGIN and END Type ......................................5
  2.1.2 NAME Type ...............................................5
  2.1.3 PROFILE Type ............................................5
  2.1.4 SOURCE Type .............................................5
 2.2 PREDEFINED TYPE PARAMETER USAGE ............................6
 2.3 PREDEFINED VALUE TYPE USAGE ................................6
 2.4 EXTENSIONS TO THE PREDEFINED VALUE TYPES ...................6
  2.4.1 BINARY ..................................................6
  2.4.2 VCARD ...................................................6
  2.4.3 PHONE-NUMBER ............................................7
  2.4.4 UTC-OFFSET ..............................................7
 2.5 STRUCTURED TYPE VALUES .....................................7
 2.6 LINE DELIMITING AND FOLDING ................................8
3. VCARD PROFILE FEATURES........................................8
 3.1 IDENTIFICATION TYPES .......................................8
  3.1.1 FN Type Definition ......................................8
  3.1.2 N Type Definition .......................................9
  3.1.3 NICKNAME Type Definition ................................9
  3.1.4 PHOTO Type Definition ..................................10
  3.1.5 BDAY Type Definition ...................................11
 3.2 DELIVERY ADDRESSING TYPES .................................11
  3.2.1 ADR Type Definition ....................................11
  3.2.2 LABEL Type Definition ..................................13
 3.3 TELECOMMUNICATIONS ADDRESSING TYPES .......................13
  3.3.1 TEL Type Definition ....................................14
  3.3.2 EMAIL Type Definition ..................................15
  3.3.3 MAILER Type Definition .................................15
 3.4 GEOGRAPHICAL TYPES ........................................16
  3.4.1 TZ Type Definition .....................................16
  3.4.2 GEO Type Definition ....................................16
 3.5 ORGANIZATIONAL TYPES ......................................17
  3.5.1 TITLE Type Definition ..................................17
  3.5.2 ROLE Type Definition ...................................18
  3.5.3 LOGO Type Definition ...................................18
  3.5.4 AGENT Type Definition ..................................19
  3.5.5 ORG Type Definition ....................................20
 3.6 EXPLANATORY TYPES .........................................20
  3.6.1 CATEGORIES Type Definition .............................20
  3.6.2 NOTE Type Definition ...................................21
  3.6.3 PRODID Type Definition .................................21
  3.6.4 REV Type Definition ....................................22
  3.6.5 SORT-STRING Type Definition ............................22
  3.6.6 SOUND Type Definition ..................................23
  3.6.7 UID Type Definition ....................................24
  3.6.8 URL Type Definition ....................................25
  3.6.9 VERSION Type Definition ................................25
 3.7 SECURITY TYPES ............................................25
  3.7.1 CLASS Type Definition ..................................26
  3.7.2 KEY Type Definition ....................................26
 3.8 EXTENDED TYPES ............................................27
4. FORMAL GRAMMAR...............................................27
5. DIFFERENCES FROM VCARD V2.1..................................37
6. ACKNOWLEDGEMENTS.............................................39
7. AUTHORS' ADDRESSES...........................................39
8. SECURITY CONSIDERATIONS......................................39
9. REFERENCES...................................................40
10. FULL COPYRIGHT STATEMENT....................................42

Overview

Okay so [MIME-DIR] is the doc that defines a MIME Content-Type for holding all kinds of directory info ๐Ÿ“‡ That info can be based on lots of different directory schemas. This document is a [MIME-DIR] usage profile for one of them: the white-pages type of person object ๐Ÿซถ

The schema is based on the person object attributes from X.520 and X.521. It also adds to the basic attributes from the X.500 series recommendations so you can get an electronic version of the stuff people usually have on a paper business card ๐ŸŽ€ This schema was first defined in the [VCARD] document, which is why this [MIME-DIR] profile is called the vCard MIME Directory Profile ๐Ÿ’œ

A directory entry using this profile can hold traditional white-pages info, like the distinguished name that uniquely identifies the entry. It can also hold a formatted version of the name for display, the delivery address in both structured and presentation form, various phone numbers, and organizational info linked to the entry. Business card staples like an organizational logo or an identity photo can go in here too ๐Ÿ“ธ

The vCard MIME Directory Profile also covers other important info about the person. For example, there's their date of birth ๐ŸŽ‚ an audio clip showing how to pronounce the name (or some other use of digital sound) ๐Ÿ”Š longitude and latitude geo-positioning info related to the person ๐ŸŒ the date and time the directory info was last updated ๐Ÿ•ฐ๏ธ annotations people often write on a business card ๐Ÿ“ Uniform Resource Locators (URL) for a website ๐Ÿ”— and public key information ๐Ÿ”‘ The profile also supports non-standard extensions to the schema, which lets implementations add to what the profile can do in a standardized way โœจ More info about this electronic business card format is in [VCARD] ๐Ÿฆ‹

1. The vCard Mime Directory Profile Registration

This profile is identified by the following [MIME-DIR] registration template information. The profile definition comes after it ๐Ÿ“‹

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME profile VCARD

Profile name: VCARD

Profile purpose: To hold person object or white-pages type of
directory information. The person schema captured in the directory
entries is that commonly found in an electronic business card.

Predefined MIME Directory value specifications used: uri, date,
date-time, float

New value specifications: This profile places further constraints on
the [MIME-DIR] text value specification. In addition, it adds a
binary, phone-number, utc-offset and vcard value specifications.

Predefined MIME Directory types used: SOURCE, NAME, PROFILE, BEGIN,
END.

Predefined MIME Directory parameters used: ENCODING, VALUE, CHARSET,
LANGUAGE, CONTEXT.

New types: FN, N, NICKNAME, PHOTO, BDAY, ADR, LABEL, TEL, EMAIL,
MAILER, TZ, GEO, TITLE, ROLE, LOGO, AGENT, ORG, CATEGORIES, NOTE,
PRODID, REV, SORT-STRING, SOUND, URL, UID, VERSION, CLASS, KEY

New parameters: TYPE

Profile special notes: The vCard object MUST contain the FN, N and
VERSION types. The type-grouping feature of [MIME-DIR] is supported
by this profile to group related vCard properties about a directory
entry. For example, vCard properties describing WORK or HOME related
characteristics can be grouped with a unique group label.

The profile permits the use of non-standard types (i.e., those
identified with the prefix string "X-") as a flexible method for
implementations to extend the functionality currently defined within
this profile.

Quick highlights ๐Ÿ‘€ The vCard object MUST contain the FN, N and VERSION types, so don't skip those, bestie ๐Ÿ’… The type-grouping feature from [MIME-DIR] is supported here, so you can group related vCard properties (like WORK or HOME stuff) under one unique group label ๐Ÿท๏ธ And non-standard types with the "X-" prefix are allowed as a flexible way to extend what the profile does ๐ŸŒˆ

2. MIME Directory Features

The vCard MIME Directory Profile uses a lot of the features defined by [MIME-DIR] ๐Ÿงš The sections that follow either clarify or extend the content-type definition of [MIME-DIR] โœจ

2.1 Predefined Type Usage

The vCard MIME Directory Profile uses the following predefined types from [MIME-DIR] ๐Ÿ’–

2.1.1 BEGIN and END Type

Okay this one is non-negotiable ๐Ÿ™ˆ The content entity MUST begin with the BEGIN type, and its value MUST be "VCARD". The content entity MUST also end with the END type, with a value of "VCARD". Same energy at both ends, periodt ๐Ÿ’œ

2.1.2 NAME Type

If the NAME type is present, its value is the displayable, presentation text associated with the source for the vCard, as specified in the SOURCE type ๐ŸŽ€

2.1.3 PROFILE Type

If the PROFILE type is present, then its value MUST be "VCARD" ๐ŸŒธ

2.1.4 SOURCE Type

If the SOURCE type is present, its value gives info about how to find the source for the vCard ๐Ÿ—บ๏ธ

2.2 Predefined Type Parameter Usage

The vCard MIME Directory Profile uses the following predefined type parameters as defined by [MIME-DIR] ๐Ÿฆ‹

  • LANGUAGE
  • ENCODING
  • VALUE

2.3 Predefined VALUE Type Usage โœจ

okay so this is the big "no repeats" rule ๐ŸŽ€ The predefined data type values from [MIME-DIR] MUST NOT be repeated in COMMA separated value lists, except inside the N, NICKNAME, ADR and CATEGORIES value types. Those four are the exceptions, so they get to be extra ๐Ÿ’…

The text value type from [MIME-DIR] gets an extra restriction. Any SEMI-COLON character (ASCII decimal 59) in the value MUST be escaped with the BACKSLASH character (ASCII decimal 92). So it's giving "escape your semicolons, bestie" ๐Ÿฆ‹

2.4 Extensions To The Predefined VALUE Types ๐ŸŒธ

the vCard profile adds its own value types on top of the ones in [MIME-DIR]. These are specific to this profile, so you won't find them in the base spec ๐Ÿงš

2.4.1 BINARY ๐Ÿ’œ

the "binary" value type means the type value is inline, encoded binary data. You can use it with the PHOTO, LOGO, SOUND, and KEY types.

if you're sending inline encoded binary data, the ENCODING type parameter MUST be used to say which encoding format you're using. The binary data MUST be encoded with the "B" encoding format. Long lines of encoded binary data SHOULD BE folded to 75 characters, using the folding method from [MIME-DIR] ๐Ÿ“

here's the notation, so you can see how it's built:

binary = <A "B" binary encoded string as defined by [RFC 2047].>

2.4.2 VCARD ๐ŸŽ€

the "vcard" value type means the type value is another vCard, like a vCard inside a vCard ๐Ÿคฏ You can use it with the AGENT type. This value type is defined by this spec.

Each type declaration inside a vcard value is written as part of a text value, so they MUST be terminated with the backslash escape sequence "\n" or "\N", instead of the usual newline character sequence CRLF. On top of that, any COMMA character (ASCII decimal 44), SEMI-COLON character (ASCII decimal 59) and COLON character (ASCII decimal 58) MUST be escaped with the BACKSLASH character (ASCII decimal 92).

here's an AGENT example so you can see it all together ๐Ÿ‘‘

     AGENT:BEGIN:VCARD\nFN:Joe Friday\nTEL:+1-919-555-7878\n
      TITLE:Area Administrator\, Assistant\n EMAIL\;TYPE=INTERN\n
      ET:jfriday@host.com\nEND:VCARD\n

2.4.3 PHONE-NUMBER ๐Ÿ“ž

the "phone-number" value type means the type value is a telephone number. You can use it with the TEL type. It's a text value with the special meaning of a telephone number, as defined in [CCITT E.163] and [CCITT X.121] โœจ

2.4.4 UTC-OFFSET ๐ŸŒˆ

the "utc-offset" value type means the type value is a signed offset from UTC. You can use it with the TZ type.

this is an offset from Coordinated Universal Time (UTC). It's written as a positive or negative difference in hours and minutes, like +hh:mm. The time uses a 24-hour clock. Hour values run from 00 to 23, and minute values run from 00 to 59. Hours and minutes are always 2 digits, with leading zeroes where needed to keep the digit count. The extended format for ISO 8601 UTC offsets MUST be used. That means a colon goes between the hour and minute fields ๐Ÿซถ

the notation looks like this:

     time-hour       = 2DIGIT        ;00-23
     time-minute     = 2DIGIT        ;00-59
     utc-offset      = ("+" / "-") time-hour ":" time-minute

2.5 Structured Type Values ๐Ÿ’…

compound type values are split up by a field delimiter, which is the SEMI-COLON character (ASCII decimal 59). A SEMI-COLON inside a component of a compound property value MUST be escaped with a BACKSLASH character (ASCII decimal 92). Hot tip: escape it or it'll break things ๐Ÿ˜ญ

lists of values are split up by a list delimiter, which is the COMMA character (ASCII decimal 44). A COMMA character inside a value MUST be escaped with a BACKSLASH character (ASCII decimal 92).

this profile also supports the type grouping mechanism from [MIME-DIR]. Grouping related types is a really useful way to communicate shared meaning about a vCard's properties, so it's a whole vibe ๐Ÿงš

2.6 Line Delimiting and Folding ๐Ÿฆ‹

this profile uses the same line delimiting and folding methods as [MIME-DIR]. When you parse a content line, folded lines have to be unfolded first, using the unfolding procedure in [MIME-DIR]. After you generate a content line, lines longer than 75 characters SHOULD be folded, using the folding procedure in [MIME DIR] โœจ

the order matters, so pay attention ๐Ÿ‘€ Folding happens after any content encoding of a type value. Unfolding happens before any decoding of a type value in a content line.


3. vCard Profile Features ๐ŸŽ€

the vCard MIME Directory Profile Type holds directory information, usually about a single directory entry. The info uses an attribute schema built for personal contact details. A vCard can include attributes that describe identification, delivery addressing, telecommunications addressing, geography, organization, general explanatory info, and security and access info about the object the vCard is attached to ๐Ÿ’–

3.1 Identification Types ๐ŸŒธ

these types capture the info that identifies and names the person or resource the vCard belongs to ๐Ÿงš

3.1.1 FN Type Definition ๐Ÿ’œ

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME type FN

Type name:FN

Type purpose: this type specifies the formatted text for the name of the object the vCard represents.

Type encoding: 8bit

Type value: a single text value.

Type special notes: this type is based on the semantics of the X.520 Common Name attribute. The property MUST be present in the vCard object. no skipping this one, bestie ๐Ÿ™ˆ

Type example:

     FN:Mr. John Q. Public\, Esq.

3.1.2 N Type Definition ๐Ÿ“

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME type N

Type name: N

Type purpose: this type specifies the parts of the name of the object the vCard represents.

Type encoding: 8bit

Type value: a single structured text value. Each component can have multiple values.

Type special note: the structured type value lines up, in order, with the Family Name, Given Name, Additional Names, Honorific Prefixes, and Honorific Suffixes. The text components are separated by the SEMI-COLON character (ASCII decimal 59). Individual text components can include multiple text values (like several Additional Names) separated by the COMMA character (ASCII decimal 44). This type is based on the semantics of the X.520 individual name attributes. The property MUST be present in the vCard object. again, this one is non-negotiable ๐Ÿ’…

Type example:

     N:Public;John;Quinlan;Mr.;Esq.

     N:Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.

3.1.3 NICKNAME Type Definition ๐Ÿฆ‹

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME type NICKNAME
Type name: NICKNAME

Type purpose: this type specifies the text for the nickname of the object the vCard represents.

Type encoding: 8bit

Type value: one or more text values, separated by a COMMA character (ASCII decimal 44).

Type special note: a nickname is the descriptive name you use instead of, or in addition to, the one that belongs to a person, place, or thing. It can also be a familiar form of a proper name given by the FN or N types โœจ

Type example:

     NICKNAME:Robbie

     NICKNAME:Jim,Jimmie

3.1.4 PHOTO Type Definition ๐Ÿ“ธ

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME type PHOTO

Type name: PHOTO

Type purpose: this type specifies an image or photograph that annotates some part of the object the vCard represents.

Type encoding: the encoding MUST be reset to "b" using the ENCODING parameter, so you can specify inline, encoded binary data. If the value is referenced by a URI value, then the default encoding of 8bit is used and no explicit ENCODING parameter is needed.

Type value: a single value. The default is the binary value. It can also be reset to the uri value. The uri value can be used to point at a value outside of this MIME entity ๐ŸŒˆ

Type special notes: the type can include the "TYPE" type parameter to specify the graphic image format. The TYPE parameter values MUST be one of the IANA registered image formats or a non-standard image format.

Type example:

     PHOTO;VALUE=uri:http://www.abc.com/pub/photos
      /jqpublic.gif


     PHOTO;ENCODING=b;TYPE=JPEG:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcN
      AQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bm
      ljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
      <...remainder of "B" encoded binary data...>

3.1.5 BDAY Type Definition ๐ŸŽ‚

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME type BDAY

Type name: BDAY

Type purpose: this type specifies the birth date of the object the vCard represents.

Type encoding: 8bit

Type value: the default is a single date value. It can also be reset to a single date-time value.

Type examples:

     BDAY:1996-04-15

     BDAY:1953-10-15T23:10:00Z

     BDAY:1987-09-27T08:30:00-06:00

3.2 Delivery Addressing Types ๐Ÿ’Œ

these types are all about delivery addressing, or the label, for the vCard object. Next up, we're getting into where the vCard can actually be sent ๐Ÿงš๐Ÿ’–

3.2.1. ADR Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type ADR
  • Type name: ADR
  • Type purpose: okay so ADR is the one that spells out the delivery address for the vCard object, like the full mailing spot ๐Ÿ“ฎโœจ
  • Type encoding: 8bit
  • Type value: one structured text value, with the parts split up by the SEMI-COLON character (ASCII decimal 59) ๐ŸŽ€

Type special notes: bestie, this one is all about the order ๐Ÿ’… Every address component has its own spot, and each component value MUST be specified in its corresponding position. The parts go in this sequence: post office box, extended address, street address, locality (like city), region (like state or province), postal code, then country name. If a component is missing, its separator MUST still be specified, so the slots never shift ๐Ÿซถ

Between the text components you use the SEMI-COLON character (ASCII decimal 59). When it makes sense, a component can hold several text values (like a "street" with multiple lines) separated by the COMMA character (ASCII decimal 44) ๐ŸŒธ

The type can carry the TYPE parameter to say what kind of delivery address it is. The values are:

  • dom for a domestic delivery address ๐Ÿ‡บ๐Ÿ‡ธ
  • intl for an international one ๐ŸŒ
  • postal for postal delivery ๐Ÿ“ฌ
  • parcel for parcel delivery ๐Ÿ“ฆ
  • home for a residence ๐Ÿก
  • work for a place of work ๐Ÿ’ผ
  • pref for the preferred address when there's more than one ๐Ÿ‘‘

You can list them as a parameter list (like TYPE=dom;TYPE=postal) or as a value list (like TYPE=dom,postal). This whole thing is based on the semantics of the X.520 geographical and postal addressing attributes, so it's giving legit standards energy ๐Ÿฆ‹ The default is TYPE=intl,postal,parcel,work, but you can override it with some other set of values. For example, you can reset it to TYPE=dom,postal,work,home for a domestic address that's used for postal delivery to a residence that's also used for work ๐Ÿ’–

Type example: here the post office box and the extended address are absent ๐Ÿงš

ADR;TYPE=dom,home,postal,parcel:;;123 Main
  Street;Any Town;CA;91921-1234

3.2.2. LABEL Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type LABEL
  • Type name: LABEL
  • Type purpose: this is the formatted text for the delivery address, basically the label you'd actually print on an envelope ๐Ÿ’Œ
  • Type encoding: 8bit
  • Type value: one text value ๐Ÿซง

Type special notes: the value is formatted text that can present a delivery address label for the vCard object ๐ŸŒˆ It can carry the TYPE parameter to say what kind of delivery label it is. The values are:

  • dom for a domestic delivery label ๐Ÿ‡บ๐Ÿ‡ธ
  • intl for an international delivery label ๐ŸŒ
  • postal for a postal delivery label ๐Ÿ“ฌ
  • parcel for a parcel delivery label ๐Ÿ“ฆ
  • home for a delivery label for a residence ๐Ÿก
  • work for a delivery label for a place of work ๐Ÿ’ผ
  • pref for the preferred label when more than one is specified ๐Ÿ‘‘

Same vibes as ADR: you can use a parameter list (like TYPE=dom;TYPE=postal) or a value list (like TYPE=dom,postal). It's based on the X.520 geographical and postal addressing attributes ๐Ÿฆ‹ The default is TYPE=intl,postal,parcel,work, and you can override it with other values. For example, you can reset it to TYPE=intl,post,parcel,home to get an international label for both postal and parcel delivery to a home ๐ŸŽ€

Type example: a multi-line address label ๐Ÿ’…

LABEL;TYPE=dom,home,postal,parcel:Mr.John Q. Public\, Esq.\n
 Mail Drop: TNE QB\n123 Main Street\nAny Town\, CA  91921-1234
 \nU.S.A.

3.3. Telecommunications Addressing Types

These types are all about the phone, email, and messaging stuff tied to the object the vCard represents ๐Ÿ“žโœจ

3.3.1. TEL Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type TEL
  • Type name: TEL
  • Type purpose: the telephone number for calling the object the vCard represents ๐Ÿ“ฑ
  • Type encoding: 8bit
  • Type value: one phone-number value ๐ŸŒธ

Type special notes: the value is written in a canonical form so it's an unambiguous representation of one globally unique telephone endpoint. Iconic. This type is based on the X.500 Telephone Number attribute ๐Ÿฆ‹

The type can carry the TYPE parameter to say what the number is for. The values include:

  • home for a number tied to a residence ๐Ÿก
  • msg for a number with voice messaging support ๐Ÿ“ฉ
  • work for a number tied to a place of work ๐Ÿ’ผ
  • pref for a preferred-use number โญ
  • voice for a voice number ๐ŸŽค
  • fax for a facsimile number ๐Ÿ“ 
  • cell for a cellular number ๐Ÿ“ฒ
  • video for a video conferencing number ๐ŸŽฅ
  • pager for a paging device number ๐Ÿ“Ÿ
  • bbs for a bulletin board system number ๐Ÿ’พ
  • modem for a MODEM connected number ๐Ÿ”Œ
  • car for a car-phone number ๐Ÿš—
  • isdn for an ISDN service number ๐Ÿ›ฐ๏ธ
  • pcs for a personal communication services number ๐Ÿงƒ

The default type is voice. You can write these as a parameter list (like TYPE=work;TYPE=voice) or a value list (like TYPE=work,voice). The default can be overridden with another set of values. For example, the default voice can be reset to a WORK and HOME, VOICE and FAX telephone number with the value list TYPE=work,home,voice,fax ๐Ÿ’–

Type example:

TEL;TYPE=work,voice,pref,msg:+1-213-555-1234

3.3.2. EMAIL Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type EMAIL
  • Type name: EMAIL
  • Type purpose: the electronic mail address for reaching the object the vCard represents ๐Ÿ’Œ
  • Type encoding: 8bit
  • Type value: one text value โœ‰๏ธ

Type special notes: the type can carry the TYPE parameter to say what format or preference the address has. The values include:

  • internet for an Internet addressing type ๐ŸŒ
  • x400 for an X.400 addressing type ๐Ÿข
  • pref for a preferred-use address when more than one is specified โญ

Other IANA registered address types can also be specified ๐Ÿงš The default email type is internet. A non-standard value can also be specified, so you've got some room to be creative ๐ŸŒˆ

Type example:

EMAIL;TYPE=internet:jqpublic@xyz.dom1.com

EMAIL;TYPE=internet:jdoe@isp.net

EMAIL;TYPE=internet,pref:jane_doe@abc.com

3.3.3. MAILER Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type MAILER
  • Type name: MAILER
  • Type purpose: the type of electronic mail software the person linked to the vCard uses ๐Ÿ–ฅ๏ธ
  • Type encoding: 8bit
  • Type value: one text value ๐ŸŽ€

Type special notes: this helps a correspondent figure out what kind of data representation they can use and how to package it ๐Ÿซถ This property is based on the private MIME type X-Mailer, which MIME user agent products generally implement ๐Ÿ’œ

Type example:

MAILER:PigeonMail 2.1

3.4. Geographical Types

These types are about the geographical positions or regions tied to the object the vCard represents ๐ŸŒ๐Ÿ—บ๏ธ

3.4.1. TZ Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type TZ
  • Type name: TZ
  • Type purpose: info about the time zone of the object the vCard represents โฐ
  • Type encoding: 8bit
  • Type value: the default is a single utc-offset value ๐Ÿ• It can also be reset to a single text value ๐ŸŒธ

Type special notes: the type value consists of a single value โœจ

Type examples:

TZ:-05:00
TZ;VALUE=text:-05:00; EST; Raleigh/North America
;This example has a single value, not a structure text value.

3.4.2. GEO Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type GEO
  • Type name: GEO
  • Type purpose: the global positioning info for the object the vCard represents ๐Ÿ›ฐ๏ธ
  • Type encoding: 8bit
  • Type value: a single structured value made of two float values, separated by the SEMI-COLON character (ASCII decimal 59) ๐Ÿ“

Type special notes: this type is about where the object is in the world ๐ŸŒ The value gives latitude and longitude, in that order (so it's "LAT LON" ordering). Longitude is the location east and west of the prime meridian, as a positive or negative real number respectively. Latitude is the location north and south of the equator, as a positive or negative real number respectively ๐Ÿงญ

The longitude and latitude values MUST be specified as decimal degrees, and should be specified to six decimal places. That's what gives you granularity within a meter of the geographical position, which is honestly so precise ๐Ÿคฏ The text components are separated by the SEMI-COLON character (ASCII decimal 59). If you're converting degrees-minutes-seconds into decimal degrees, the simple formula is:

decimal = degrees + minutes/60 + seconds/3600.

Type example:

GEO:37.386013;-122.082932

3.5. Organizational Types

These types cover the info about the organization, or organizational units, of the object the vCard represents ๐Ÿข๐Ÿ’…

3.5.1. TITLE Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type TITLE
  • Type name: TITLE
  • Type purpose: the job title, functional position, or function of the object the vCard represents ๐Ÿ‘ฉโ€๐Ÿ’ป
  • Type encoding: 8bit
  • Type value: one text value ๐ŸŽ€

Type special notes: this one is based on the X.520 Title attribute ๐Ÿฆ‹

Type example:

TITLE:Director\, Research and Development

3.5.2. ROLE Type Definition

  • To: ietf-mime-directory@imc.org
  • Subject: Registration of text/directory MIME type ROLE
  • Type name: ROLE
  • Type purpose: the role, occupation, or business category of the object the vCard represents ๐Ÿ’ผ
  • Type encoding: 8bit
  • Type value: one text value ๐ŸŒท

Type special notes: this type is based on the X.520 Business Category explanatory attribute ๐Ÿง  It's included as an organizational type so people don't mix it up with TITLE. Using TITLE when you actually mean ROLE is a classic mix-up, so ROLE exists to keep the meanings separate ๐Ÿซถ

Type example:

ROLE:Programmer

3.5.3 LOGO Type Definition

okay bestie, LOGO is giving "here's the brand's face" ๐ŸŽ€โœจ It's the graphic image of the logo tied to whatever the vCard is about.

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type LOGO ๐Ÿ“ฌ Type name: LOGO ๐Ÿท๏ธ

Type purpose: It's for a graphic image of the logo linked to the object the vCard represents. Main character logo energy ๐Ÿ’…

Type encoding: The encoding MUST be reset to "b" using the ENCODING parameter so you get inline, encoded binary data ๐Ÿง  If the value is referenced by a URI value, the default encoding of 8bit applies and you don't need an explicit ENCODING parameter. no cap, that's less work ๐Ÿซถ

Type value: It's a single value. The default is the binary value, but you can reset it to the uri value ๐Ÿฆ‹ The uri value lets you point to something outside this MIME entity, which is lowkey iconic.

Type special notes: The type can include the type parameter TYPE to specify the graphic image format. The TYPE parameter values MUST be one of the IANA registered image formats or a non-standard image format ๐ŸŒˆ

Type example:

     LOGO;VALUE=uri:http://www.abc.com/pub/logos/abccorp.jpg

     LOGO;ENCODING=b;TYPE=JPEG:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcN
      AQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bm
      ljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
      <...the remainder of "B" encoded binary data...>

3.5.4 AGENT Type Definition

AGENT is your person-who-handles-stuff-for-you era ๐Ÿงš It's info about another person who acts on behalf of the individual or resource the vCard is for.

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type AGENT ๐Ÿ“ฌ Type name: AGENT ๐Ÿท๏ธ

Type purpose: It specifies information about another person who will act on behalf of the individual or resource associated with the vCard ๐Ÿ’œ

Type encoding: 8-bit ๐Ÿ”ข

Type value: The default is a single vcard value. You can also reset it to a single text or uri value. The text value holds textual information, and the uri value points to information outside this MIME entity โœจ

Type special notes: This type typically specifies an area administrator, assistant, or secretary for the individual associated with the vCard. The key vibe of an Agent is that it represents somebody or something that's separately addressable ๐Ÿ“ž๐ŸŒธ

Type example:

     AGENT;VALUE=uri:
      CID:JQPUBLIC.part3.960129T083020.xyzMail@host3.com

     AGENT:BEGIN:VCARD\nFN:Susan Thomas\nTEL:+1-919-555-
      1234\nEMAIL\;INTERNET:sthomas@host.com\nEND:VCARD\n

3.5.5 ORG Type Definition

ORG is where the company drama lives ๐Ÿข๐Ÿ’… It holds the organization name and its units.

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type ORG ๐Ÿ“ฌ Type name: ORG ๐Ÿท๏ธ

Type purpose: It specifies the organizational name and units associated with the vCard ๐Ÿ“

Type encoding: 8bit ๐Ÿ”ข

Type value: A single structured text value made of components separated by the SEMI-COLON character (ASCII decimal 59) โœจ

Type special notes: This type is based on the X.520 Organization Name and Organization Unit attributes. The type value is a structured type, starting with the organization name and followed by one or more levels of organizational unit names. it's giving org chart ๐Ÿงฉ

Type example: A type value with an organizational name, organizational unit #1 name and organizational unit #2 name.

     ORG:ABC\, Inc.;North American Division;Marketing

3.6 Explanatory Types

okay these are the "let me explain myself" types ๐Ÿงš๐Ÿ’œ They're about extra notes or revisions for the vCard.

3.6.1 CATEGORIES Type Definition

CATEGORIES is basically hashtags for your contact card ๐Ÿท๏ธโœจ

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type CATEGORIES ๐Ÿ“ฌ Type name: CATEGORIES ๐Ÿท๏ธ

Type purpose: It specifies application category information about the vCard ๐Ÿฆ‹

Type encoding: 8bit ๐Ÿ”ข

Type value: One or more text values separated by a COMMA character (ASCII decimal 44) ๐ŸŒธ

Type example:

     CATEGORIES:TRAVEL AGENT

     CATEGORIES:INTERNET,IETF,INDUSTRY,INFORMATION TECHNOLOGY

3.6.2 NOTE Type Definition

NOTE is the "btw, read this" field ๐Ÿ“๐Ÿ’–

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type NOTE ๐Ÿ“ฌ Type name: NOTE ๐Ÿท๏ธ

Type purpose: It specifies supplemental information or a comment associated with the vCard ๐Ÿซถ

Type encoding: 8bit ๐Ÿ”ข

Type value: A single text value โœจ

Type special notes: This type is based on the X.520 Description attribute ๐ŸŒˆ

Type example:

     NOTE:This fax number is operational 0800 to 1715
       EST\, Mon-Fri.

3.6.3 PRODID Type Definition

PRODID tells everyone which product made the vCard, so it's the receipts of the file ๐Ÿงพ๐ŸŽ€

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type PRODID ๐Ÿ“ฌ Type name: PRODID ๐Ÿท๏ธ

Type purpose: It specifies the identifier for the product that created the vCard object ๐Ÿ’œ

Type encoding: 8-bit ๐Ÿ”ข

Type value: A single text value โœจ

Type special notes: Implementations SHOULD use a method such as the one specified for Formal Public Identifiers in ISO 9070 to make sure the text value is unique. Uniqueness is literally the whole brand ๐Ÿ”ฅ

Type example:

     PRODID:-//ONLINE DIRECTORY//NONSGML Version 1//EN

3.6.4 REV Type Definition

REV is the "when was this last glowed up" stamp โฐ๐Ÿฆ‹

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type REV ๐Ÿ“ฌ Type name: REV ๐Ÿท๏ธ

Type purpose: It specifies revision information about the current vCard ๐ŸŒธ

Type encoding: 8-bit ๐Ÿ”ข

Type value: The default is a single date-time value. It can also be reset to a single date value ๐Ÿงš

Type special notes: The value tells the current revision of the information in this vCard apart from other renditions of that information. iykyk, it's how you tell versions apart ๐Ÿ‘‘

Type example:

     REV:1995-10-31T22:27:10Z

     REV:1997-11-15

3.6.5 SORT-STRING Type Definition

SORT-STRING is the secret sauce for alphabetizing names correctly, even when the name is giving complicated ๐Ÿ”ค๐Ÿ’…

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type SORT-STRING ๐Ÿ“ฌ Type Name: SORT-STRING ๐Ÿท๏ธ

Type purpose: It specifies the family name or given name text used for national-language-specific sorting of the FN and N types ๐ŸŒ

Type encoding: 8bit ๐Ÿ”ข

Type value: A single text value โœจ

Type special notes: The sort string gives the family name or given name text used in locale- or national-language-specific sorting of the formatted name and structured name types. Without it, sorting algorithms could incorrectly sort this vCard within a sequence of sorted vCards ๐Ÿ˜ญ When this type is present, its family name or given name value is what the vCard gets sorted by ๐Ÿ’–

Type examples: For family name sorting, these examples show common sort string usage with the FN and N types.

     FN:Rene van der Harten
     N:van der Harten;Rene;J.;Sir;R.D.O.N.
     SORT-STRING:Harten

     FN:Robert Pau Shou Chang
     N:Pau;Shou Chang;Robert
     SORT-STRING:Pau

     FN:Osamu Koura
     N:Koura;Osamu
     SORT-STRING:Koura

     FN:Oscar del Pozo
     N:del Pozo Triscon;Oscar
     SORT-STRING:Pozo

     FN:Chistine d'Aboville
     N:d'Aboville;Christine
     SORT-STRING:Aboville

3.6.6 SOUND Type Definition

SOUND is a voice note for your contact, mostly used to nail the name's pronunciation ๐ŸŽง๐ŸŽค

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type SOUND ๐Ÿ“ฌ Type name: SOUND ๐Ÿท๏ธ

Type purpose: It specifies digital sound content that annotates some aspect of the vCard. By default this type is used to specify the proper pronunciation of the name type value of the vCard ๐Ÿฆ‹

Type encoding: The encoding MUST be reset to "b" using the ENCODING parameter so you get inline, encoded binary data ๐Ÿง  If the value is referenced by a URI value, the default encoding of 8bit applies and you don't need an explicit ENCODING parameter ๐Ÿซถ

Type value: It's a single value. The default is the binary value, and you can reset it to the uri value. The uri value points to something outside this MIME entity โœจ

Type special notes: The type can include the type parameter TYPE to specify the audio format. The TYPE parameter values MUST be one of the IANA registered audio formats or a non-standard audio format ๐ŸŽถ

Type example:

     SOUND;TYPE=BASIC;VALUE=uri:CID:JOHNQPUBLIC.part8.
      19960229T080000.xyzMail@host1.com

     SOUND;TYPE=BASIC;ENCODING=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcN
      AQEEBQAwdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bm
      ljYXRpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
      <...the remainder of "B" encoded binary data...>

3.6.7 UID Type Definition

UID is the vCard's forever-ID, the one thing that makes it it ๐Ÿ†”๐Ÿ’œ

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type UID ๐Ÿ“ฌ Type name: UID ๐Ÿท๏ธ

Type purpose: It specifies a value representing a globally unique identifier for the individual or resource associated with the vCard ๐ŸŒ

Type encoding: 8bit ๐Ÿ”ข

Type value: A single text value โœจ

Type special notes: This type is used to uniquely identify the object the vCard represents, so it's the main character identifier ๐Ÿ‘‘

The type can include the type parameter TYPE to specify the format of the identifier. The TYPE parameter value should be an IANA registered identifier format. The value can also be a non-standard format ๐ŸŒˆ

Type example:

     UID:19950401-080045-40000F192713-0052

3.6.8 URL Type Definition

URL is the link-in-bio of your vCard ๐Ÿ”—๐ŸŒธ

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type URL ๐Ÿ“ฌ Type name: URL ๐Ÿท๏ธ

Type purpose: It specifies a uniform resource locator associated with the object the vCard refers to ๐Ÿฆ‹

Type encoding: 8bit ๐Ÿ”ข

Type value: A single uri value โœจ

Type example:

     URL:http://www.swbyps.restaurant.french/~chezchic.html

3.6.9 VERSION Type Definition

VERSION says which vCard spec the card was formatted with, and this one is extremely strict about it ๐Ÿง๐Ÿ’…

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type VERSION ๐Ÿ“ฌ Type name: VERSION ๐Ÿท๏ธ

Type purpose: It specifies the version of the vCard specification used to format this vCard ๐ŸŽ€

Type encoding: 8bit ๐Ÿ”ข

Type value: A single text value โœจ

Type special notes: The property MUST be present in the vCard object. The value MUST be "3.0" if the vCard corresponds to this specification. No skipping this one, periodt ๐Ÿ˜ญ

Type example:

     VERSION:3.0

3.7 Security Types

okay this part is serious business, bestie ๐Ÿ”๐Ÿ’€ These types are about keeping communication pathways and access to the vCard locked down.

3.7.1 CLASS Type Definition

CLASS is the "who gets to see this" label ๐Ÿ‘€๐Ÿ”’

To: ietf-mime-directory@imc.org ๐Ÿ’Œ Subject: Registration of text/directory MIME type CLASS ๐Ÿ“ฌ Type name: CLASS ๐Ÿท๏ธ

Type purpose: It specifies the access classification for a vCard object ๐Ÿ—๏ธ

Type encoding: 8bit ๐Ÿ”ข

Type value: A single text value โœจ

Type special notes: An access classification is only one piece of the overall security model for a directory service, so it's not the whole fortress ๐Ÿฐ The classification attribute captures the owner's intent for general access to the information described by the vCard object. It's the owner's "please be nice" note ๐Ÿซถ

Type examples:

     CLASS:PUBLIC

     CLASS:PRIVATE

     CLASS:CONFIDENTIAL

3.7.2 KEY Type Definition ๐Ÿ”‘โœจ

To: ietf-mime-directory@imc.org

Subject: Registration of text/directory MIME type KEY

Type name: KEY

Okay bestie, the KEY type is how you attach a public key or an authentication certificate to the object that the vCard represents. ๐Ÿ” It's giving secure-contact-card energy, and I'm obsessed.

Type purpose: To specify a public key or authentication certificate associated with the object that the vCard represents. ๐Ÿ’–

Type encoding: The encoding MUST be reset to "b" using the ENCODING parameter so you can put inline, encoded binary data right in the line. ๐Ÿงš If the value is a text value, the default encoding of 8bit is used and you don't need an explicit ENCODING parameter. Easy peasy ๐Ÿ’…

Type value: It's a single value, and the default is binary. You can also reset it to a text value, and then the text value can be used to specify a text key. ๐ŸŽ€

Type special notes: The type can also include the type parameter TYPE to specify the public key or authentication certificate format. ๐Ÿซถ The parameter type should specify an IANA registered public key or authentication certificate format, and it can also specify a non-standard format. Very flexible, very iconic ๐ŸŒˆ

Type example:

KEY;ENCODING=b:MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQA
 wdzELMAkGA1UEBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENbW11bmljYX
 Rpb25zIENvcnBvcmF0aW9uMRwwGgYDVQQLExNJbmZvcm1hdGlvbiBTeXN0
 ZW1zMRwwGgYDVQQDExNyb290Y2EubmV0c2NhcGUuY29tMB4XDTk3MDYwNj
 E5NDc1OVoXDTk3MTIwMzE5NDc1OVowgYkxCzAJBgNVBAYTAlVTMSYwJAYD
 VQQKEx1OZXRzY2FwZSBDb21tdW5pY2F0aW9ucyBDb3JwLjEYMBYGA1UEAx
 MPVGltb3RoeSBBIEhvd2VzMSEwHwYJKoZIhvcNAQkBFhJob3dlc0BuZXRz
 Y2FwZS5jb20xFTATBgoJkiaJk/IsZAEBEwVob3dlczBcMA0GCSqGSIb3DQ
 EBAQUAA0sAMEgCQQC0JZf6wkg8pLMXHHCUvMfL5H6zjSk4vTTXZpYyrdN2
 dXcoX49LKiOmgeJSzoiFKHtLOIboyludF90CgqcxtwKnAgMBAAGjNjA0MB
 EGCWCGSAGG+EIBAQQEAwIAoDAfBgNVHSMEGDAWgBT84FToB/GV3jr3mcau
 +hUMbsQukjANBgkqhkiG9w0BAQQFAAOBgQBexv7o7mi3PLXadkmNP9LcIP
 mx93HGp0Kgyx1jIVMyNgsemeAwBM+MSlhMfcpbTrONwNjZYW8vJDSoi//y
 rZlVt9bJbs7MNYZVsyF1unsqaln4/vy6Uawfg8VUMk1U7jt8LYpo4YULU7
 UZHPYVUaSgVttImOHZIKi4hlPXBOhcUQ==

3.8 Extended Types ๐ŸŒธ

The types defined by this document can be extended with private types using the non-standard, private values mechanism defined in [RFC 2045]. ๐Ÿฆ‹ Non-standard, private types with a name starting with X- may be defined bilaterally between two cooperating agents without outside registration or standardization. Your own secret club, no permission slip needed ๐Ÿคซ๐Ÿ’œ

4. Formal Grammar โœจ

Okay so this part is the formal grammar, and it's there to help developers build parsers for the vCard. ๐Ÿ› ๏ธ It's the blueprint, so every bit matters.

This syntax is written according to the form described in RFC 2234, but it references just this small subset of RFC 2234 literals:

;*******************************************
; Commonly Used Literal Definition
;*******************************************

ALPHA        = %x41-5A / %x61-7A
     ; Latin Capital Letter A-Latin Capital Letter Z /
     ; Latin Small Letter a-Latin Small Letter z

CHAR         = %x01-7F
     ; Any C0 Controls and Basic Latin, excluding NULL from
     ; Code Charts, pages 7-6 through 7-9 in [UNICODE]

CR           = %x0D
     ; Carriage Return

LF           = %0A
     ; Line Feed

CRLF         = CR LF
     ; Internet standard newline

;CTL         = %x00-1F / %x7F
     ; Controls. Not used, but referenced in comments.

DIGIT        = %x30-39
     ; Digit Zero-Digit Nine

DQUOTE       = %x22
     ; Quotation Mark

HTAB         = %x09
     ; Horizontal Tabulation

SP           = %x20
     ; space

VCHAR        = %x21-7E
     ; Visible (printing) characters

WSP          = SP / HTAB
     ; White Space

;*******************************************
; Basic vCard Definition
;*******************************************

vcard_entity = 1*(vcard)

vcard        = [group "."] "BEGIN" ":" "VCARD" 1*CRLF
               1*(contentline)
     ;A vCard object MUST include the VERSION, FN and N types.
               [group "."] "END" ":" "VCARD" 1*CRLF

contentline  = [group "."] name *(";" param ) ":" value CRLF
     ; When parsing a content line, folded lines must first
     ; be unfolded according to the unfolding procedure
     ; described above. When generating a content line, lines
     ; longer than 75 characters SHOULD be folded according to
     ; the folding procedure described in [MIME DIR].

group        = 1*(ALPHA / DIGIT / "-")

name         = iana-token / x-name
     ; Parsing of the param and value is
     ; based on the "name" or type identifier
     ; as defined in ABNF sections below

iana-token   = 1*(ALPHA / DIGIT / "-")
     ; vCard type or parameter identifier registered with IANA

x-name       = "X-" 1*(ALPHA / DIGIT / "-")
     ; Reserved for non-standard use

param        = param-name "=" param-value *("," param-value)

param-name   = iana-token / x-name

param-value  = ptext / quoted-string

ptext        = *SAFE-CHAR

value        = *VALUE-CHAR

quoted-string = DQUOTE QSAFE-CHAR DQUOTE

NON-ASCII    = %x80-FF
     ; Use is restricted by CHARSET parameter
     ; on outer MIME object (UTF-8 preferred)

QSAFE-CHAR   = WSP / %x21 / %x23-7E / NON-ASCII
     ; Any character except CTLs, DQUOTE

SAFE-CHAR    = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-7E / NON-ASCII
     ; Any character except CTLs, DQUOTE, ";", ":", ","

VALUE-CHAR   = WSP / VCHAR / NON-ASCII
     ; Any textual character

;*******************************************
; vCard Type Definition
;
; Provides type-specific definitions for how the
; "value" and "param" are defined.
;*******************************************
;For name="NAME"
param        = ""
     ; No parameters allowed

value        = text-value

;For name="PROFILE"
param        = ""
     ; No parameters allowed

value        = text-value
     ; Value MUST be the case insensitive value "VCARD

;For name="SOURCE"
param        = source-param
     ; No parameters allowed

value        = uri

source-param = ("VALUE" "=" "uri")
             / ("CONTEXT" "=" "word")
     ; Parameter value specifies the protocol context
     ; for the uri value.
             / (x-name "=" *SAFE-CHAR)

;For name="FN"
;This type MUST be included in a vCard object.
param        = text-param
     ; Text parameters allowed

value        = text-value

;For name="N"
;This type MUST be included in a vCard object.

param        = text-param
     ; Text parameters allowed

value        = n-value

n-value      = 0*4(text-value *("," text-value) ";")
               text-value *("," text-value)
     ; Family; Given; Middle; Prefix; Suffix.
     ; Example: Public;John;Quincy,Adams;Reverend Dr. III

;For name="NICKNAME"
param        = text-param
     ; Text parameters allowed

value        = text-list

;For name="PHOTO"
param        = img-inline-param
     ; Only image parameters allowed

param        =/ img-refer-param
     ; Only image parameters allowed

value        = img-inline-value
     ; Value and parameter MUST match

value        =/ img-refer-value
     ; Value and parameter MUST match

;For name="BDAY"
param        = ("VALUE" "=" "date")
     ; Only value parameter allowed

param        =/ ("VALUE" "=" "date-time")
     ; Only value parameter allowed

value        = date-value
     ; Value MUST match value type

value        =/ date-time-value
     ; Value MUST match value type

;For name="ADR"
param        = adr-param / text-param
     ; Only adr and text parameters allowed

value        = adr-value

;For name="LABEL"
param        = adr-param / text-param
     ; Only adr and text parameters allowed

value        = text-value

;For name="TEL"
param        = tel-param
     ; Only tel parameters allowed

value        = phone-number-value

tel-param    = "TYPE" "=" tel-type *("," tel-type)
tel-type     = "HOME" / "WORK" / "PREF" / "VOICE" / "FAX" / "MSG"
             / "CELL" / "PAGER" / "BBS" / "MODEM" / "CAR" / "ISDN"
             / "VIDEO" / "PCS" / iana-token / x-name
     ; Values are case insensitive

;For name="EMAIL"
param        = email-param
     ; Only email parameters allowed

value        = text-value

email-param  = "TYPE" "=" email-type ["," "PREF"]
     ; Value is case insensitive

email-type   = "INTERNET" / "X400" / iana-token / "X-" word
     ; Values are case insensitive

;For name="MAILER"
param        = text-param
     ; Only text parameters allowed

value        = text-value

;For name="TZ"
param        = ""
     ; No parameters allowed

value        = utc-offset-value

;For name="GEO"
param        = ""
     ; No parameters allowed

value        = float-value ";" float-value

;For name="TITLE"
param        = text-param
     ; Only text parameters allowed

value        = text-value

;For name="ROLE"
param        = text-param
     ; Only text parameters allowed

value        = text-value

;For name="LOGO"
param        = img-inline-param / img-refer-param
     ; Only image parameters allowed

value        = img-inline-value / img-refer-value
     ; Value and parameter MUST match

;For name="AGENT"
param        = agent-inline-param

param        =/ agent-refer-param

value        = agent-inline-value
     ; Value and parameter MUST match

value        =/ agent-refer-value
     ; Value and parameter MUST match

agent-inline-param = ""
     ; No parameters allowed

agent-refer-param = "VALUE" "=" "uri"
     ; Only value parameter allowed

agent-inline-value = text-value
     ; Value MUST be a valid vCard object

agent-refer-value = uri
     ; URI MUST refer to image content of given type

;For name="ORG"

param        = text-param
     ; Only text parameters allowed

value        = org-value

org-value    = *(text-value ";") text-value
     ; First is Organization Name, remainder are Organization Units.

;For name="CATEGORIES"
param        = text-param
     ; Only text parameters allowed

value        = text-list

;For name="NOTE"
param        = text-param
     ; Only text parameters allowed

value        = text-value

;For name="PRODID"
param        = ""
     ; No parameters allowed

value        = text-value

;For name="REV"
param        = ["VALUE" =" "date-time"]
     ; Only value parameters allowed. Values are case insensitive.

param        =/ "VALUE" =" "date"
     ; Only value parameters allowed. Values are case insensitive.

value        = date-time-value

value        =/ date-value

;For name="SORT-STRING"
param        = text-param
     ; Only text parameters allowed

value        = text-value

;For name="SOUND"
param        = snd-inline-param
     ; Only sound parameters allowed

param        =/ snd-refer-param
     ; Only sound parameters allowed

value        = snd-line-value
     ; Value MUST match value type

value        =/ snd-refer-value
     ; Value MUST match value type

snd-inline-value     = binary-value CRLF
     ; Value MUST be "b" encoded audio content

snd-inline-param     = ("VALUE" "=" "binary"])
                     / ("ENCODING" "=" "b")
                     / ("TYPE" "=" *SAFE-CHAR)
     ; Value MUST be an IANA registered audio type

snd-refer-value      = uri
     ; URI MUST refer to audio content of given type

snd-refer-param      = ("VALUE" "=" "uri")
                     / ("TYPE" "=" word)
     ; Value MUST be an IANA registered audio type

;For name="UID"
param        = ""
     ; No parameters allowed

value        = text-value

;For name="URL"
param        = ""
     ; No parameters allowed

value        = uri
   ;For name="VERSION"
   ;This type MUST be included in a vCard object.
   param        = ""
        ; No parameters allowed

   value        = text-value
        ; Value MUST be "3.0"

   ;For name="CLASS"
   param        = ""
        ; No parameters allowed

   value        = "PUBLIC" / "PRIVATE" / "CONFIDENTIAL"
                / iana-token / x-name
        ; Value are case insensitive

   ;For name="KEY"
   param        = key-txt-param
        ; Only value and type parameters allowed

   param        =/ key-bin-param
        ; Only value and type parameters allowed

   value        = text-value

   value        =/ binary-value

   key-txt-param = "TYPE" "=" keytype

   key-bin-param = ("TYPE" "=" keytype)
                 / ("ENCODING" "=" "b")
        ; Value MUST be a "b" encoded key or certificate

   keytype      = "X509" / "PGP" / iana-token / x-name
        ; Values are case insensitive

   ;For name="X-" non-standard type
   param        = text-param / (x-name "=" param-value)
        ; Only text or non-standard parameters allowed

   value        = text-value

   ;*******************************************
   ; vCard Commonly Used Parameter Definition
   ;*******************************************

   text-param   = ("VALUE" "=" "ptext")
                / ("LANGUAGE" "=" langval)
                / (x-name "=" param-value)

   langval      = <a language string as defined in RFC 1766>

   img-inline-value     = binary-value
        ;Value MUST be "b" encoded image content

   img-inline-param

   img-inline-param     = ("VALUE" "=" "binary")
                        / ("ENCODING" "=" "b")
                        / ("TYPE" "=" param-value
        ;TYPE value MUST be an IANA registered image type

   img-refer-value = uri
        ;URI MUST refer to image content of given type

   img-refer-param      = ("VALUE" "=" "uri")
                        / ("TYPE" "=" param-value)
        ;TYPE value MUST be an IANA registered image type

   adr-param    = ("TYPE" "=" adr-type *("," adr-type))
                / (text-param)

   adr-type     = "dom" / "intl" / "postal" / "parcel" / "home"
                / "work" / "pref" / iana-type / x-name

   adr-value    = 0*6(text-value ";") text-value
        ; PO Box, Extended Address, Street, Locality, Region, Postal
        ; Code, Country Name

   ;*******************************************
   ; vCard Type Value Definition
   ;*******************************************

   text-value-list      = 1*text-value *("," 1*text-value)

   text-value   = *(SAFE-CHAR / ":" / DQUOTE / ESCAPED-CHAR)

   ESCAPED-CHAR = "\\" / "\;" / "\," / "\n" / "\N")
        ; \\ encodes \, \n or \N encodes newline
        ; \; encodes ;, \, encodes ,

   binary-value = <A "b" encoded text value as defined in [RFC 2047]>

   date-value   = <A single date value as defined in [MIME-DIR]>

   time-value   = <A single time value as defined in [MIME-DIR]>

   date-time-value = <A single date-time value as defined in [MIME-DIR]

   float-value  = <A single float value as defined in [MIME-DIR]>

   phone-number-value = <A single text  value as defined in [CCITT
                         E.163] and [CCITT X.121]>

   uri-value    = <A uri value as defined in [MIME-DIR]>

   utc-offset-value = ("+" / "-") time-hour ":" time-minute
   time-hour    = 2DIGIT                ;00-23
   time-minute  = 2DIGIT                ;00-59

5. Differences From vCard v2.1 โœจ

okay so this spec got reviewed by the whole IETF crew ๐Ÿซถ and the review brought in a bunch of changes from [VCARD] version 2.1. bestie, these changes are so big that a vCard following this spec needs a different version number than one following [VCARD] ๐Ÿ’œ here's the tea:

  • The QUOTED-PRINTABLE inline encoding is gone ๐Ÿ™…โ€โ™€๏ธ Only the "B" encoding of [RFC 2047] is allowed for the ENCODING parameter.
  • CRLF in a text type value is now written with the backslash sequence "\n" or "\N" ๐ŸŒธ
  • Any COMMA or SEMICOLON in a text type value must be backslash escaped.
  • The VERSION value for this spec MUST be "3.0" ๐ŸŽ€
  • The [MIME-DIR] predefined types SOURCE, NAME and PROFILE are allowed now ๐Ÿฆ‹
  • The [MIME-DIR] VALUE type parameter for value data typing is allowed, and there are extra value types added on top of these โœจ
  • The [VCARD] CHARSET type parameter got eliminated ๐Ÿ’€ Character set can only be specified on the CHARSET parameter on the Content-Type MIME header field.
  • The [VCARD] support for non-significant WSP characters is gone ๐Ÿ™ˆ
  • The "TYPE=" prefix on parameter values is required now. In [VCARD] it was optional, so this is a big glow-up ๐Ÿ‘‘
  • LOGO, PHOTO and SOUND multimedia formats MUST be either IANA registered types or non-standard types ๐ŸŒˆ
  • Inline binary content must be "B" encoded and folded. A blank line after the encoded binary content isn't required anymore ๐Ÿงš
  • TEL values can be marked as personal communication services telephone numbers with the PCS type parameter value ๐Ÿ“ž
  • The CATEGORIES, CLASS, NICKNAME, PRODID and SORT-STRING types were added ๐Ÿ“
  • The VERSION, N and FN types MUST be specified in a vCard. This tells you which version of the spec the object was formatted to, and it makes sure every vCard has a structured AND formatted name so people can actually identify who it belongs to ๐Ÿ’–

6. Acknowledgements ๐Ÿซถ

The many valuable comments from members of the IETF ASID working group are gratefully acknowledged, as are the contributions by Roland Alden, Stephen Bartlett, Alec Dun, Patrik Faltstrom, Daniel Gurney, Bruce Johnston, Daniel Klaussen, Pete Miller, Keith Moore, Vinod Seraphin, Michelle Watkins. Chris Newman was especially helpful in navigating the intricacies of ABNF lore ๐Ÿ’… literally a legend moment.

7. Authors' Addresses ๐Ÿ’Œ

   BEGIN:vCard
   VERSION:3.0
   FN:Frank Dawson
   ORG:Lotus Development Corporation
   ADR;TYPE=WORK,POSTAL,PARCEL:;;6544 Battleford Drive
    ;Raleigh;NC;27613-3502;U.S.A.
   TEL;TYPE=VOICE,MSG,WORK:+1-919-676-9515
   TEL;TYPE=FAX,WORK:+1-919-676-9564
   EMAIL;TYPE=INTERNET,PREF:Frank_Dawson@Lotus.com
   EMAIL;TYPE=INTERNET:fdawson@earthlink.net
   URL:http://home.earthlink.net/~fdawson
   END:vCard


   BEGIN:vCard
   VERSION:3.0
   FN:Tim Howes
   ORG:Netscape Communications Corp.
   ADR;TYPE=WORK:;;501 E. Middlefield Rd.;Mountain View;
    CA; 94043;U.S.A.
   TEL;TYPE=VOICE,MSG,WORK:+1-415-937-3419
   TEL;TYPE=FAX,WORK:+1-415-528-4164
   EMAIL;TYPE=INTERNET:howes@netscape.com
   END:vCard

8. Security Considerations ๐Ÿšจ

vCards can carry cryptographic keys or certificates, as described in Section 3.7.2. Okay this part is SERIOUS ๐Ÿ˜ญ

Section 3.7.1 specifies a desired security classification policy for a particular vCard. That policy is not enforced in any way. bestie, a "desired" policy with zero enforcement is giving wishful thinking ๐Ÿ™ˆ

The vCard objects have no inherent authentication or privacy ๐Ÿ’€, but they can easily be carried by any security mechanism that transfers MIME objects with authentication or privacy. In cases where threats of "spoofed" vCard information are a concern, the vCard SHOULD BE transported using one of these secure mechanisms ๐Ÿ” this is the big protect-your-data moment.

The information in a vCard may become out of date ๐Ÿ˜ฌ In cases where the vitality of data is important to an originator of a vCard, the "URL" type described in section 3.6.8 SHOULD BE specified. In addition, the "REV" type described in section 3.6.4 can be specified to indicate the last time that the vCard data was updated โฐ

9. References ๐Ÿ“š

  • [ISO 8601] ISO 8601:1988 - Data elements and interchange formats - Information interchange - Representation of dates and times - The International Organization for Standardization, June, 1988.
  • [ISO 8601 TC] ISO 8601, Technical Corrigendum 1 - Data elements and interchange formats - Information interchange - Representation of dates and times - The International Organization for Standardization, May, 1991.
  • [ISO 9070] ISO 9070, Information Processing - SGML support facilities - Registration Procedures for Public Text Owner Identifiers, April, 1991.
  • [CCITT E.163] Recommendation E.163 - Numbering Plan for The International Telephone Service, CCITT Blue Book, Fascicle II.2, pp. 128-134, November, 1988.
  • [CCITT X.121] Recommendation X.121 - International Numbering Plan for Public Data Networks, CCITT Blue Book, Fascicle VIII.3, pp. 317-332, November, 1988.
  • [CCITT X.520] Recommendation X.520 - The Directory - Selected Attribute Types, November 1988.
  • [CCITT X.521] Recommendation X.521 - The Directory - Selected Object Classes, November 1988.
  • [MIME-DIR] Howes, T., Smith, M., and F. Dawson, "A MIME Content-Type for Directory Information", RFC 2425, September 1998.
  • [RFC 1738] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994.
  • [RFC 1766] Alvestrand, H., "Tags for the Identification of Languages", RFC 1766, March 1995.
  • [RFC 1872] Levinson, E., "The MIME Multipart/Related Content-type", RFC 1872, December 1995.
  • [RFC 2045] Freed, N., and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) - Part One: Format of Internet Message Bodies", RFC 2045, November 1996.
  • [RFC 2046] Freed, N., and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) - Part Two: Media Types", RFC 2046, November 1996.
  • [RFC 2047] Moore, K., "Multipurpose Internet Mail Extensions (MIME) - Part Three: Message Header Extensions for Non-ASCII Text", RFC 2047, November 1996.
  • [RFC 2048] Freed, N., Klensin, J., and J. Postel, "Multipurpose Internet Mail Extensions (MIME) - Part Four: Registration Procedures", RFC 2048, January 1997.
  • [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
  • [RFC 2234] Crocker, D., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
  • [UNICODE] "The Unicode Standard - Version 2.0", The Unicode Consortium, July 1996.
  • [VCARD] Internet Mail Consortium, "vCard - The Electronic Business Card Version 2.1", http://www.imc.org/pdi/vcard-21.txt, September 18, 1996.

okay bestie, the legal part ๐Ÿงพ๐Ÿ’… first, the copyright notice, verbatim:

Copyright (C) The Internet Society (1998). All Rights Reserved.

so basically, this doc and translations of it can be copied and shared with anyone ๐Ÿฆ‹ and people can make derivative works that comment on it, explain it, or help people implement it. they can be prepared, copied, published, and distributed, in whole or in part, with no restriction of any kind ๐ŸŽ€ as long as the copyright notice and this paragraph are included on all copies and derivative works. ngl that's a very generous deal ๐Ÿซถ

BUT here's the catch ๐Ÿ’€ this document itself may not be modified in any way. no removing the copyright notice, no removing references to the Internet Society or other Internet organizations. the only exceptions are: (a) when it's needed for developing Internet standards, in which case the procedures for copyrights defined in the Internet Standards process must be followed, or (b) when it's required to translate it into languages other than English ๐ŸŒ

the limited permissions granted above are perpetual โ™พ๏ธ and will not be revoked by the Internet Society or its successors or assigns. so once you've got them, they're yours forever, periodt โœจ

the disclaimer is the serious part, so read it carefully ๐Ÿ™ˆ

this document and the information in it is provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS 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. ๐Ÿ˜ญ so no promises that it's perfect or that using it won't step on anyone's rights, and no implied guarantees either. use it at your own risk, bestie ๐Ÿซถ๐ŸŒˆ

๐Ÿ“ฆ where this page comes from