• src/sbbs3/atcodes.cpp getmsg.cpp

    From rswindell@VERT to CVS commit on Thu Dec 10 12:01:15 2015
    Subject: src/sbbs3/atcodes.cpp getmsg.cpp
    @MSGID: <5669DA0B.32512.syncprog@vert.synchro.net>
    @TZ: 41e0
    src/sbbs3 atcodes.cpp 1.68 1.69 getmsg.cpp 1.52 1.53
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv11364

    Modified Files:
    atcodes.cpp getmsg.cpp
    Log Message:
    Change TO_NET and FROM_NET @-code logic and revert last change to show_msghdr() - it actually *is* an expected condition that a to_net.addr or from_net.addr msg header field is populated with a valid address (string) even though the to_net.type or from_net.type value is NET_NONE.

    The nntpservice.js and newslink.js modules rely on this behavior to display
    and export local NNTP-posters' email addresses in message headers, but still be able to identify newslink-imported messages as *not* local (the from_net.type = NET_INTERNET) and thus not export them back to the network.

    This was not the original intention behind these header fields in SMB, but it was retrofitted to support this condition 10+ years ago and I forgot.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Rastus@VERT to rswindell on Thu Dec 10 17:17:02 2015
    Subject: Re: src/sbbs3/atcodes.cpp getmsg.cpp
    @MSGID: <5669F9DF.14676.syncprog@ewbbs.synchro.net>
    @REPLY: <5669DA0B.32512.syncprog@vert.synchro.net>
    @TZ: fed4
    I applied this commit and NNTP Reader is able to post messages. Doing
    so now for additional testing.

    I am still getting the follow error when a script is attempting to
    create email. I'll include that code below the error.


    !JavaScript /sbbs/mods/create_new_user.js line 269: Error: Error -110
    adding SENDERNETADDR field to message header

    I have been using the file: create_new_user.js by Michael J. Ryan of roughnecks for years. It's worked every well until recently.. it
    stopped working sometime since the 3rd of Dec. as that is the last time
    a new user message was sent to me. I compile from cvs at least once a
    week.. sometimes daily.

    If this file is out of date and needs updated.. I would greatly
    appreciate a fix for it.. I like the way this works...

    This is the code/function that generates that error:

    function sendPassword(pwd) {
    var mail = new MsgBase("mail");
    if(mail.open!=undefined && mail.open()==false) {
    var err_msg = "!ERROR " + msgbase.last_error;
    console.print(err_msg);
    log(err_msg);
    exit();
    }

    var hdr = {
    from:system.name,
    from_net_addr:"sysop"+system.inetaddr,
    to:newinfo.alias,
    to_net_addr:newinfo.email,
    subject:"Your password for " + system.name + "!",
    to_net_type:NET_INTERNET
    }

    var msg = "" +
    "Welcome to "+system.name+"!\r\n"+
    "\r\n"+
    "You have received this email because someone logged on as a new
    user\r\n" +
    "and entered this email address for verification.\r\n" +
    "\r\n" +
    "You now need to reconnect to "+system.name+" and log on using the
    following:\r\n\r\n"+
    "Enter as shown (Case Sensative!)\r\n" +
    "USERNAME: "+newinfo.alias+"\r\n" +
    "PASSWORD: "+pwd+"\r\n\r\n"+
    "\r\n"+
    "telnet://"+system.inetaddr+"\r\n";

    if (!mail.save_msg(hdr,msg)) {
    var err_msg = "!ERROR " + msgbase.last_error + " saving mail.";
    console.print(err_msg);
    log(err_msg);
    exit();
    }

    // uncomment, to send a notice to the sysop
    hdr = {
    to: 'sysop',
    to_ext: '1',
    from: system.name,
    subject: "New User Information"
    };

    msg = "" +
    "Alias : "+newinfo.alias+"\r\n" +
    "Real name : "+newinfo.name+"\r\n" +
    "Chat handle : "+newinfo.handle+"\r\n" +
    "Location : "+newinfo.location+"\r\n" +
    "Gender : "+((newinfo.gender=="F")?"Female":"Male")+"\r\n" +
    "Date of birth : "+newinfo.dob+"\r\n" +
    "Email : "+newinfo.email+((newinfo.emailforward)?" (forwarded)":"")+"\r\n";
    mail.save_msg(hdr,msg);


    console.print("\1nYour password has been sent to \1h\1w"+newinfo.email+"\n\r\n");
    console.print("\1nYou should recieve our email within a few minutes. If
    not\1h\1w"+"\n\r\n");
    console.print("\1nplease check your Email Spam Folders for our message.\1h\1w"+"\n\r\n");

    log("Password sent to " + newinfo.alias + " at " + newinfo.email);
    }


    function showInfo() {
    console.print("\r\n\r\n");
    console.print("\1h\1bAlias \1k: \1n"+newinfo.alias+"\r\n");
    console.print("\1h\1bReal name \1k: \1n"+newinfo.name+"\r\n");
    console.print("\1h\1bChat handle \1k: \1n"+newinfo.handle+"\r\n");
    console.print("\1h\1bLocation \1k: \1n"+newinfo.location+"\r\n");
    console.print("\1h\1bGender \1k: \1n"+((newinfo.gender=="F")?"Female":"Male")+"\r\n");
    console.print("\1h\1bDate of birth \1k: \1n"+newinfo.dob+"\r\n");
    console.print("\1h\1bEmail \1k: \1n"+newinfo.email+((newinfo.emailforward)?" (forwarded)":"")+"\r\n");
    console.print("\r\n");
    }

    function main() {
    bbs.user_event(EVENT_NEWUSER);
    system.node_list[bbs.node_num-1].status = NODE_NEWUSER;
    newinfo.saved = false;
    newinfo.abort = false;

    while (bbs.online && !(newinfo.abort||newinfo.saved)) {
    if (!newinfo.abort) getAlias();
    if (!newinfo.abort) getHandle();
    if (!newinfo.abort) getName();
    if (!newinfo.abort) getLocation();
    if (!newinfo.abort) getGender();
    if (!newinfo.abort) getDOB();
    if (!newinfo.abort) getEmail();

    if (newinfo.abort)
    console.print("\r\n\r\n\1h\1rAborted.\1n\r\n\r\n");
    else if (newinfo.email) {
    showInfo();
    if (console.yesno("Is this information correct (password will be
    emailed)")) {
    console.print("\1n");
    var passwd = parseInt(Math.random()*1000000000000).toString(36).toUpperCase().substr(0,8);
    saveNewUser(passwd);
    sendPassword(passwd);
    return;
    } else if (!console.noyes("Abort new user creation")) {
    return;
    }
    }
    }
    }






    On 12/10/2015 03:01 PM, rswindell wrote:
    src/sbbs3 atcodes.cpp 1.68 1.69 getmsg.cpp 1.52 1.53
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv11364

    Modified Files:
    atcodes.cpp getmsg.cpp
    Log Message:
    Change TO_NET and FROM_NET @-code logic and revert last change to show_msghdr()
    - it actually *is* an expected condition that a to_net.addr or from_net.addr msg header field is populated with a valid address (string) even though the to_net.type or from_net.type value is NET_NONE.

    The nntpservice.js and newslink.js modules rely on this behavior to display and export local NNTP-posters' email addresses in message headers, but still be
    able to identify newslink-imported messages as *not* local (the from_net.type =
    NET_INTERNET) and thus not export them back to the network.

    This was not the original intention behind these header fields in SMB, but it was retrofitted to support this condition 10+ years ago and I forgot.


    ---
    � Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net


    ---
    þ Synchronet þ Electronic Warfare BBS | telnet://bbs.ewbbs.net
  • From Digital Man@VERT to Rastus on Thu Dec 10 17:21:01 2015
    Subject: Re: src/sbbs3/atcodes.cpp getmsg.cpp
    @MSGID: <566A24FD.32516.syncprog@vert.synchro.net>
    @REPLY: <5669F9DF.14676.syncprog@ewbbs.synchro.net>
    @TZ: 41e0
    Re: Re: src/sbbs3/atcodes.cpp getmsg.cpp
    By: Rastus to rswindell on Thu Dec 10 2015 05:17 pm

    I applied this commit and NNTP Reader is able to post messages. Doing
    so now for additional testing.

    I am still getting the follow error when a script is attempting to
    create email. I'll include that code below the error.


    !JavaScript /sbbs/mods/create_new_user.js line 269: Error: Error -110 adding SENDERNETADDR field to message header

    I have been using the file: create_new_user.js by Michael J. Ryan of roughnecks for years. It's worked every well until recently.. it
    stopped working sometime since the 3rd of Dec. as that is the last time
    a new user message was sent to me. I compile from cvs at least once a week.. sometimes daily.

    If this file is out of date and needs updated.. I would greatly
    appreciate a fix for it.. I like the way this works...

    This is the code/function that generates that error:

    var hdr = {
    from:system.name,
    from_net_addr:"sysop"+system.inetaddr,

    Changing that "sysop" to "sysop@" should fix it. Without that, I don't know how users would have been able to reply to the email if they wanted to. Looks like a valid bug in the script which just wasn't caught by the older sbbs code. Let me know how that works,

    digital man

    Synchronet "Real Fact" #83:
    The Electronic Frontier Foundation used to run Synchronet (circa 1993).
    Norco, CA WX: 59.5øF, 80.0% humidity, 9 mph ESE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Rastus@VERT to Digital Man on Fri Dec 11 00:30:16 2015
    Subject: Re: src/sbbs3/atcodes.cpp getmsg.cpp
    @MSGID: <566A5F69.14682.syncprog@ewbbs.synchro.net>
    @REPLY: <566A24FD.32516.syncprog@vert.synchro.net>
    @TZ: fed4
    Yes! That fixed it and all I had to do was add one character!
    Outstanding!!

    The New User never really needed to reply to that message.. it just sent
    them their password and a brief note so they could login.. but even if
    someone tried to reply only 1 user out of 10 would bother to report the error.. I've learned that it's easier to herd cats than it is to get
    feedback from the average user.

    Thanks!

    Nick

    On 12/10/2015 08:21 PM, Digital Man wrote:

    > This is the code/function that generates that error:

    > var hdr = {
    > from:system.name,
    > from_net_addr:"sysop"+system.inetaddr,

    Changing that "sysop" to "sysop@" should fix it. Without that, I don't know how
    users would have been able to reply to the email if they wanted to. Looks like
    a valid bug in the script which just wasn't caught by the older sbbs code. Let
    me know how that works,


    ---
    þ Synchronet þ Electronic Warfare BBS | telnet://bbs.ewbbs.net
  • From Digital Man@VERT to Rastus on Fri Dec 11 12:24:18 2015
    Subject: Re: src/sbbs3/atcodes.cpp getmsg.cpp
    @MSGID: <566B30F2.32524.syncprog@vert.synchro.net>
    @REPLY: <566A5F69.14682.syncprog@ewbbs.synchro.net>
    @TZ: 41e0
    Re: Re: src/sbbs3/atcodes.cpp getmsg.cpp
    By: Rastus to Digital Man on Fri Dec 11 2015 12:30 am

    Yes! That fixed it and all I had to do was add one character!
    Outstanding!!

    The New User never really needed to reply to that message.. it just sent them their password and a brief note so they could login.. but even if someone tried to reply only 1 user out of 10 would bother to report the error.. I've learned that it's easier to herd cats than it is to get feedback from the average user.

    <grins>

    Thanks!

    No problem.

    digital man

    Synchronet "Real Fact" #7:
    Synchronet was originally intended as a replacement for WWIV BBS software. Norco, CA WX: 58.4øF, 62.0% humidity, 4 mph NE wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net