This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mailbox.MH crashes on certain Claws Mail .mh_sequences files
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: garrettzilla, r.david.murray
Priority: normal Keywords:

Created on 2016-10-18 22:39 by garrettzilla, last changed 2022-04-11 14:58 by admin.

Messages (7)
msg278945 - (view) Author: Garrett Nievin (garrettzilla) Date: 2016-10-18 22:39
Using Claws Mail, and mailbox.MH crashes on two different conditions:

1) sequence spans lines, suchly:
unseen: 1-222 225-300
990-1024 1048-2048

Not Pythonic, but I fixed it with this update:

    def get_sequences(self):
        """Return a name-to-key-list dictionary to define each sequence."""
        results = {}
        with open(os.path.join(self._path, '.mh_sequences'), 'r', encoding='ASCII') as f:
            all_keys = set(self.keys())
            for line in f:
                try:
                    if line.count(':') == 0:
                        contents = line
                    else:
                        name, contents = line.split(':')
                        keys = set()
                    for spec in contents.split():
                        if spec.isdigit():
                            keys.add(int(spec))



2) Sequence spec appears to be open-ended on the front:
 28119-28123 28127 28129 28131 28133-28142 28144-28154 28156-28172 28174-28189 28191-28204 28206-28218 28220-28224 28226 28228-28234 28237-28239
 28119-28123 28127 28129 28131 28133-28142 28144-28154 28156-28163
 28119-28123 28127 28129 28131 28133-28157
-27920 27923-27945 27947

I'm not sure how to interpret this, so just put in a kludgy fix to get my script running as a workaround (not using sequences).

Would also be interested in an option to open a mailbox and process while ignoring sequences.
msg278954 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-10-19 00:28
What do you mean by "crashes"?  I'm sure you don't mean a segfault.  Can you paste the traceback?

Neither of those two cases are valid in mh, as far as I know, so I'm not sure there is anything to fix here.
msg278955 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-10-19 00:43
I just checked, and nhm 1.3 produces a warning for case 1 and either fails to interpret anything past a token that starts with a '-' or it hangs. You should report the invalid sequence problem to claws mail.
msg278972 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-10-19 13:26
I meant 'nmh'.  Also, if the problem is that mailbox blows up on an .mh_sequences file with bad records and doesn't provide any way to access the valid records (like nmh mostly manages to do), then that is something that could be fixed, and we can reopen the issue.
msg279683 - (view) Author: Garrett Nievin (garrettzilla) Date: 2016-10-29 16:40
Yes, I couldn't access the mailbox at all.  Here's what happens:

$ cat mymail.py ; ./mymail.py 
#!/usr/bin/python3
import mailbox
for message in mailbox.MH('~/mail/Personal'):
    print(message['subject'])
Traceback (most recent call last):
  File "/usr/lib/python3.5/mailbox.py", line 1148, in get_sequences
    name, contents = line.split(':')
ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./mymail.py", line 3, in <module>
    for message in mailbox.MH('~/mail/Personal'):
  File "/usr/lib/python3.5/mailbox.py", line 108, in itervalues
    value = self[key]
  File "/usr/lib/python3.5/mailbox.py", line 72, in __getitem__
    return self.get_message(key)
  File "/usr/lib/python3.5/mailbox.py", line 1037, in get_message
    for name, key_list in self.get_sequences().items():
  File "/usr/lib/python3.5/mailbox.py", line 1162, in get_sequences
    line.rstrip())
mailbox.FormatError: Invalid sequence specification: 74 27976-27984 27987-27989 27993-27994 27996-28008 28010-28023 28025 28027-28035 28038-28054 28056-28077 28080-28104 28107-28109 28112-28117 28120-28123 28127 28129 28131 28133-28142 28145-28154 28156-28189 28191-28197 28199-28204 28206-28218 28220-28224 28226 28230-28234 28239-28242 28244-28249 28251 28253-28260 28262-28263 28265-28269 28274-28280 28282-28286 28290-28297 28300-28306 28308-28351 28354-28362 28364-28421 28423-28437 28440 28448-28452 28457-28461 28464-28475 28478-28482 28484-28489 28491-28498 28500-28504 28507-28517 28522-28525 28527-28529 28531 28536-28550 28554-28555 28562-28564 28567-28574 28577-28579 28581-28582 28586 28588-28594 28597-28603 28605-28613 28619 28622 28625-28628 28630 28632-28633 28636-28639 28643-28650 28654-28668 28671-28672 28676-28679 28681-28690 28695-28706 28710-28712 28714 28716-28717 28719-28725 28728-28730 28732-28742 28745-28748 28750-28751 28753-28763 28765-28768 28770 28772-28814 28817-28840 28843-28859 28862-28873 28876-28894 28899-28900 28902-28917 28920-28934 28936-28939 28941-28943 28945 28949-28954 28956-28959 28963-28976 28984-28988 28990-28995 28997-29017 29021-29028 29030-29068 29070-29073 29076-29083 29088 29099 29102-29104 29106-29107 29109-29119 29121-29139 29142 29144-29145 29149 29154 29163-29164 29167-29172 29174-29175 29180-29183 29189-29200 29202-29213 29215-29223 29226-29227 29230 29232-29244 29246-29253 29258-29282 29284-29294 29296-29307 29309 29311-29319 29326-29342 29345-29351 29354-29364 29371-29382 29387-29390 29393-29414 29416-29419 29421 29423-29445 29448-29486 29488-29495 29497-29507 29509-29519 29521-29539 29541-29554 29556-29557 29559-29563 29566-29571 29575-29589 29593-29601 29604-29609 29611-29617 29620-29622 29624-29647 29650-29651 29653-29664 29666-29674 29676-29683 29689-29694 29696-29701 29704-29705 29709-29711 29714-29730 29733-29751 29754 29756-29758 29760-29762 29764-29768 29770-29771 29773-29780 29782-29784 29787 29790-29805 29807-29808 29811-29819 29822-29826 29829-29831 29834-29843 29845-29848 29850-29853 29855-29864 29870 29873-29891 29893-29942 29944-29962 29970-29972 29974-29975 29977-29981 29986-29988 29992-29996 29999-30002 30006-30008 30010 30014-30039 30041-30072 30075-30087 30089-30090 30093-30142 30145-30156 30158-30171 30174-30177 30180-30194 30197 30202-30203 30206-30214 30216 30218-30227 30230-30236 30239-30277 30282-30284 30288-30316 30322-30341 30343-30373 30376-30386 30388-30405 30407-30412 30417-30418 30421-30445 30449-30452 30456-30463 30468-30488 30492-30500 30502-30510 30516-30530 30532-30538 30540-30543 30546-30548 30551 30553-30576 30578-30608 30613 30616-30618 30620-30632 30635-30639 30646-30648 30650-30651 30655-30673 30675 30678-30681 30685-30693 30695-30738 30741-30742 30745 30747 30749-30757 30760-30782 30784 30786-30792 30794-30800 30803-30809 30812-30826 30828-30837 30840-30841 30843-30847 30850-30893 30897-30898 30900 30902-30904 30906-30920 30922-30932 30938 30943-30984 30986-30990 30992-30994 30996-31001 31003-31013 31015-31018 31021-31036 31039 31043-31047 31051-31061 31064-31068 31070 31073-31074 31077-31088 31093-31095 31097-31105 31108-31115 31117 31119-31144 31147-31156 31163 31166-31181 31184-31185 31189 31191 31196-31204 31208 31210-31219 31221-31230 31232-31296 31299 31301-31308 31312-31321 31324-31327 31329-31346 31349-31368 31371-31375 31378-31387 31391-31397 31400-31401 31403-31409 31412-31423 31426-31522 31525-31534 31539-31549 31554-31555 31557-31558 31560-31584 31589-31618 31621-31637 31640-31648 31656-31669 31671-31680 31683 31685-31696 31698-31706 31708-31717 31719-31738 31740-31749 31751-31752 31755-31756 31758-31764 31766-31767 31772-31775 31777-31796 31798-31828 31830-31880 31884-31886 31888-31890 31892-31958 31961-31963 31966-31992 31996-31998 32000-32003 32006-32025 32029-32037 32039-32044 32047-32053 32056-32069 32071-32073 32075-32082 32084-32092 32095 32097-32101 32106-32136 32138 32141 32145-32156 32163-32181 32184-32199 32202-32205 32208-32212 32215-32260 32262-32284 32287-32301 32304-32352 32359-32446 32448-32456 32458-32467 32469-32472 32474-32494 32497-32611 32614-32633 32636-32665 32669-32719 32721-32743 32747-32789 32791-32794 32797-32806 32808-32819 32822 32824 32827 32829-32830 32832-32842 32846 32849-32853 32855-32862 32864-32867 32870-32871 32877-32881 32885-32886 32892-32898 32900-32912 32914-32986 32988 32991-33014 33016-33021 33023-33030 33032-33048 33051-33058 33060-33084 33087 33089-33090 33093-33098 33100-33121 33124-33127 33130-33143 33145 33147-33158 33160-33183 33187-33232 33235-33269 33271-33273 33275-33299 33302-33303 33305-33338 33341-33370 33374-33392 33394 33396-33397 33399-33405 33407-33408 33410-33422 33424-33432 33434-33440 33442-33446 33448-33462 33465-33480 33484-33551 33553-33568 33570-33575 33577-33578 33580-33589 33592-33605 33607-33613 33615-33625 33627-33635 33637-33646 33649-33652 33654-33657 33659-33667 33670-33700 33702-33705 33707-33710 33712-33743 33745-33774 33776-33782 33784 33786 33789-33794 33796-33827 33829-33858 33864 33866-33879 33882-33883 33885-33899 33901-33902 33904-33906 33909-33929 33932-33948 33950-33951 33953 33956-33983 33985-34002 34004 34006-34015 34019-34035 34039-34048 34051-34068 34072-34079 34081-34085 34087-34088 34091 34093 34096-34099 34102-34115 34117-34121 34126-34135 34139-34144 34147-34152 34154-34201 34204-34207 34209 34215-34220 34224-34247 34250-34287 34289 34293 34295-34296 34298 34300 34302-34309 34312-34353 34364-34368 34371-34375 34377-34383 34385-34411 34417-34457 34459-34472 34474-34479 34481-34517 34521-34589 34591-34610 34612-34629 34631 34633-34646 34648-34672 34675-34689 34691-34700 34703-34723 34727 34729 34731-34732 34735-34736 34739-34744 34749-34754 34757-34772 34776-34778 34780-34785 34787 34790 34792-34819 34821-34828 34830-34862 34865-34871 34873 34875 34877 34879-34883 34885-34903 34905 34909-34911 34913-34930 34932-34961 34964-35001 35003-35004 35007 35009-35033 35035-35048 35050-35058 35061-35062 35064 35068-35077 35079-35083 35087-35091 35093-35095 35098-35136 35138-35141 35144-35222 35224 35226 35230-35250 35255-35310 35312-35333 35336-35345 35348-35361 35366-35374 35379 35381-35382 35384-35390 35392-35397 35400-35403 35405-35411 35420-35479 35485-35500 35502 35504-35513 35518-35521 35524-35528 35531-35538 35540 35543-35553 35557-35571 35573 35576-35586 35589-35609 35611-35621 35623-35624 35626-35640 35642 35644-35645 35647-35648 35650-35651 35653-35659 35661-35666 35668-35672 35674 35676-35678 35680 35684 35686-35687 35689 35692 35694 35701-35702 35704 35707-35709 35711-35712 35729 35734 35740 35744 35746-35749 35754-35755 35760-35762 35766 35770-35772 35774-35775 35777 35780-35787 35791 35794-35798 35801-35854 35857 35860-35868 35871-35880 35882-35885 35889 35894-35921 35923 35926-35942 35944-35954 35957-35988 35990-35991 35993-36008 36010-36012 36014-36071 36073-36083 36085-36128 36131-36146 36151-36163 36165 36170 36174-36181 36183-36206 36208 36212 36215-36222 36224-36227 36232-36242 36247 36249-36271 36273 36276-36383 36385-36393 36395-36401 36404-36405 36408-36415 36417-36422 36424 36426-36433 36435-36441 36443 36445-36459 36463-36473 36476-36481 36485 36487 36489-36502 36505-36508 36510-36537 36540-36556 36558-36561 36564-36567 36569-36576 36578-36625 36627 36629-36636 36638-36657 36662 36665-36666 36668-36671 36673-36686 36688-36695 36697 36701-36706 36708-36714 36721-36734 36741-36747 36753-36757 36759-36761 36763-36780 36782-36783 36785-36812 36814 36816 36818-36821 36824-36849 36851-36853 36855-36865 36869 36871 36873 36875-36876 36880 36882 36884-36885 36887-36888 36890 36893 36896-36901 36903-36904 36906-36919 36923 36927 36930 36932 36936-36949 36952 36954-37040 37042-37055 37057-37062 37064-37229 37231-37251 37254-37286 37288-37294 37296-37299 37301-37304 37306-37310 37312-37321 37323-37324 37327-37336 37338-37339 37341-37364 37369 37371 37376 37378 37380-37385 37387-37401 37406-37412 37414-37430 37433-37434 37437-37438 37440-37457 37459-37462 37465 37467-37482 37484-37490 37493-37525 37527-37531 37533-37541 37543-37553 37555-37588 37592-37626 37629-37637 37639-37640 37643-37657 37663-37664 37668-37681 37683 37685-37712 37714-37719 37721
-37723 37725 37728-37730 37732-37742 37745-37753 37757-37759 37761-37766 37768-37798 37800-37822 37824-37826 37828 37830-37831 37833-37836 37838-37840 37842-37843 37846-37852 37856-37891 37893 37897 37899-37912 37918-37925 37927-37928 37931-37932 37935-37940 37942-37963 37965 37968-37974 37977-37980 37984-37993 37995 37998-38004 38007 38009-38011 38015-38016 38019 38021-38025 38029-38067 38071-38076 38079-38080 38083-38089 38092 38094 38096-38102 38104-38107 38109-38110 38113-38114 38117 38120-38127 38129-38130 38132-38139 38143-38150 38152-38154 38156-38157 38159 38161-38162 38164-38168 38172-38176 38178-38181 38183-38237 38239 38242-38256 38258 38260-38261 38263-38265 38267-38275 38278 38281-38295 38297-38302 38307-38319 38321-38342 38345 38351 38353-38377 38381-38382 38384-38388 38390 38392 38394-38401 38403-38408 38410-38426 38428-38434 38436-38444 38450 38452-38456 38458-38460 38462-38465 38468-38470 38473-38493 38496-38497 38499-38526 38528-38529 38532-38561 38563-38572 38575-38580 38582-38583 38585-38619 38621-38691 38693-38694 38697-38753 38755-38765 38767-38783 38787-38793 38796-38805 38810 38813-38814 38817 38819-38836 38839 38841-38843 38846-38855 38857-38874 38876-38878 38880-38889 38891-38893 38895-38898 38900 38902 38905-38909 38911-38920 38922-38924 38927-38956 38958 38967 38969 38971-38975 38977-38983 38987-38991 38994-39001 39003-39004 39007-39008 39011 39013 39017-39027 39029-39037 39039-39046 39048-39056 39058-39060 39063-39065 39067-39069 39071-39073 39075 39077 39081-39082 39086-39087 39090 39092-39102 39104-39124 39126-39139 39143-39148 39150-39166 39168-39174 39177-39189 39191-39199 39203-39208 39211 39213-39214 39216-39221 39223-39224 39227-39228 39231-39244 39246-39250 39252-39258 39262 39264-39266 39269-39273 39277-39290 39292 39294-39298 39300-39302 39305-39310 39315-39359 39361-39367 39369-39377 39380-39385 39389-39393 39395-39413 39415-39418 39421-39437 39439 39442-39449 39452-39460 39462-39463 39465-39493 39496-39539 39541-39562 39567-39573 39577-39580 39583-39654 39656-39689 39692-39754 39757-39766 39768-39797 39799-39811 39813 39815-39825 39828-39844 39846-39848 39850-39855 39857 39859-39866 39868-39909 39911-39921 39923-39934 39937-39939 39941 39943-39945 39947-39956 39958-39966 39968-39969 39972-39973 39978 39985 39987-39989 39992-39995 39997-39998 40002-40004 40006-40008 40012-40019 40021-40022 40024 40026-40039 40041-40046 40049-40066 40068-40079 40083-40092 40094-40119 40121-40128 40131-40144 40149-40162 40164-40169 40171-40176 40178-40191 40193-40201 40203-40205 40207-40208 40213 40215-40224 40226-40232 40234-40237 40239-40250 40253-40280 40282-40297 40301-40304 40306-40308 40310-40315 40318-40319 40322-40326 40328-40332 40334-40340 40342-40352 40354-40356 40358-40366 40368 40370-40384 40386 40393-40406 40408-40413 40415-40427 40431-40503 40505-40514 40516-40520 40524-40543 40545-40547 40549-40562 40564-40565 40568-40581 40584-40602 40605-40613 40620-40637 40639-40662 40664-40712 40714-40722 40724-40726 40728-40731 40735-40741 40743-40784 40786-40793 40796-40803 40805-40806 40808-40815 40817-40838 40841-40858 40861-40871 40875-40886 40888-40895 40897-40912 40914-40917 40919-40941 40943-40951 40954-40965 40967-40987 40989-41004 41008-41009 41011-41015 41017-41030 41033-41042 41044-41046 41048-41051 41053-41056 41062-41077 41079 41083-41088 41091-41094 41096-41105 41109-41144 41146-41152 41154-41156 41158 41161-41165 41169-41177 41179-41195 41199-41216 41218-41263 41265-41288 41290-41298 41300-41304 41306 41308-41310 41314-41317 41319-41325 41330 41333-41335 41339-41362 41364-41377 41386-41388 41390-41411 41414-41430 41432-41434 41437 41439-41440 41443-41453 41455-41456 41459 41461 41464 41466-41468 41470-41472 41475-41488 41491 41493-41495 41497-41502 41504-41507 41512-41514 41516 41519-41522 41524-41525 41527-41529 41532-41533 41536-41541 41543-41546 41548-41550 41556 41558-41565 41569 41571-41577 41580 41582 41584 41586-41592 41594-41596 41598-41600 41602 41606 41608 41610-41621 41627-41644 41652-41659 41661-41731 41733-41745 41747-41761 41763-41808 41812-41836 41838-41852 41854-41925 41927-41929 41931-41932 41934-42079 42081-42109 42111-42123 42125-42136 42140-42147 42149-42180 42182 42185-42228 42230-42256 42258-42264 42266-42267 42272-42305 42307-42391 42393-42420 42422-42425 42427 42429-42435 42438-42458 42460 42462-42484 42486 42488-42512 42514-42516 42518-42526 42528-42541 42544-42585 42587-42620 42622-42624 42626-42652 42654-42655 42657-42663 42665-42668 42670-42682 42685-42707 42709-42710 42712-42717 42719-42721 42724 42726-42730 42732 42734-42739 42741-42744 42746-42752 42754-42900 42902-42910 42912-42915 42918-42926 42928-42944 42946-42959 42961-42978 42981-42983 42985-42987 42989-42990 42992-43006 43008-43011 43013-43016 43018-43024 43027 43029-43048 43050-43056 43058-43075 43077-43092 43097-43124 43126-43175 43177 43179-43180 43182-43184 43186-43219 43223 43225-43277 43280 43282-43325 43327-43340 43342-43465 43467-43470 43473-43483 43485-43487 43490-43494 43498-43500 43502-43504 43506-43510 43512-43516 43518-43521 43524-43526 43528-43529 43531-43540 43542-43543 43545 43548-43549 43552-43553 43555-43562 43565-43566 43570-43581 43587-43599 43602-43609 43612-43616 43618-43622 43625-43628 43636-43637 43639-43642 43644 43646-43649 43651 43653-43659 43662-43664 43669-43670 43672-43736 43738-43742 43746-43757 43760-43765 43767 43769-43772 43776-43781 43784-43795 43798-43827 43830-43840 43842-43850 43852-43861 43863-43865 43868-43897 43899-43900 43902-43906 43908-43913 43916-43930 43933-43953 43955-43957 43959 43962-43975 43978-43983 43985-43994 43996-43999 44001 44003-44009 44011 44013 44016-44023 44025-44027 44029-44035 44037-44042 44044 44046-44047 44049-44063 44065-44092 44094-44105 44107-44108 44110 44114-44123 44125-44138 44142 44145-44146 44148-44151 44153-44162 44164-44168 44170-44174 44176-44192 44194-44197 44199 44202-44204 44206-44218 44220-44246 44249-44256 44258-44281 44284-44287 44289 44291-44298 44300 44302 44304-44310 44312-44318 44321-44324 44327-44345 44347-44348 44350-44355 44357 44359-44373 44375-44381 44383-44389 44391-44403 44405 44408-44420 44422-44454 44456-44460 44462 44464-44477 44479-44483 44485-44487 44490-44521 44523-44527 44529-44541 44546-44558 44560-44562 44564-44571 44573-44574 44576-44601 44603-44608 44610-44611 44613-44618 44621-44632 44635-44641 44643-44644 44646-44656 44658-44668 44671-44673 44676-44696 44699-44707 44710-44711 44714-44715 44719-44725 44727-44737 44741-44744 44747-44767 44769-44780 44782-44785 44788-44790 44792-44804 44807-44814 44817-44870 44872-44923 44925-44936 44939-44941 44945-44946 44950 44952-44958 44961-44963 44965-44967 44969-44975 44977-44988 44991-45004 45006-45026 45032-45034 45036-45059 45061-45062 45065-45074 45076-45091 45093-45094 45096-45112 45115-45138 45140-45154 45156 45161 45165-45166 45169 45174 45179 45181 45183-45202 45204-45205 45207-45208 45210 45214-45217 45219-45221 45225 45227-45234 45236-45243 45245 45249 45251-45254 45257 45259-45264 45266-45268 45271 45273 45275-45277 45279 45281-45285 45287-45290 45292 45296-45301 45303 45306-45311 45313 45315-45331 45335-45336 45338-45344 45347 45350-45352 45354-45355 45358-45363 45365-45366 45369 45372-45384 45386-45390 45392-45404 45406-45408 45410-45422 45425-45430 45432-45478 45480 45483-45510 45512 45515-45533 45535-45538 45544-45545 45547-45559 45561-45563 45567-45577 45579-45583 45586-45610 45612-45624 45629-45683 45686-45707 45709-45732 45734-45743 45745-45749 45752-45787 45789-45792 45796-45797 45799-45822 45825-45914 45916-45918 45920-46083 46086-46094 46096-46100 46102-46115 46118-46122 46125-46133 46135 46137-46143 46145-46149 46151-46163 46165-46172 46174-46181 46183-46198 46200-46205 46207-46210 46215-46218 46221-46246 46249-46307 46311-46319 46321-46337 46340-46342 46344-46346 46349 46351-46366 46368-46388 46392-46393 46401-46403 46406-46414 46416-46424 46428-46443 46445-46456 46458-46464 46466-46474 46476-46508 46512-46516 46518-46575 46577-46652 46656-46664 46666-46854 46856-46879 46883-46896 46898-46906 46908-46925 46927-46943 46945-46955 46957-46976 46978-46984 46987-46994 46996-47003 47007-47019 47022-47049 47052-47053 47055-47062 47064-47078 47080 47087-
47318 47320-47321 47323-47338 47340-47352 47355-47376 47378-47399 47401-47421 47423-47452 47454-47571 47573-47590 47592-47593 47597-47600 47603 47605-47608 47610-47611 47613-47617 47620-47624 47626-47629 47631-47653 47657-47663 47666-47693 47695-47703 47705 47707-47718 47720 47724 47726-47729 47732-47754 47758-47761 47763-47766 47768-47779 47781-47783 47785-47791 47793-47814 47818-47822 47824-47850 47852 47854 47856-47869 47872-47892 47895-47947 47949-48000 48002-48050 48052-48055 48057 48060-48071 48074-48079 48083-48093 48096-48102 48104-48126 48128-48173 48175-48181 48185 48187-48188 48191-48198 48201-48204 48206-48262 48264-48299 48301-48335 48338-48373 48376-48403 48406-48407 48409-48425 48429-48557 48562-48574 48576 48579-48722 48725-48806 48809-48817 48819-48824 48828-48841 48844-48885 48887-48900 48902-48958 48960-48962 48964-48981 48983 48985-48991 48994-48995 48998-49019 49022-49067 49069 49071-49081 49083-49123 49126-49129 49131-49134 49137-49142 49144-49147 49149-49152 49154-49192 49194-49216 49218-49219 49224-49229 49231-49249 49251-49254 49257-49261 49266-49274 49276-49293 49295-49300 49302-49311 49313-49324 49326-49396 49398-49399 49401-49407 49409-49430 49432-49436 49438-49455 49457-49498 49500-49507 49509-49516 49518-49549 49551-49556 49562-49565 49568 49576-49594 49596-49622 49626-49633 49635-49637 49639-49652 49654-49657 49659-49691 49695-49710 49712-49743 49746 49748-49752 49754 49759-49871 49873-49935 49937-49939 49943-49944 49946 49948-49962 49964-49980 49982-49985 49987-49989 49992-49993 49997-50018 50020-50029 50032-50038 50040-50048 50051-50188 50190-50219 50221-50325 50327-50344 50346-50403 50405-50442 50444-50448 50450-50455 50457-50459 50462 50464-50466 50470-50473 50475-50481 50484-50498 50500-50502 50504 50506 50508 50510 50512-50524 50526-50527 50529-50559 50561-50587 50589-50676 50678-50689 50692-50693 50696-50702 50705 50708-50716 50719-50815 50817-50821 50823-50842 50845 50847 50849-50853 50855-50856 50858-50863 50865-50868 50870-50916 50918-50935 50937-50946 50948-50949 50954-50956 50958-50963 50965 50967-50989 50991-51015 51017-51028 51031 51035-51037 51039-51044 51046-51109 51111-51157 51159-51177 51180-51187 51190-51195 51197 51199 51204-51216 51219-51225 51227 51230-51235 51238-51268 51270-51285 51289-51295 51297-51327 51329-51406 51409-51412 51414-51417 51419-51424 51426-51441 51444-51450 51453-51456 51458 51460-51545 51547-51559 51562-51564 51567-51570 51572 51575-51584 51586 51588-51604 51606-51610 51612-51648 51650-51651 51653-51660 51662-51666 51668-51679 51683-51684 51687 51689-51694 51696 51699 51702 51706-51714 51716-51718 51720-51736 51739-51742 51744 51749 51752-51754 51758-51759 51761-51763 51765-51766 51769-51770 51773 51775-51798 51800 51802-51812 51817-51818 51821-51841 51843-51857 51861-51863 51865-51880 51882-51895 51897 51899-51918 51920-51928 51930-51931 51933-51935 51940 51944-51945 51948-51952 51955-51956 51958-51970 51972-51983 51986-51987 51989-51992 51994-52002 52004 52008-52027 52029-52030 52032-52043 52045-52048 52050-52053 52055-52058 52060-52064 52066-52069 52071-52076 52080-52098 52101-52118 52121-52136 52139-52158 52160-52166 52168-52209 52211-52218 52220-52243 52245-52275 52277-52285 52291-52293 52297-52323 52327-52330 52333-52334 52336-52337 52345-52346 52352-52358 52360-52365 52369-52372 52375-52377 52380-52382 52385-52394 52396-52421 52423-52454 52457-52477 52484 52487 52490-52513 52515-52517 52521-52522 52525 52528-52532 52534 52538 52540-52542 52544-52550 52553-52599 52602-52613 52615-52617 52619-52631 52633-52638 52640-52644 52646 52648-52658 52660-52663 52665-52668 52670-52680 52682-52689 52691-52697 52699-52702 52704-52708 52710-52751 52753-52755 52757-52758 52760-52790 52792-52794 52796-52807 52810-52826 52828-52835 52837-52840 52842-52849 52852 52856-52884 52886-52889 52891 52893-52898 52902-52942 52944-52945 52947 52949-52955 52957-52975 52977-52997 52999-53160 53162-53177 53179-53190 53192-53197 53200-53214 53216-53221 53223-53236 53238-53253 53255-53266 53269-53271 53273-53277 53279-53282 53284-53347 53349-53379 53381-53389 53391-53402 53405-53434 53436-53441 53443-53451 53453-53459 53463-53464 53467-53475 53477-53512 53515-53535 53537-53538 53541-53627 53629-53651 53653-53662 53664-53671 53673-53682 53684-53690 53692-53694 53698-53700 53702-53703 53705 53708-53724 53726-53733 53735-53736 53738-53739 53741-53774 53776-53795 53797-53799 53801-53805 53807-53810 53814-53833 53835-53845 53848-53854 53856-53864 53867-53873 53875-53877 53880 53884-53891 53893-53901 53903-53915 53917-53943 53946-53964 53969-53972 53976-53983 53985-53986 53988-54015 54017-54018 54020-54026 54031-54059 54061-54062 54064-54065 54067-54073 54075-54091 54093-54094 54096-54100 54102-54149 54151-54175 54177 54179-54206 54208-54219 54221 54224-54238 54240-54248 54250-54277 54280-54282 54287-54296 54298-54302 54304-54318 54321-54327 54330 54332-54334 54336-54362 54364-54365 54369-54373 54375-54376 54378-54400 54402-54414 54416 54418-54433 54435-54521 54523-54542 54549 54551-54571 54574-54575 54577-54578 54581-54588 54590-54596 54599-54600 54602-54609 54611-54612 54614-54615 54617-54624 54627-54629 54632-54665 54667 54669-54688 54690-54713 54715-54868 54871-55220 55222-55293 55295-55296 55299-55303 55305 55308-55350 55353-55405 55407-55458 55461-55462 55464-55475 55477-55738 55740-55745 55747-55809 55811-55827 55830-55834 55836-55865 55867-55871 55873-55890 55892-55943 55946-55990 55992-56029 56032 56034-56052 56055-56061 56063-56103 56105-56112 56114-56118 56120-56144 56146-56187 56189-56190 56192-56200 56202-56207 56210-56243 56245-56296 56298-56300 56302-56310 56313-56316 56319-56322 56324-56326 56328-56338 56340-56350 56353-56359 56361 56363-56367 56370 56373-56387 56390-56395 56397-56412 56414-56416 56418-56438 56441-56448 56452-56470 56473-56479 56481-56485 56487-56507 56509 56511-56545 56547-56555 56557-56563 56565 56567-56616 56622-56687 56690 56693-56698 56700 56702-56705 56707-56712 56718 56720-56725 56729-56730 56735-56764 56766-56777 56779-56803 56806-56814 56819-56825 56827-56834 56836-56846 56849-56853 56855 56857-56858 56860-56866 56868-56869 56871-56875 56878-56894 56896-56907 56909-56913 56916-56918 56922-56923 56925 56927-56942 56944-56958 56962-56984 56989-57027 57029-57055 57058-57060 57062-57065 57067-57069 57072 57074-57081 57085-57095 57097-57099 57101-57104 57106-57119 57121 57123-57124 57126-57135 57139-57144 57146-57147 57149-57152 57155-57158 57160-57171 57173-57176 57178-57182 57185-57197 57200-57205 57207-57249 57252-57253 57256-57264 57267-57269 57271-57274 57276-57278 57280-57293 57295-57298 57300-57382 57384 57386-57450 57453 57455-57506 57508-57540 57542-57591 57593-57602 57605-57612 57614-57630 57632-57636 57638-57648 57650-57654 57657-57668 57670-57680 57682-57685 57687-57700 57703-57706 57708-57709 57712-57716 57718-57725 57727-57735 57737-57772 57774-57775 57778-57788 57790-57797 57799 57802-57809 57815-57825 57827-57829 57831-57868 57870-57903 57905-57912 57914 57916 57919-57929 57931 57933 57938-57949 57951-57954 57956-57971 57973-57981 57983-57985 57987-57988 57992-58024 58026-58034 58036-58039 58041 58043-58044 58046-58048 58050 58052 58054-58057 58059-58070 58073-58082 58084-58085 58087-58104 58106-58114 58116-58119 58121-58159 58163-58220 58223-58487 58489-58516 58519-58544 58546-58551 58553-58565 58567-58569 58572-58583 58585-58837 58839 58841-58855 58857-58860 58863-58874 58877-58893 58895-58909 58915-58931 58934-58964 58966 58968-58969 58971-58998 59000-59092 59097-59109 59111-59115 59118-59122 59124 59126-59128 59131 59133-59136 59138-59139 59141-59145 59147-59190 59192-59230 59232-59238 59240 59243-59249 59253-59254 59256-59733 59735-59756 59758-59948 59950-59967 59969-59970 59972-60028 60030-60035 60037-60048 60051-60055 60057-60074 60076-60079 60081-60099 60101 60103 60105-60110 60112-60126 60128-60140 60142-60145 60149-60151 60154-60161 60164-60168 60170-60178 60180-60182 60185-60191 60193-60196 60198-60199 60201-60202 60204 60207-60208 60210-60212 60214 60217-60220 60223-60224 60226-60250 60252-60260 60262-60284 60286-60308 60310-60313 60315-60329 60331-60345 60347-60351 60354-60367 60369 60371-60424 60427-60428 60430 60432 60434-60458 6
0460-60482 60484-60490 60492-60504 60506 60508-60509 60516-60517 60519-60532 60534 60536-60540 60542-60547 60549-60554 60556-60606 60608-60614 60616-60643 60645-60652 60654-60658 60661-60663 60666-60673 60675-60687 60689-60693 60695-61019 61021-61045 61048-61075 61077 61079-61087

On Wed, 19 Oct 2016 13:26:33 +0000
"R. David Murray" <report@bugs.python.org> wrote:

> R. David Murray added the comment:
> 
> I meant 'nmh'.  Also, if the problem is that mailbox blows up on an .mh_sequences file with bad records and doesn't provide any way to access the valid records (like nmh mostly manages to do), then that is something that could be fixed, and we can reopen the issue.
> 
> ----------
> versions: +Python 3.6, Python 3.7 -Python 3.5
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue28473>
> _______________________________________
>
msg279684 - (view) Author: Garrett Nievin (garrettzilla) Date: 2016-10-29 16:41
Interestingly, mailutils mh (GNU Mailutils 2.99.99, Ubuntu 16.10)
doesn't have a problem with these files, so I'm using that instead of
nmh.

I assume this is relevant:
http://www.nongnu.org/nmh/diff.html
<quote>
The limitation on the length of lines in the file containing your
public sequences (.mh_sequences) has been removed. That should be the
end of the error message ".mh_sequences is poorly formatted". 
</quote>

That's the message I got with nmh, but not with mailutils mh.

Cheers,
Garrett

On Wed, 19 Oct 2016 13:26:33 +0000 "R. David Murray" <report@bugs.python.org> wrote:

> R. David Murray added the comment:
> 
> I meant 'nmh'.  Also, if the problem is that mailbox blows up on an .mh_sequences file with bad records and doesn't provide any way to access the valid records (like nmh mostly manages to do), then that is something that could be fixed, and we can reopen the issue.
> 
> ----------
> versions: +Python 3.6, Python 3.7 -Python 3.5
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue28473>
> _______________________________________
>
msg279693 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-10-29 18:47
OK.  There is definitely something that could be done here if someone wants to tackle it.  At a minimum, read the lines that we can read and produce a warning of some sort for the ones we can't.  If more than one other mh style programming is allowing this variant syntax, we could also choose to support it.

I'm going to reclassify this as an enhancement because it appears to be support for "new" formatting, but I'm not adverse to considering it a bug.
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72659
2016-10-29 18:47:04r.david.murraysetstatus: closed -> open
type: behavior -> enhancement
messages: + msg279693

resolution: third party ->
stage: resolved ->
2016-10-29 16:41:24garrettzillasetmessages: + msg279684
2016-10-29 16:40:38garrettzillasetmessages: + msg279683
2016-10-19 13:26:33r.david.murraysetmessages: + msg278972
versions: + Python 3.6, Python 3.7, - Python 3.5
2016-10-19 00:43:40r.david.murraysetstatus: open -> closed
resolution: third party
messages: + msg278955

stage: resolved
2016-10-19 00:28:01r.david.murraysettype: crash -> behavior

messages: + msg278954
nosy: + r.david.murray
2016-10-18 22:39:26garrettzillacreate