TIP: Click on subject to list as thread! ANSI
echo: os2bbs
to: ANDREW LEARY
from: RON MITCHELL
date: 1996-10-19 12:05:00
subject: Fido packets via internet email

Andrew Leary wrote in a message to Ron Mitchell:
-=> Quoting Ron Mitchell to Herman Hanschke <=-
 RM> I send BRE packets via the Internet automatically using EMail.  All I
 RM> use is NetMgr, some creative cmd files, and a couple of different
 RM> extraction utilities since the guy I send to keeps bouncing back and
 RM> forth between MIME and UUENCODE. 
AL> I'd be interested in seeing how you do this.  I already use NetMgr
AL> (great program), so I'd just need to see your .CMD files.  Can you
AL> make them available for FREQ or ftp somewhere?
This seems to be something that at least a few OS/2 BBS sysops are interested 
in so I'll just post it here.  :)
First, you have to have a registered copy of Netmgr so the Xtended options 
work.  I use the Xmask option to set up a header for sending:
-----------------------------------------
DefineXmask brepost
	 from    bre
	 to	    msftrncs@htcnet.com
	 subject BRE DATA PACKET
	 orig    1:362/627.0
	 dest    1:362/627.99
End
-----------------------------------------
To find the inbound packets I use the following from netmgr.cfg.
This will write the message to a file that I operate on(tmptmp.tmp) and a 
file that I use for a log in case something goes wrong and I need to redo it 
manually(brestuf.txt).  It also issues a semophore to let the processing cmd 
know that a packet has come in.  I could delete the message after, but I just 
rewrite it as recieved and leave it to let me know that a packet has come in.
-----------------------------------------
Mask ~Carl Morris, 1:362/627.99, ~Ron Mitchell, 1:362/627.0, BRE Data Packet, 
-r
Mask ~Carl Morris, 1:362/627.99, ~bre, 1:362/627.0, ~BRE Data Packet, -r
;
Action File d:\ipost\netmgr\tmptmp.tmp
Action File d:\ipost\netmgr\brestuf.txt
Action Semaphore d:\bbs\bink\flags\bre391.flg
Action Rewrite *, *, *, *, *, +r
------------------------------------------
The following segment of my main mail processing cmd file checks for the 
existance of the semaphore and acts on it.
------------------------------------------
:cont1
if not exist d:\bbs\bink\flags\bre391.flg goto cont2
call d:\ipost\netmgr\brepro.cmd
if exist c:\doors\bre.391\outbound\391b0*.* 
   [join this line to last]	call c:\doors\bre.391\outbound\do_bre.cmd
del d:\bbs\bink\flags\bre391.flg goto cont2
:cont2 
------------------------------------------
The following are the cmd files that do the processing:
brepro.cmd
------------------------------------------
@echo off
cls
d:
cd d:\ipost\netmgr
find /I "multi-part message in MIME format" tmptmp.tmp
if errorlevel 2 goto over
if errorlevel 1 goto zip
munpack tmptmp.tmp
goto work
:zip
echo   ******	UUDecoding BRE packets  ******
extract tmptmp.tmp
:work
d:
cd d:\bbs\bink\fileprot
pkunzip -o d:\ipost\netmgr\*.zip
echo   ******	Applying packet  ******
c:
cd c:\doors\bre.391
if not exist inuse.flg call update.bat
echo   ******	Cleaning up!!	******
d:
cd d:\ipost\netmgr
del d:\ipost\netmgr\tmptmp.tmp
del d:\ipost\netmgr\*.zip
del d:\ipost\netmgr\*.dsc
del d:\max\bre391.txt
:over
cls
------------------------------------------
do_bre.cmd
------------------------------------------
@echo off
cls
c:
cd c:\doors\bre.391\outbound
if not exist c:\doors\bre.391\outbound\391b0301.* goto over
for %%1 in (391b0301.*) do call in_bre.cmd %%1
c:
cd c:\doors\bre.391\outbound
del 391b0301.*
del *.msg
:over
cd c:\doors\bre.391
------------------------------------------
in_bre.cmd
------------------------------------------
@echo off
cls
c:
cd c:\doors\bre.391\outbound
if "%1" == "" goto end
uuencode %1
ren *.uue breout.txt
d:
cd d:\ipost\netmgr
netmgr POST -xbrepost -ad:\ipost\mail -fc:\doors\bre.391\outbound\breout.txt
c:
cd c:\doors\bre.391\outbound
del breout.txt
------------------------------------------
This is extremely rough and has not been optimized for OS/2.  I was using 
this setup before I switched over to OS/2 and since it still worked it has 
been put on the back burner while I fine tune and get working the things I 
broke in the changeover. 
You'll notice that, for BRE anyway, I changed the standard outbound to 
another directory so I could manipulate the file and uuencode it.
The same basic setup should work fine for mail packets also.  The only 
drawbacks I can see are splitting of the messages, and if you can get your 
gateway operator to set up a special user and write the file to a text file 
instead of tossing it and sending it via standard netmail, you will avoid 
this problem.
L8r,
				   Ron
... "You can observe a lot by watching." - Yogi Berra
---
---------------
* Origin: River Canyon Rd. BBS 423-886-2521/3120 (1:362/627)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.