• hpt-based forward/copy

    From Eric Renfro@1:135/371 to All on Mon Jul 22 13:27:11 2019
    So, this ended up working.

    I'd taken parts of stuff from: https://github.com/huskyproject/hpt/blob/master/misc/vtrack/vtrack.pm

    Mostly the "do some aliases", the sub me, and that's it so far.

    Then in my own filter.pl, I require my crafted functions.pl in the BEGIN {...} section, in my filter sub, I do my usual condition and just post it back through like this:

    if (!defined $toarea && $toaddr eq "1:135/300" && $toname eq "Eric Renfro") {
    post('NETMAIL', $sfrom, $sto, $from, '1:135/371', $subj, $date, ($attr|TRS|K_S)&~(LOC|ATT|FRQ|URQ|KFS|TFS|HLD|CRA|DIR|IMM|ARQ|RRQ), $text, 3); }

    It retains both the original that was sent, and re-posts the new one as a copy and gets packed and delivered to me on my BBS node as I'd hoped, with the same from and to, just different toaddr.

    )))[Psi-Jack -//- Decker]
    --- SBBSecho 3.07-Linux
    * Origin: Decker's Heaven -//- bbs.deckersheaven.com (1:135/371)
  • From Michael Dukelsky@2:5020/1042 to Eric Renfro on Mon Jul 22 22:22:30 2019
    Hello Eric,

    Monday July 22 2019, Eric Renfro wrote to All:

    So, this ended up working.

    [...skipped...]
    if (!defined $toarea && $toaddr eq "1:135/300" && $toname eq "Eric Renfro")

    AFAIK there is no such thing as $toarea in filter.pl. So if you did not define $toarea using $area, 'defined $toarea' is always false. You have to use $area here.

    Here is an excerpt from doc/perlhooks.rus:

    filter() is called when tossing new messages
    The following variables are defined:
    variable alias
    $fromname $sfrom - the sender's name
    $fromaddr $from - the sender's address
    $toname $sto - the recipient's name
    $toaddr $to - the recipient's address for netmail or undef
    $area - area for echomail, otherwise - undef
    $secure - current message has been received via SecureInbound
    $subject $subj - the message subject
    $text - the message text (with kludges)
    $date - the date of the message, the variable has two types:
    if used as a number, unixtime
    if used as a string, the format is fts-1
    $attr - attributes as a number
    $pktfrom - from whom the current pkt has been received
    Return:
    $kill = 1 - delete the message
    $change = 1 - change fields in accordance with the variables
    listed above (including changing kludges automatically)
    (except for $area, $secure, $pktfrom :)
    If a non-empty string is returned, the message is placed in the badArea

    It is not recommended to use attributes and date / time in a string form.

    Michael

    ... node (at) f1042 (dot) ru
    --- GoldED+/LNX 1.1.5-b20170303
    * Origin: Moscow, Russia (2:5020/1042)