[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1093.0. "Removing SMTP routing info from message" by ODIXIE::BIRCH () Tue Jul 21 1992 20:32

Trying to find a way to modify incomming messages to ALL-IN-1 from a 
SMTP (Wollongong TCP/IP) network, to remove extra routing information 
embeded in the text.

The message comes into the Wollongong box from the DDN network, and is sent 
through MRGATE to ALL-IN-1.  The message includes information on every node 
it has passed through, which is about 1/2 a page of text.  

I would like to interupt the flow of the message and strip out the routing
text before delivering it to the user.

Any ideas on how this can be accomplished?

Thanks,
    

T.RTitleUserPersonal
Name
DateLines
1093.1IOSG::WDAVIESThere can only be one ALL-IN-1 MailWed Jul 22 1992 11:2410
    Difficult....if you want to make it painless.
    
    Easy way is to modify the Read options, to scan and then modify the
    files (at least in presentation to the users - you won't be able to
    easily muck around with the shared mail area)
                  
    You might be able to put a DO script call in the mail bolierplate
    which might help make it easier, but I'm not sure if that will work.
    
    Winton
1093.2This one needs some lateral thinkingFORTY2::ASHGrahame Ash @REOWed Jul 22 1992 14:015
And the heavyweight solution is to intercept it out in MR with an MRIF 
application which can read and rewrite the bodypart - something similar to 
MRXLATE (notes conf on Forty2:: if you want to check it out)

grahame
1093.3Using a modified read optionODIXIE::BIRCHFri Jul 24 1992 17:2851
    Thanks for the responses.  I went the easy route.  Here is the code. 
    The boilerplate "Mailblp" is the same as Mailmemo1.blp except the include
    includes the temp.wpl file.  A new option is added to EM$INDEX$OPTIONS
    which calls the script.
    
    
get oa$curmes=oa$scroll_key
cabinet current oa$curmes
get #file=cab$.filename[oa$curmes]
!
!Open a file to put the keep message stuff
	TEXT_FILE OPEN OUT "temp.wpl" /write
	TEXT_FILE OPEN #FOO #file /read
!
!Look for the word Return in first line of message
.label startread
	TEXT_FILE READ #FOO
	.if oa$status eqs 0 then .goto done
	get #rec=#text_file_rec
	.if #rec:11 eqs "Return-Path" then .goto dumpit
	TEXT_FILE WRITE OUT #REC
.label cread
	TEXT_FILE READ #FOO
	.if oa$status eqs 0 then .goto done
	get #rec=#text_file_rec
	TEXT_FILE WRITE OUT #REC
.goto cread

!	First line of message was word Return.  discard all untill blank line
.label dumpit
	TEXT_FILE READ #FOO
	.if oa$status eqs 0 then .goto done
	get #rec=#text_file_rec
	.if #rec nes " " then .goto dumpit
	TEXT_FILE WRITE OUT #REC
.goto cread

!Done .. Display text, clean up, refresh screen etc.
.label done
	display SMTP Addressing removed\force
	text_file close #foo
	text_file close out
	list<merge general$apps:mailblp
	dump_cache
WRITE CHANGE CAB$ .%KEY =OA$CURMES,MODIFY="Y",DELETE="Y",MAIL_STATUS="READ"
	CABINET DELETE_OR_REFILE ,"READ"
	CABINET DECREMENT_COUNT "MAIL"
	delete_file temp.wpl
	oa$scl_update cab$.%address[oa$curdoc]
	oa$scl_refresh