🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Graham Hobbs Sun, 16 Mar 2008 03:37
Command line email receive/response handlers
#217792
Author: Graham Hobbs
Date: Sun, 16 Mar 2008 03:37
121 lines
5150 bytes
Hello,

I've been in msdos.batch and got some useful information about a
problem I have. As a result I did some reading about Pegasus,
Email2db, 40tude, BLAT and Getmail, etc email handlers. For an old
mainframer the reading was heavy and some confusion remains.

I have learned that BLAT would 'seem' to be appropriate for outgoing
emails but I am still not sure about incoming emails.

Because this post is so long I pose the questions immediately in case
you don't want to read further:-)

AND BEING: can any of the above mentioned softwares extract from an
incoming email the sender's email address, the contents of the subject
line and the contents of the body and stick them into a single
solitary text file where the first record would be the sender's email
address, second record the subject line, subsequent records would be
from the email's body, AND where the filename would be unique for each
arriving email?

Can anyone confirm my assessment that BLAT will do my response emails?

Might code examples exist somewhere? Maybe point me where to read.

I thankyou for your patience. My thanks in advance,

Graham Hobbs


... and here is what I am trying to accomplish:


Very short:
---------------
An email arrives, contents are processed, a text file is emailed back
in  < 10 minutes - no manual intervention. At the end of the day I can
look at my own process's logfiles and see the day's activities.

A bit longer:
------------------
I am endeavouring to automate a process on my computer whereby I can
offer an unattended service. The computer receives an email (will
always be text (see (A) below), creates a text file from the address,
subject and body (each file needing a different name), my own
constantly running software (a REXX) will then, a) for every file it
finds, b) invoke a process and produce a response file, c) the
response file is sent back to the emailer (this is what I think BLAT
will handle) - all a non -interruptive process. 

Structurally:
------------------
where filename uniquity (as used below) is achieved via the format:
1) todaysyyyymmdd | ascending_seqntl_number |
2) senders_email_address
e.g. 20080228001graham@chelsea.1st
       20080228002david@arsenal.2nd
     
.. and the process would be ..

1.
Do forever the email receiving handler
for any arriving email (see (A) below)
   extract the address, subject and body into a file 
   e.g.  c:\emailin\filename.cbl
endif
Enddo
i.e. as soon as an email arrives it becomes a .cbl file that my REXX
can detect.

2.
Do forever my own REXX looking for files in c:\emailin
if it finds a file
   the REXX invokes my software which uses filename.cbl as input 
   and creates a response file c:\emailout\filename.txt
endif
Enddo

3.
Do forever the email responder handler
when a c:\emailout\filename.txt file appears
   send an email to the original sender with the file attached
endwhen
Enddo
i.e whatever files I put in c:\emailout get sent immediately.
---------------------

Example (A) A typical incoming email:
-----------------------------------
From: John Doe
Subject: CONRAD
4LW=clna
       01  OLDFOR-RECORD-DESCRIPTION.  
            05  OLDFOR-REC. 
      *          10  FILLER                        PIC X(480).
                 10  FILLER                        PIC X(528).
            05  OLDFOR-FIREH-REC REDEFINES OLDFOR-REC. 
                 10  OLDFOR-IN-SGMNT. 
                      15  FILLER                   PIC X(02). 
A1                  15  OLDFOR-IN-CUST PIC X(14). 
                      15  OLDFOR-IN-INIT    PIC X(12). 
                      15  OLDFOR-IN-AMT   PIC 9(8)V99.
plus more, possibly 1000 lines  

Example (B) A response email:
----------------------------
      *``STEPL99
       IDENTIFICATION DIVISION.
       PROGRAM-ID. STEPL99.
       DATE-WRITTEN. APR 1989.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.   IBM-370.
       OBJECT-COMPUTER.   IBM-370.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
much more, possibly 5000+ lines

-- 
Posted via a free Usenet account from http://www.teranews.com
Re: Command line email receive/response handlers
#217790
Author: MartinS
Date: Sun, 16 Mar 2008 05:03
13 lines
1313 bytes
Graham Hobbs <ghobbs@cdpwise.net> wrote:

> Hello,
> 
> I've been in msdos.batch and got some useful information about a
> problem I have. As a result I did some reading about Pegasus,
> Email2db, 40tude, BLAT and Getmail, etc email handlers. For an old
> mainframer the reading was heavy and some confusion remains.

Wrong group. This is for usenet clients.

-- 
Martin S.
Re: Command line email receive/response handlers
#217791
Author: Blinky the Shark
Date: Sun, 16 Mar 2008 08:50
20 lines
1968 bytes
Graham Hobbs wrote:

> Hello,
> 
> I've been in msdos.batch and got some useful information about a problem I
> have. As a result I did some reading about Pegasus, Email2db, 40tude, BLAT
> and Getmail, etc email handlers. For an old mainframer the reading was
> heavy and some confusion remains.

NEWS.software.readers, Graham.

Perhaps comp.mail.misc would be of some help.


-- 
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Blinky: http://blinkynet.net
Re: Command line email receive/response handlers
#217793
Author: Mike Easter
Date: Sun, 16 Mar 2008 11:10
13 lines
1465 bytes
Graham Hobbs wrote:

> An email arrives, contents are processed, a text file is emailed back
> in  < 10 minutes - no manual intervention.

Before you take this over to a mail group, give some thought to the idea
that if this system is going to be subjected to spam or other mail with
bogus From, that you will be generating tons of misdirected
autoresponses.

-- 
Mike Easter
Re: Command line email receive/response handlers
#217808
Author: Graham Hobbs
Date: Mon, 17 Mar 2008 00:08
34 lines
2218 bytes
Thanks, I knew this was a NEWS group but didnt know where to go. Am
now on my way to comp.mail.misc. The comment about the spam - very
useful. Never crossed my mind so thanks are in order, 

But can I ask another question then..

When I receive an email and have it in a form my REXX can interpret,
the REXX will be testing for a whole slew of 'contents', certain key
words and data in a specific order, etc and if they're not there then
a) the email is deleted, b) there would be no response from my
automated system. Does that sound reasonable? I do not know the world
of spamming but should I be concerned that my machine could be used by
spammers.

Am really learning about this stuff!

On Sun, 16 Mar 2008 04:10:31 -0700, "Mike Easter" <MikeE@ster.invalid>
wrote:

>Graham Hobbs wrote:
>
>> An email arrives, contents are processed, a text file is emailed back
>> in  < 10 minutes - no manual intervention.
>
>Before you take this over to a mail group, give some thought to the idea
>that if this system is going to be subjected to spam or other mail with
>bogus From, that you will be generating tons of misdirected
>autoresponses.


-- 
Posted via a free Usenet account from http://www.teranews.com

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads