From: Sebastian Date: Sun, 15 Jun 2014 21:32:35 +0000 (+0200) Subject: modules/FTNMAIL: save PATH and SEEN-BY in msgbase X-Git-Url: http://sraa.de/git/?a=commitdiff_plain;h=dcac0a5630ae8565448e7166ac37b36eec60d469;p=fido.git modules/FTNMAIL: save PATH and SEEN-BY in msgbase --- diff --git a/docs/data.txt b/docs/data.txt deleted file mode 100644 index adef182..0000000 --- a/docs/data.txt +++ /dev/null @@ -1,59 +0,0 @@ -DATA FORMAT DESCRIPTION -======================= - -PACKET - "the Packet Header" (FTS-0001, F.1) --------------------------------------------- -$packet = { - 'from' => [ zone, net, node, point ], - 'to' => [ zone, net, node, point ], - 'date' => [ year, month, day ], - 'time' => [ hour, minute, second ], - 'type' => string # 'FTS-0001' or 'FSC-0048' - 'product' => integer, - 'revision' => string, -}; - -ATTRIBUTE WORD (FTS-0001, B.1) ------------------------------- -$attr = { - 'state' => integer, # 0: local, 1: received, 2: sent - 'transfer' => integer, # 0: default, 1: crash, 2: hold - 'file' => integer, # 0: none, 1: file attached, - # 2: file request, 3: update request -}; - -MESSAGE - "Packed Message" (FTS-0001, C.1) ------------------------------------------- -$message = { - 'fname' => "John Sender", - 'tname' => "Joe Receiver", - 'subj' => "Subject", # original encoding - 'body' => "Body", # original encoding - 'from' => [ zone, net, node, point ], - 'to' => [ zone, net, node, point ], - 'date' => [ year, month, day ], - 'time' => [ hour, minute, second], - 'packet' => { see packet }, - 'attr' => { see attr }, -}; - -MAIL - Stored in Message Base ------------------------------ -$mail = { - 'area' => "MYAREA", # ECHOMAIL only - 'fname' => "John Sender", # - 'tname' => "Joe Receiver", # - 'subj' => "Subject", # UTF8 - 'body' => "Body", # UTF8 - 'msgid' => "a:b/c.d something", # must be unique - 'reply' => "a:e/f.g oldsomething", - 'from' => [ zone, net, node, point ], # - 'to' => [ zone, net, node, point ], # NETMAIL only - 'date' => [ year, month, day ], # - 'time' => [ hour, minute, second ], # - 'path' => [ [net,node], ... ], # ECHOMAIL only - 'seen' => [ [net,node], ... ], # ECHOMAIL only - 'packet' => { see packet }, - 'attr' => { see attr }, -}; - diff --git a/modules/FTNMAIL.pm b/modules/FTNMAIL.pm index bcceebe..c14fd3d 100644 --- a/modules/FTNMAIL.pm +++ b/modules/FTNMAIL.pm @@ -147,6 +147,12 @@ sub unpack_body($$$$) $mail{subj} = decode($charset, $subj); $mail{body} = decode($charset, $body); + # ECHOMAIL: save PATH and SEEN-BY + if($mail{area}) { + chop($path); $mail{path} = $path; + chop($seen); $mail{seen} = $seen; + } + # find FROM and TO addresses if(!$mail{area}) { # --> NETMAIL: use INTL/FMPT/TOPT