• Mailproc.ini programs

    From Merlin@VERT/CARSO to All on Wednesday, January 05, 2005 23:13:00
    Hi,. I've just updated to latest CVS and my mailproc program has stopped working. In the mailproc.ini it says at the bottom

    [emailstamp.js]
    native=

    My emailstamp.js is below. Basically, it adds a tag to all incoming mail
    with my BBS QWK ID and the IP of the smtp server delivering the email.
    It worked prior to update and I can't see anything wrong with it...
    Is there an expert who can cast their eye upon it...
    Ta
    MErlin

    // emailstamp.js

    // SMTP Email stamp "Mail Processor" module
    // Requires Synchronet Mail Server 1.298 or later

    // Set to false at any time to indicate a processing failure
    var success=true;

    // These lines open the processing error output file as a new File object.
    // If there are any processing errors (e.g. filtered context, blocked
    sender),
    // you can reject the message by simply writing some text to 'errfile'.
    var errfile = new File(processing_error_filename);
    if(!errfile.open("w"))
    exit();

    // These lines read the recipient list into a new 'recipient' object
    array.
    var rcptlst = new File(recipient_list_filename);
    if(!rcptlst.open("r"))
    exit();
    var recipient=rcptlst.iniGetAllObjects("number");
    // At this point we can access the list of recipients very easily
    // using the 'recipient' object array.

    // These lines open the message text file in append mode (writing to the
    end)
    var msgtxt = new File(message_text_filename);
    if(!msgtxt.open("a+")) // Change the mode to "r+" for "read/update"
    access
    exit();

    // Write footer to incoming email

    msgtxt.writeln("---");
    msgtxt.writeln("Anti-spam control key: " + system.qwk_id + "/" + client.ip_address + "/" + "0");

    // If there were any processing errors... reject the message
    if(!success)
    errfile.writeln("A mail processing error occurred. Message rejected.");




    ---
    Synchronet CarSo BBs Beverley, UK telnet://carso.synchro.net
  • From Digital Man@VERT to Merlin on Wednesday, January 05, 2005 16:40:56
    Re: Mailproc.ini programs
    By: Merlin to All on Wed Jan 05 2005 11:13 pm

    Hi,. I've just updated to latest CVS and my mailproc program has stopped working. In the mailproc.ini it says at the bottom

    [emailstamp.js]
    native=

    My emailstamp.js is below. Basically, it adds a tag to all incoming mail with my BBS QWK ID and the IP of the smtp server delivering the email.
    It worked prior to update and I can't see anything wrong with it...
    Is there an expert who can cast their eye upon it...

    Is there any indication in your logs that your mail processor is running? Perhaps you can paste a port of your mail server log when receiving an SMTP message?

    (Thanks for posting this question here. This area doesn't get much traffic). :-)

    digital man

    Snapple "Real Fact" #114:
    The oldest known animal was a tortoise, which lived to be 152 years old.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Merlin@VERT to Digital Man on Thursday, January 06, 2005 17:36:33
    Ah, log says:

    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP RX: RCPT TO:<merlin@carso.dyndns.org>
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP RX: DATA
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP End of message (body: 40 lines, 1379 bytes, header: 22 lines, 1047 bytes)
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP Executing external process: emailstamp.js
    Jan 6 17:35:00 carso synchronet: mail 0028 !SMTP system(emailstamp.js) returned 512 (errno: 2)
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP Created message #3291 from Richard Brumpton to merlin@carso.dyndns.org <#1>

    Do you know what errno 2 means?!?!

    Merin

    "Digital Man" <digital.man@vert.synchro.net> wrote in message news:41DC8918.68.sync-js@vert.synchro.net...
    Re: Mailproc.ini programs
    By: Merlin to All on Wed Jan 05 2005 11:13 pm

    Hi,. I've just updated to latest CVS and my mailproc program has stopped working. In the mailproc.ini it says at the bottom

    [emailstamp.js]
    native=

    My emailstamp.js is below. Basically, it adds a tag to all incoming mail with my BBS QWK ID and the IP of the smtp server delivering the email.
    It worked prior to update and I can't see anything wrong with it...
    Is there an expert who can cast their eye upon it...

    Is there any indication in your logs that your mail processor is running? Perhaps you can paste a port of your mail server log when receiving an
    SMTP
    message?

    (Thanks for posting this question here. This area doesn't get much
    traffic).
    :-)

    digital man

    Snapple "Real Fact" #114:
    The oldest known animal was a tortoise, which lived to be 152 years old.

    --- Synchronet 3.12b-Win32 NNTP Service 1.80
    * Vertrauen - Anaheim Hills, California - telnet://vert.synchro.net

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Merlin on Thursday, January 06, 2005 20:25:43
    Re: Re: Mailproc.ini programs
    By: Merlin to Digital Man on Thu Jan 06 2005 05:36 pm

    Ah, log says:

    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP RX: RCPT TO:<merlin@carso.dyndns.org>
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP RX: DATA
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP End of message (body: 40 lines, 1379 bytes, header: 22 lines, 1047 bytes)
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP Executing external process: emailstamp.js
    Jan 6 17:35:00 carso synchronet: mail 0028 !SMTP system(emailstamp.js) returned 512 (errno: 2)
    Jan 6 17:35:00 carso synchronet: mail 0028 SMTP Created message #3291 from Richard Brumpton to merlin@carso.dyndns.org <#1>

    Do you know what errno 2 means?!?!

    It mean "file not found". The "system()" call means that it thinks the mail proc is native. Either set "native=false" or just remove that key (The default value is false).

    digital man

    Snapple "Real Fact" #89:
    The average American walks 18,000 steps a day.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Merlin@VERT to Digital Man on Friday, January 07, 2005 17:12:05
    Right, ive fixed that to native=false and now it is sort of working....

    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP End of message (body: 40 lines, 1385 bytes, header: 22 lines, 1047 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Executing external process: emailstamp.js
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Creating runtime: 8388608 bytes
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Initializing context (stack: 16384 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Created message #3307 from Richard Brumpton to merlin@carso.dyndns.org <#1>


    The emailstamp.js is running and the mail is being posted to the bBs, but
    the emailstamp.js is not appending any text to the message. As far as I can see it should work ok and the script is the same that was working in the previous version....Has anything changed?

    Merlin

    "Digital Man" <digital.man@vert.synchro.net> wrote in message news:41DE0F47.71.sync-js@vert.synchro.net...
    Re: Re: Mailproc.ini programs
    By: Merlin to Digital Man on Thu Jan 06 2005 05:36 pm

    It mean "file not found". The "system()" call means that it thinks the
    mail
    proc is native. Either set "native=false" or just remove that key (The default
    value is false).

    digital man

    Snapple "Real Fact" #89:
    The average American walks 18,000 steps a day.

    --- Synchronet 3.12b-Win32 NNTP Service 1.80
    * Vertrauen - Anaheim Hills, California - telnet://vert.synchro.net

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Merlin on Friday, January 07, 2005 15:11:03
    Re: Re: Mailproc.ini programs
    By: Merlin to Digital Man on Fri Jan 07 2005 05:12 pm

    Right, ive fixed that to native=false and now it is sort of working....

    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP End of message (body: 40 lines, 1385 bytes, header: 22 lines, 1047 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Executing external process: emailstamp.js
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Creating runtime: 8388608 bytes
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Initializing context (stack: 16384 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Created message #3307 from Richard Brumpton to merlin@carso.dyndns.org <#1>


    The emailstamp.js is running and the mail is being posted to the bBs, but the emailstamp.js is not appending any text to the message. As far as I can see it should work ok and the script is the same that was working in the previous version....Has anything changed?

    A lot has changed in regards to external mail processing (I thought that was obvious?). :-)

    But it should work of course. I'll do some testing here and double-check, but in the mena-time, adding some log() lines to your script might help track down the problem.

    digital man

    Snapple "Real Fact" #57:
    You blink over 10,000,000 times a year.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Merlin on Friday, January 07, 2005 18:42:13
    Re: Re: Mailproc.ini programs
    By: Merlin to Digital Man on Fri Jan 07 2005 05:12 pm

    Right, ive fixed that to native=false and now it is sort of working....

    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP End of message (body: 40 lines, 1385 bytes, header: 22 lines, 1047 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Executing external process: emailstamp.js
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Creating runtime: 8388608 bytes
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Initializing context (stack: 16384 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Created message #3307 from Richard Brumpton to merlin@carso.dyndns.org <#1>


    The emailstamp.js is running and the mail is being posted to the bBs, but the emailstamp.js is not appending any text to the message. As far as I can see it should work ok and the script is the same that was working in the previous version....Has anything changed?

    The example (exec/mailproc_example.js) still appears to work with v3.12a, so I'm curious as to what the problem is with your mail processor.

    I also was unable to reproduce any scenario where the "native" property was set to true (unless I specifically set it to "1"/"true").

    digital man

    Snapple "Real Fact" #105:
    You will burn 7% more calories walking on hard dirt than pavement.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Merlin@VERT to Digital Man on Saturday, January 08, 2005 20:30:55
    I've just settled down in front of the PC for a hour of debugging the emailstamp problem. Though, I'd sent it another test to see what happens,
    and its started working again.

    No idea how or why, it definately was broken yesterday. anyway I will keep
    an eye on it and see what happens!

    Merlin

    "Digital Man" <digital.man@vert.synchro.net> wrote in message news:41DF4885.74.sync-js@vert.synchro.net...
    Re: Re: Mailproc.ini programs
    By: Merlin to Digital Man on Fri Jan 07 2005 05:12 pm

    Right, ive fixed that to native=false and now it is sort of working....

    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP End of message (body:
    40
    lines, 1385 bytes, header: 22 lines, 1047 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Executing external process:
    emailstamp.js
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Creating
    runtime:
    8388608 bytes
    Jan 7 17:09:29 carso synchronet: mail 0030 JavaScript: Initializing context
    (stack: 16384 bytes)
    Jan 7 17:09:29 carso synchronet: mail 0030 SMTP Created message #3307 from
    Richard Brumpton to merlin@carso.dyndns.org <#1>


    The emailstamp.js is running and the mail is being posted to the bBs,
    but
    the emailstamp.js is not appending any text to the message. As far as I can
    see it should work ok and the script is the same that was working in the previous version....Has anything changed?

    The example (exec/mailproc_example.js) still appears to work with v3.12a,
    so
    I'm curious as to what the problem is with your mail processor.

    I also was unable to reproduce any scenario where the "native" property
    was set
    to true (unless I specifically set it to "1"/"true").

    digital man

    Snapple "Real Fact" #105:
    You will burn 7% more calories walking on hard dirt than pavement.

    --- Synchronet 3.12b-Win32 NNTP Service 1.80
    * Vertrauen - Anaheim Hills, California - telnet://vert.synchro.net


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Merlin on Monday, January 10, 2005 16:27:47
    Re: Re: Mailproc.ini programs
    By: Merlin to Digital Man on Sat Jan 08 2005 08:30 pm

    I've just settled down in front of the PC for a hour of debugging the emailstamp problem. Though, I'd sent it another test to see what happens, and its started working again.

    No idea how or why, it definately was broken yesterday. anyway I will keep an eye on it and see what happens!

    I did find a bug with multiple simultaneous SMTP receive threads and external mail processing. It's been fixed in CVS for the next release. Perhaps this was the cause.

    digital man

    Snapple "Real Fact" #134:
    An ant can lift 50 times its own weight.

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net