Comment:

    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

Comment:

	A set of test addresses stolen from the dtmail test suite,
	with a few of my own.
	Use with "addrtest -p <addrlist".

	grep for "Expected:" in output to find errors

	CAREFUL: a blank line in this file causes everything following it
		 to be ignored until a line starting with "From " (so that
		 addrtest -p can be pointed at a real mailbox).

From start here
Strict: false
Comment:
	This first set of addresses are all good.
To: ggere
Expect: 1
	ggere
To: /tmp/mail.out
Expect: 1
	/tmp/mail.out
To: +mailbox
Expect: 1
	+mailbox
To: ~user/mailbox
Expect: 1
	~user/mailbox
To: ~/mailbox
Expect: 1
	~/mailbox
To: /PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
Expect: 1
	/PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
To: ggere, /tmp/mail.out, +mailbox, ~user/mailbox, ~/mailbox, /PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
Expect: 6
	ggere
	/tmp/mail.out
	+mailbox
	~user/mailbox
	~/mailbox
	/PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
To: ggere /tmp/mail.out +mailbox ~user/mailbox ~/mailbox /PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
Expect: 6
	ggere
	/tmp/mail.out
	+mailbox
	~user/mailbox
	~/mailbox
	/PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
To: (x)<y@a>(z)
Expect: 1
	y@a
Comment: as above, but strict
Strict: true
To: ggere /tmp/mail.out +mailbox ~user/mailbox ~/mailbox /PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
Expect: Exception jakarta.mail.internet.AddressException: Local address contains control or whitespace in string ``ggere /tmp/mail.out +mailbox ~user/mailbox ~/mailbox /PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay''
Strict: false
To: Mad Genius <george@boole>
Expect: 1
	george@boole
To: "C'est bien moche" <paris@france>
Expect: 1
	paris@france
To: "know, any, famous" <french@physicists>
Expect: 1
	french@physicists
To: laborious (But Bug Free)
Expect: 1
	laborious
To: confused (about, being, french)
Expect: 1
	confused
To: it (takes, no (time, at) all)
Expect: 1
	it
To: two@weeks (It Will Take)
Expect: 1
	two@weeks
To: it@is (brilliant (genius, and) superb)
Expect: 1
	it@is
To: if@you (could, see (almost, as, (badly, you) would) agree)
Expect: 1
	if@you
To: cannot@waste (My, Intellectual, Cycles)
Expect: 1
	cannot@waste
To: users:get,what,they,deserve;
Expect: 1
	users:get,what,they,deserve;
To: "C'est bien moche" <paris@france>, Mad Genius <george@boole>, two@weeks (It Will Take), /tmp/mail.out, laborious (But Bug Free), cannot@waste (My, Intellectual, Cycles), users:get,what,they,deserve;, it (takes, no (time, at) all), if@you (could, see (almost, as, (badly, you) would) agree), "know, any, famous" <French@physicists>, it@is (brilliant (genius, and) superb), confused (about, being, french)
Expect: 12
	paris@france
	george@boole
	two@weeks
	/tmp/mail.out
	laborious
	cannot@waste
	users:get,what,they,deserve;
	it
	if@you
	French@physicists
	it@is
	confused
To: ggere, /tmp/mail.out, +mailbox, ~user/mailbox, ~/mailbox, /PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay, "C'est bien moche" <paris@france>, Mad Genius <george@boole>, two@weeks (It Will Take), /tmp/mail.out, laborious (But Bug Free), cannot@waste (My, Intellectual, Cycles), users:get,what,they,deserve;, it (takes, no (time, at) all), if@you (could, see (almost, as, (badly, you) would) agree), "know, any, famous" <French@physicists>, it@is (brilliant (genius, and) superb), confused (about, being, french)
Expect: 18
	ggere
	/tmp/mail.out
	+mailbox
	~user/mailbox
	~/mailbox
	/PN=x400.address/PRMD=ibmmail/ADMD=ibmx400/C=us/@mhs-mci.ebay
	paris@france
	george@boole
	two@weeks
	/tmp/mail.out
	laborious
	cannot@waste
	users:get,what,they,deserve;
	it
	if@you
	French@physicists
	it@is
	confused
To: testa testb testc /tmp/mail.out ~ggere/mail.out testd teste
Expect: 7
	testa
	testb
	testc
	/tmp/mail.out
	~ggere/mail.out
	testd
	teste
Comment: as above, but strict
Strict: true
To: testa testb testc /tmp/mail.out ~ggere/mail.out testd teste
Expect: Exception jakarta.mail.internet.AddressException: Local address contains control or whitespace in string ``testa testb testc /tmp/mail.out ~ggere/mail.out testd teste''
Strict: false
To: testa, testb , testc /tmp/mail.out ,~ggere/mail.out, ,testd,teste,,,
Expect: 7
	testa
	testb
	testc
	/tmp/mail.out
	~ggere/mail.out
	testd
	teste
Comment: as above, but strict
Strict: true
To: testa, testb , testc /tmp/mail.out ,~ggere/mail.out, ,testd,teste,,,
Expect: Exception jakarta.mail.internet.AddressException: Local address contains control or whitespace in string ``testa testb testc /tmp/mail.out ~ggere/mail.out testd teste''
Strict: false
To: testa testb <testc@testd>
Expect: 1
	testc@testd
To: Adam S Moskowitz <adamm@onion.inset.com>,
        Andrew Gollan <adjg@softway.sw.OZ.AU>,
        Bret Anthony Marquis <bam@trout.nosc.MIL>,
        Bill Shannon <shannon@Sun.COM>, Bob Gray <rgray@UsWest.COM>,
        Brian Ellis <bri@Boulder.Colorado.EDU>,
        Don Coleman <coleman@legato.COM>,
        Dennis Ritchie <dmr@research.ATT.COM>, Evi Nemeth <evi@Colorado.EDU>,
        Lori Grob <grob@chorus.FR>, Paula Hawthorn <hawthorn@HPL.HP.COM>,
        Andrew Hume <andrew@research.ATT.COM>,
        Jaap Akkerhuis <jaap@research.ATT.COM>,
        Jim R Oldroyd <jr@onion.inset.com>,
        John Quarterman <jsq@longway.TIC.COM>,
        Judy DesHarnais <judy@USENIX.ORG>, Karen Shannon <kas@Eng>,
        Ken McDonell <kenj@Pyramid.COM>,
        Rob Kolstad <kolstad@rmtc.Central.Sun.COM>,
        Paul Kooros <kooros@tigger.cs.Colorado.EDU>,
        Robert Elz <kre@Munnari.OZ.AU>,
        Miriam Amos Nihart <miriam@decwet.enet.DEC.COM>,
        "Mike O'Dell" <mo@gizmo.Bellcore.COM>,
        Sharon Murrel <eowyn@research.ATT.COM>,
        Peg Schafer <peg@media-lab.media.MIT.EDU>, Peter Salus <peter@SUG.ORG>,
        Bill Shannon <shannon@Sun.COM>, Stu Feldman <sif@Bellcore.COM>,
        Stephen Williams <stevew@netboss1.trg.saic.com>,
        Teus Hagen <teus@oce.NL>, Trent Hein <trent@xor.COM>,
        Thomas Alan Wood <twood@capmkt.COM>,
        Michael Ubell <"mttam::ubell"@SFBay.ENet.DEC.COM>,
        Martha Zimet <zimet@Corp>
Expect: 34
	adamm@onion.inset.com
	adjg@softway.sw.OZ.AU
	bam@trout.nosc.MIL
	shannon@Sun.COM
	rgray@UsWest.COM
	bri@Boulder.Colorado.EDU
	coleman@legato.COM
	dmr@research.ATT.COM
	evi@Colorado.EDU
	grob@chorus.FR
	hawthorn@HPL.HP.COM
	andrew@research.ATT.COM
	jaap@research.ATT.COM
	jr@onion.inset.com
	jsq@longway.TIC.COM
	judy@USENIX.ORG
	kas@Eng
	kenj@Pyramid.COM
	kolstad@rmtc.Central.Sun.COM
	kooros@tigger.cs.Colorado.EDU
	kre@Munnari.OZ.AU
	miriam@decwet.enet.DEC.COM
	mo@gizmo.Bellcore.COM
	eowyn@research.ATT.COM
	peg@media-lab.media.MIT.EDU
	peter@SUG.ORG
	shannon@Sun.COM
	sif@Bellcore.COM
	stevew@netboss1.trg.saic.com
	teus@oce.NL
	trent@xor.COM
	twood@capmkt.COM
	"mttam::ubell"@SFBay.ENet.DEC.COM
	zimet@Corp
To: '"a,b"'
Expect: 1
	'"a,b"'
To: 'a, b'
Expect: 2
	'a
	b'
To: "a,b"
Expect: 1
	"a,b"
To: shakey!"a,b"
Expect: 1
	shakey!"a,b"
To: "foo bar"
Expect: 1
	"foo bar"
To: (Foo Bar) foo@bar
Expect: 1
	foo@bar
To: (Foo Bar) foo@bar, (My Name) my@name
Expect: 2
	foo@bar
	my@name
To: Ben Keitch <">"@openworld.co.uk> 
Expect: 1
	">"@openworld.co.uk
To: Ben Keitch <">\""\>@openworld.co.uk> 
Expect: 1
	">\""\>@openworld.co.uk
To: A Group:Chris Jones <c@a.test>,joe@where.test,John <jdoe@one.test>; 
Expect: 1
	A Group:Chris Jones <c@a.test>,joe@where.test,John <jdoe@one.test>;
To: Undisclosed-Recipients:;
Expect: 1
	Undisclosed-Recipients:;
To:  "Mark Hapner" <mark.hapner@eng.sun.com>, <mark.himelstein@eng.sun.com>
Expect: 2
	mark.hapner@eng.sun.com
	mark.himelstein@eng.sun.com
To: <rem@rockit> (Ralph Miller), <shannon@datsun> (Bill Shannon)
Expect: 2
	rem@rockit
	shannon@datsun
To: "" <javamail@sun.com>
Expect: 1
	javamail@sun.com
To: sun!joe (joe@sun)
Expect: 1
	sun!joe
To: "john doe" (john.doe@a.com)
Expect: 1
	"john doe"
To: (test domain literal verification) b@[1.2.3.4]
Expect: 1
	b@[1.2.3.4]
Comment: parsed as a header, we pick out the address from the "comment"
Header: true
To: "john doe" (john.doe@a.com)
Expect: 1
	john.doe@a.com
Comment: test that headers are unfolded before parsing
To: "John
	Smith" <jsmith@
	crappy-email-archiving-company.com>
Expect: 1
	jsmith@	crappy-email-archiving-company.com
Header: false
To: (Test) <djoe@zimbra.com>,djoe@zimbra.com (Test) 
Expect: 2
	djoe@zimbra.com
	djoe@zimbra.com
Comment:
	All the following addresses are bad.
To: ,
Expect: 0
To: <
Expect: Exception jakarta.mail.internet.AddressException: Missing '>' in string ``<'' at position 1
To: >
Expect: Exception jakarta.mail.internet.AddressException: Missing '<' in string ``>'' at position 0
To: "
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"'' at position 1
To: >>>
Expect: Exception jakarta.mail.internet.AddressException: Missing '<' in string ``>>>'' at position 0
To: <<<
Expect: Exception jakarta.mail.internet.AddressException: Missing '>' in string ``<<<'' at position 3
To: paris@france>
Expect: Exception jakarta.mail.internet.AddressException: Missing '<' in string ``paris@france>'' at position 12
To: "C'est bien moche <paris@france>
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"C'est bien moche <paris@france>'' at position 32
To: "C'est bien moche" <paris@france
Expect: Exception jakarta.mail.internet.AddressException: Missing '>' in string ``"C'est bien moche" <paris@france'' at position 32
To: "C'est bien moche" paris@france>
Expect: Exception jakarta.mail.internet.AddressException: Missing '<' in string ``"C'est bien moche" paris@france>'' at position 31
To: "C'est bien moche" <paris@>
Expect: Exception jakarta.mail.internet.AddressException: Missing domain in string ``paris@''
To: laborious but (Bug Free)
Expect: Exception jakarta.mail.internet.AddressException: Local address contains control or whitespace in string ``laborious but''
To: confused (about, being, french
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``confused (about, being, french'' at position 30
To: it@is (brilliant (genius, and superb)
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``it@is (brilliant (genius, and superb)'' at position 37
To: it@is (brilliant (genius), and superb
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``it@is (brilliant (genius), and superb'' at position 37
To: if@you (could, see (almost, as, (badly, you would) agree)
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``if@you (could, see (almost, as, (badly, you would) agree)'' at position 57
To: if@you (could, see (almost, as, (badly, you) would) agree
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``if@you (could, see (almost, as, (badly, you) would) agree'' at position 57
To: two@ (It Will Take)
Expect: Exception jakarta.mail.internet.AddressException: Missing domain in string ``two@''
To: two@
Expect: Exception jakarta.mail.internet.AddressException: Missing domain in string ``two@''
To: two@weeks (It Will Take
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``two@weeks (It Will Take'' at position 23
To: <paris@france
Expect: Exception jakarta.mail.internet.AddressException: Missing '>' in string ``<paris@france'' at position 13
To: paris@france>
Expect: Exception jakarta.mail.internet.AddressException: Missing '<' in string ``paris@france>'' at position 12
To: @france
Expect: Exception jakarta.mail.internet.AddressException: Missing local name in string ``@france''
To: @
Expect: Exception jakarta.mail.internet.AddressException: Missing local name in string ``@''
To: <
Expect: Exception jakarta.mail.internet.AddressException: Missing '>' in string ``<'' at position 1
To: >
Expect: Exception jakarta.mail.internet.AddressException: Missing '<' in string ``>'' at position 0
To: (
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``('' at position 1
To: )
Expect: Exception jakarta.mail.internet.AddressException: Missing '(' in string ``)'' at position 0
To: "
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"'' at position 1
To: friends-list:;@mastodon.CS.Berkeley.EDU
Expect: Exception jakarta.mail.internet.AddressException: Missing local name in string ``@mastodon.CS.Berkeley.EDU''
To: a@.com
Expect: Exception jakarta.mail.internet.AddressException: Domain starts with dot in string ``a@.com''
To: a@com.
Expect: Exception jakarta.mail.internet.AddressException: Domain ends with dot in string ``a@com.''
To: a@b..com
Expect: Exception jakarta.mail.internet.AddressException: Domain contains dot-dot in string ``a@b..com''
To: .a@b.com
Expect: Exception jakarta.mail.internet.AddressException: Local address starts with dot in string ``.a@b.com''
To: a.@b.com
Expect: Exception jakarta.mail.internet.AddressException: Local address ends with dot in string ``a.@b.com''
To: a..b@b.com
Expect: Exception jakarta.mail.internet.AddressException: Local address contains dot-dot in string ``a..b@b.com''
To: a@com
Expect: Exception jakarta.mail.internet.AddressException: Domain contains control or whitespace in string ``a@com''
To: a@b.com
Expect: Exception jakarta.mail.internet.AddressException: Local address contains control or whitespace in string ``a@b.com''
To: ab
Expect: Exception jakarta.mail.internet.AddressException: Local address contains control or whitespace in string ``ab''
To: @b.com
Expect: Exception jakarta.mail.internet.AddressException: Missing local name in string ``@b.com''
To: javamail@Sun.COM;
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``javamail@Sun.COM;'' at position 16
To: Undisclosed-Recipient:;@jupiter.activeisp.com;;;;;
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``Undisclosed-Recipient:;@jupiter.activeisp.com;;;;;'' at position 45
To: Undisclosed-Recipient:;@java.sun.com;;;
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``Undisclosed-Recipient:;@java.sun.com;;;'' at position 36
To: "bejjzcfr@aol.com
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"bejjzcfr@aol.com'' at position 17
To: "butbp@msn.com
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"butbp@msn.com'' at position 14
To: "@msn.com
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"@msn.com'' at position 9
To: "@starband.net
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"@starband.net'' at position 14
To: jko23l1@klds.java.sun.com;, ad@java.sun.com
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``jko23l1@klds.java.sun.com;, ad@java.sun.com'' at position 25
To: jko23l1@klds;ad;;;;
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``jko23l1@klds;ad;;;;'' at position 12
To: mailto:mailto:snoa101custserv@hotmail.com
Expect: Exception jakarta.mail.internet.AddressException: Nested group in string ``mailto:mailto:snoa101custserv@hotmail.com'' at position 13
To: mailto:mailto:snoa101custserv@hotmail.com, foo@bar.com
Expect: Exception jakarta.mail.internet.AddressException: Nested group in string ``mailto:mailto:snoa101custserv@hotmail.com, foo@bar.com'' at position 13
To: "@foo.com, a@b.com
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"@foo.com, a@b.com'' at position 18
To: <@foo.com, a@b.com
Expect: Exception jakarta.mail.internet.AddressException: Missing '>' in string ``<@foo.com, a@b.com'' at position 18
To: <a@b.com> <c@d.com>
Expect: Exception jakarta.mail.internet.AddressException: Extra route-addr in string ``<a@b.com> <c@d.com>'' at position 10
To: yyiohohjjlj[ojolhji@hotmail.com
Expect: Exception jakarta.mail.internet.AddressException: Missing ']' in string ``yyiohohjjlj[ojolhji@hotmail.com'' at position 31
To: www.adslexpress.com.tw--?????q?H?[?o??-0@kathmandu.sun.com
Expect: Exception jakarta.mail.internet.AddressException: Missing ']' in string ``www.adslexpress.com.tw--?????q?H?[?o??-0@kathmandu.sun.com'' at position 58
Cc: webmail.hinet.net@nwkea-mail-1.sun.com (中華網頁郵件),
   www.adslexpress.com.tw--中華電信加油站-0@nwkea-mail-1.sun.com,
   www.cityfamily.com.tw---網路同學會-0@nwkea-mail-1.sun.com
Expect: Exception jakarta.mail.internet.AddressException: Missing ']' in string ``webmail.hinet.net@nwkea-mail-1.sun.com (?????????l??),
   www.adslexpress.com.tw--?????q?H?[?o??-0@nwkea-mail-1.sun.com,
   www.cityfamily.com.tw---?????P???|-0@nwkea-mail-1.sun.com'' at position 181
To: www.adslexpress.com.tw--中華電信加油站-0@patan.sun.com
Expect: Exception jakarta.mail.internet.AddressException: Missing ']' in string ``www.adslexpress.com.tw--?????q?H?[?o??-0@patan.sun.com'' at position 54
To: Giant.White.Beans;Great.Northern.Beans;Lima.Beans;Navy.Beans@4email-03;;;;;;;;;;;;;;;;;;
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``Giant.White.Beans;Great.Northern.Beans;Lima.Beans;Navy.Beans@4email-03;;;;;;;;;;;;;;;;;;'' at position 17
To: \(^^/@nwkea-mail-2.sun.com
Expect: Exception jakarta.mail.internet.AddressException: Missing ')' in string ``\(^^/@nwkea-mail-2.sun.com'' at position 26
Cc: <tom.ross@sun.com>, Cc: <javamail@sun.com>, Cc: <javahi@sun.com>,
   Cc: <javadoc-tool@sun.com>, Cc: <javacard-feedback@sun.com>
Expect: Exception jakarta.mail.internet.AddressException: Nested group in string ``<tom.ross@sun.com>, Cc: <javamail@sun.com>, Cc: <javahi@sun.com>,
   Cc: <javadoc-tool@sun.com>, Cc: <javacard-feedback@sun.com>'' at position 46
From: <hello@sun.com>, java2d-interest@sun.com, java3d-interest@sun.com,
	javadoc-tool@sun.com, javamail@sun.com, javasound-interest@sun.com,
	javaspeech-interest@sun.com, jdbc@sun.com, jim.cook@sun.com,
	joachim.heck@sun.com, kammy@sun.com, kenneth.cheung@sun.com,
	Wed@brmea-mail-3.sun.com, multipart/alternative@brmea-mail-3.sun.com,
	text/html@brmea-mail-3.sun.com;
Expect: Exception jakarta.mail.internet.AddressException: Illegal semicolon, not in group in string ``<hello@sun.com>, java2d-interest@sun.com, java3d-interest@sun.com,
	javadoc-tool@sun.com, javamail@sun.com, javasound-interest@sun.com,
	javaspeech-interest@sun.com, jdbc@sun.com, jim.cook@sun.com,
	joachim.heck@sun.com, kammy@sun.com, kenneth.cheung@sun.com,
	Wed@brmea-mail-3.sun.com, multipart/alternative@brmea-mail-3.sun.com,
	text/html@brmea-mail-3.sun.com;'' at position 362
To: "???Y???z???~?j?q?n??
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"???Y???z???~?j?q?n??'' at position 21
To: "ZETA CELULARES
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"ZETA CELULARES'' at position 15
To: "Investigaci?n para el desarrollo de micro-emprendimientos Schreiber TE 4431-7050
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"Investigaci?n para el desarrollo de micro-emprendimientos Schreiber TE 4431-7050'' at position 81
To: "Aproveche*
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"Aproveche*'' at position 11
To: "ULTIMA. OPORTUNIDAD*
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``"ULTIMA. OPORTUNIDAD*'' at position 21
Cc: 55:55@07, 57:18@07, 36:39@10, 36:42@10, streetwalker!1987, streetwalker!5,
        streetwalker!87, <8710051455.AA08484@oak.sunecd.com>, <oak!kinnear>,
        streetwalker!AA00159;, streetwalker!AA08484;, streetwalker!AA16178;,
        streetwalker!Date:, streetwalker!EDT, streetwalker!Ecd.Sun.COM,
        streetwalker!From, streetwalker!From:, streetwalker!Message-Id:,
        streetwalker!Mon, streetwalker!Oct, streetwalker!PDT, streetwalker!RO,
        streetwalker!Received:, streetwalker!Return-Path:,
        streetwalker!Status:, streetwalker!To:, streetwalker!by,
        streetwalker!from, streetwalker!id, streetwalker!oak.sunecd.com,
        streetwalker!root, streetwalker!rr, streetwalker!streetwalker.sun.com
Expect: Exception jakarta.mail.internet.AddressException: Nested group in string ``55:55@07, 57:18@07, 36:39@10, 36:42@10, streetwalker!1987, streetwalker!5,
        streetwalker!87, <8710051455.AA08484@oak.sunecd.com>, <oak!kinnear>,
        streetwalker!AA00159;, streetwalker!AA08484;, streetwalker!AA16178;,
        streetwalker!Date:, streetwalker!EDT, streetwalker!Ecd.Sun.COM,
        streetwalker!From, streetwalker!From:, streetwalker!Message-Id:,
        streetwalker!Mon, streetwalker!Oct, streetwalker!PDT, streetwalker!RO,
        streetwalker!Received:, streetwalker!Return-Path:,
        streetwalker!Status:, streetwalker!To:, streetwalker!by,
        streetwalker!from, streetwalker!id, streetwalker!oak.sunecd.com,
        streetwalker!root, streetwalker!rr, streetwalker!streetwalker.sun.com'' at position 12
To: Re:@cachaca, Subject:@cachaca, and@cachaca, getmclist@cachaca, glenn@ivrel,
        iconv@cachaca, questions@cachaca
Expect: Exception jakarta.mail.internet.AddressException: Nested group in string ``Re:@cachaca, Subject:@cachaca, and@cachaca, getmclist@cachaca, glenn@ivrel,
        iconv@cachaca, questions@cachaca'' at position 20
To: " <string@string.ru>  
Expect: Exception jakarta.mail.internet.AddressException: Missing '"' in string ``" <string@string.ru>  '' at position 22
To: [xxx]foo@bar.org
Expect: Exception in thread "main" jakarta.mail.internet.AddressException: Local address contains illegal character in string ``[xxx]foo@bar.org''
Comment:
	Now parse all the above bad addresses as if they were in a header,
	expecting no failures.
Header: true
To: ,
Expect: 0
To: <
Expect: 1
	<
To: >
Expect: 1
	>
To: "
Expect: 1
	"
To: >>>
Expect: 1
	>>>
To: <<<
Expect: 1
	<<<
To: paris@france>
Expect: 1
	paris@france>
To: "C'est bien moche <paris@france>
Expect: 1
	paris@france
To: "C'est bien moche" <paris@france
Expect: 1
	"C'est bien moche" <paris@france
To: "C'est bien moche" paris@france>
Expect: 1
	"C'est bien moche" paris@france>
To: "C'est bien moche" <paris@>
Expect: 1
	paris@
To: laborious but (Bug Free)
Expect: 1
	laborious but
To: confused (about, being, french
Expect: 3
	confused
	being
	french
To: it@is (brilliant (genius, and superb)
Expect: 1
	it@is
To: it@is (brilliant (genius), and superb
Expect: 2
	it@is
	and superb
To: if@you (could, see (almost, as, (badly, you would) agree)
Expect: 2
	if@you
	see
To: if@you (could, see (almost, as, (badly, you) would) agree
Expect: 2
	if@you
	see
To: two@ (It Will Take)
Expect: 1
	two@
To: two@
Expect: 1
	two@
To: two@weeks (It Will Take
Expect: 1
	two@weeks
To: <paris@france
Expect: 1
	<paris@france
To: paris@france>
Expect: 1
	paris@france>
To: @france
Expect: 1
	@france
To: @
Expect: 1
	@
To: <
Expect: 1
	<
To: >
Expect: 1
	>
To: (
Expect: 0
To: )
Expect: 1
	)
To: "
Expect: 1
	"
To: friends-list:;@mastodon.CS.Berkeley.EDU
Expect: 1
	friends-list:;@mastodon.CS.Berkeley.EDU
To: a@.com
Expect: 1
	a@.com
To: a@com.
Expect: 1
	a@com.
To: a@b..com
Expect: 1
	a@b..com
To: a@com
Expect: 1
	a@com
To: a@b.com
Expect: 1
	a@b.com
To: ab
Expect: 1
	ab
To: @b.com
Expect: 1
	@b.com
To: javamail@Sun.COM;
Expect: 1
	javamail@Sun.COM
To: Undisclosed-Recipient:;@jupiter.activeisp.com;;;;;
Expect: 1
	Undisclosed-Recipient:;@jupiter.activeisp.com
To: Undisclosed-Recipient:;@java.sun.com;;;
Expect: 1
	Undisclosed-Recipient:;@java.sun.com
To: "bejjzcfr@aol.com
Expect: 1
	"bejjzcfr@aol.com
To: "butbp@msn.com
Expect: 1
	"butbp@msn.com
To: "@msn.com
Expect: 1
	"@msn.com
To: "@starband.net
Expect: 1
	"@starband.net
To: jko23l1@klds.java.sun.com;, ad@java.sun.com
Expect: 2
	jko23l1@klds.java.sun.com
	ad@java.sun.com
To: jko23l1@klds;ad;;;;
Expect: 2
	jko23l1@klds
	ad
To: mailto:mailto:snoa101custserv@hotmail.com
Expect: 1
	snoa101custserv@hotmail.com
To: mailto:mailto:snoa101custserv@hotmail.com, foo@bar.com
Expect: 2
	snoa101custserv@hotmail.com
	foo@bar.com
To: "@foo.com, a@b.com
Expect: 2
	"@foo.com
	a@b.com
To: <@foo.com, a@b.com
Expect: 2
	<@foo.com
	a@b.com
To: <a@b.com> <c@d.com>
Expect: 2
	a@b.com
	c@d.com
To: yyiohohjjlj[ojolhji@hotmail.com
Expect: 1
	yyiohohjjlj[ojolhji@hotmail.com
To: www.adslexpress.com.tw--?????q?H?[?o??-0@kathmandu.sun.com
Expect: 1
	www.adslexpress.com.tw--?????q?H?[?o??-0@kathmandu.sun.com
Cc: webmail.hinet.net@nwkea-mail-1.sun.com (中華網頁郵件),
   www.adslexpress.com.tw--中華電信加油站-0@nwkea-mail-1.sun.com,
   www.cityfamily.com.tw---網路同學會-0@nwkea-mail-1.sun.com
Expect: 3
	webmail.hinet.net@nwkea-mail-1.sun.com
	www.adslexpress.com.tw--中華電信加油站-0@nwkea-mail-1.sun.com
	www.cityfamily.com.tw---網路同學會-0@nwkea-mail-1.sun.com
From: ?R?a????@patan.sun.com
Expect: 1
	?R?a????@patan.sun.com
To: www.adslexpress.com.tw--?????q?H?[?o??-0@patan.sun.com
Expect: 1
	www.adslexpress.com.tw--?????q?H?[?o??-0@patan.sun.com
To: Giant.White.Beans;Great.Northern.Beans;Lima.Beans;Navy.Beans@4email-03;;;;;;;;;;;;;;;;;;
Expect: 4
	Giant.White.Beans
	Great.Northern.Beans
	Lima.Beans
	Navy.Beans@4email-03
To: \(^^/@nwkea-mail-2.sun.com
Expect: 1
	\\
Cc: <tom.ross@sun.com>, Cc: <javamail@sun.com>, Cc: <javahi@sun.com>,
   Cc: <javadoc-tool@sun.com>, Cc: <javacard-feedback@sun.com>
Expect: 5
	tom.ross@sun.com
	javamail@sun.com
	javahi@sun.com
	javadoc-tool@sun.com
	javacard-feedback@sun.com
From: <hello@sun.com>, java2d-interest@sun.com, java3d-interest@sun.com,
	javadoc-tool@sun.com, javamail@sun.com, javasound-interest@sun.com,
	javaspeech-interest@sun.com, jdbc@sun.com, jim.cook@sun.com,
	joachim.heck@sun.com, kammy@sun.com, kenneth.cheung@sun.com,
	Wed@brmea-mail-3.sun.com, multipart/alternative@brmea-mail-3.sun.com,
	text/html@brmea-mail-3.sun.com;
Expect: 15
	hello@sun.com
	java2d-interest@sun.com
	java3d-interest@sun.com
	javadoc-tool@sun.com
	javamail@sun.com
	javasound-interest@sun.com
	javaspeech-interest@sun.com
	jdbc@sun.com
	jim.cook@sun.com
	joachim.heck@sun.com
	kammy@sun.com
	kenneth.cheung@sun.com
	Wed@brmea-mail-3.sun.com
	multipart/alternative@brmea-mail-3.sun.com
	text/html@brmea-mail-3.sun.com
To: "???Y???z???~?j?q?n??
Expect: 1
	"???Y???z???~?j?q?n??
To: "ZETA CELULARES
Expect: 1
	"ZETA CELULARES
To: "Investigaci?n para el desarrollo de micro-emprendimientos Schreiber TE 4431-7050
Expect: 1
	"Investigaci?n para el desarrollo de micro-emprendimientos Schreiber TE 4431-7050
To: "Aproveche*
Expect: 1
	"Aproveche*
To: "ULTIMA. OPORTUNIDAD*
Expect: 1
	"ULTIMA. OPORTUNIDAD*
Cc: 55:55@07, 57:18@07, 36:39@10, 36:42@10, streetwalker!1987, streetwalker!5,
        streetwalker!87, <8710051455.AA08484@oak.sunecd.com>, <oak!kinnear>,
        streetwalker!AA00159;, streetwalker!AA08484;, streetwalker!AA16178;,
        streetwalker!Date:, streetwalker!EDT, streetwalker!Ecd.Sun.COM,
        streetwalker!From, streetwalker!From:, streetwalker!Message-Id:,
        streetwalker!Mon, streetwalker!Oct, streetwalker!PDT, streetwalker!RO,
        streetwalker!Received:, streetwalker!Return-Path:,
        streetwalker!Status:, streetwalker!To:, streetwalker!by,
        streetwalker!from, streetwalker!id, streetwalker!oak.sunecd.com,
        streetwalker!root, streetwalker!rr, streetwalker!streetwalker.sun.com
Expect: 24
	55:55@07, 57:18@07, 36:39@10, 36:42@10, streetwalker!1987, streetwalker!5,        streetwalker!87, <8710051455.AA08484@oak.sunecd.com>, <oak!kinnear>,        streetwalker!AA00159;
	streetwalker!AA08484
	streetwalker!AA16178
	streetwalker!Date:
	streetwalker!EDT
	streetwalker!Ecd.Sun.COM
	streetwalker!From
	streetwalker!From:
	streetwalker!Message-Id:
	streetwalker!Mon
	streetwalker!Oct
	streetwalker!PDT
	streetwalker!RO
	streetwalker!Received:
	streetwalker!Return-Path:
	streetwalker!Status:
	streetwalker!To:
	streetwalker!by
	streetwalker!from
	streetwalker!id
	streetwalker!oak.sunecd.com
	streetwalker!root
	streetwalker!rr
	streetwalker!streetwalker.sun.com
To: Re:@cachaca, Subject:@cachaca, and@cachaca, getmclist@cachaca, glenn@ivrel,
        iconv@cachaca, questions@cachaca
Expect: 7
	@cachaca
	@cachaca
	and@cachaca
	getmclist@cachaca
	glenn@ivrel
	iconv@cachaca
	questions@cachaca
To: " <string@string.ru>  
Expect: 1
	string@string.ru
Header: false
Strict: true
To: ".foo"@example.com
Expect: 1
	".foo"@example.com
To: "foo."@example.com
Expect: 1
	"foo."@example.com
To: "foo..bar"@example.com
Expect: 1
	"foo..bar"@example.com
To: "foo..bar".baz@example.com
Expect: 1
	"foo..bar".baz@example.com
