home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/padua
/
padua.7z
/
padua
/
uucp
/
gensys0.11.lha
/
gensys.notifyuser
< prev
next >
Wrap
Text File
|
1993-12-19
|
3KB
|
90 lines
/* gensys.notifyuser, (c) Sun, 19 Dec 1993 04:35:37 +0100 by "Kai 'wusel' Siering" <wusel@3jean[.uucp|.hanse.de]> */
/*
* $Header:$
* $Log:$
*
*/
HostName = ''
DomainName = ''
NewsMaster = ''
UserName = ''
Organization= ''
TmpFileName = 't:gensys.'pragma('ID')'.tmp'
TargetSite = 'manual-host'
if(open(conf, "uulib:config", r)) then do
do while ~eof(conf)
in=readln(conf)
in2 = Translate(in, ' ', D2C(9))
parse var in2 key cont
select
when upper(key)="NODENAME" then HostName = strip(cont)
when upper(key)="DOMAINNAME" then DomainName = strip(cont)
when upper(key)="NEWSMASTER" then NewsMaster = strip(cont)
when upper(key)="USERNAME" then UserName = strip(cont)
when upper(key)="ORGANIZATION" then Organization = strip(cont)
otherwise nop
end
end
err=close(conf)
end
else do
say 'Configuration file (UUlib:config) not found, aborting.'
exit(20)
end
if NewsMaster = '' then NewsMaster = UserName
if NewsMaster = '' then NewsMaster = 'postmaster'
ThisSite = HostName||DomainName
if(open(out, TmpFileName, 'write')) then do
call writeln(out, 'From: 'NewsMaster'@'ThisSite)
call writeln(out, 'Subject: setsys')
call writeln(out, 'To: postmaster@'TargetSite)
call writeln(out, 'Reply-To: 'UserName'@'ThisSite)
call writeln(out, 'Organization: 'Organization)
call writeln(out, '')
call writeln(out, 'Moin,')
call writeln(out, '')
call writeln(out, 'mein wahnsinnig genialer Daemon hat festgestellt, dasz ich')
call writeln(out, 'von Dir folgende Gruppen braeuchte, die Du mir bitte ein-')
call writeln(out, 'tragen moechtest (sofern Du einen Automatismus zur Aende-')
call writeln(out, 'rung meines sys-Eintrags hast, teile mir bitte die notwen-')
call writeln(out, 'digen Daten mit, damit dies in Zukunft automatisch geht).')
call writeln(out, '')
call writech(out, HostName'/'ThisSite':')
LeftPos=40
SetComma=0
do forever
Line = readln(stdin)
if eof(stdin) then break
if(SetComma=1) then call writech(out, ',')
if(LeftPos+Length(Line)>78) then do
call writeln(out, '\')
LeftPos=1
end
SetComma=1
call writech(out, compress(Line))
LeftPos=LeftPos+Length(Line)
end
call writeln(out, '/all:F:')
call close(out)
address COMMAND 'sendmail <'TmpFileName
address COMMAND 'delete 'TmpFileName' >nil:'
end
else
do
say 'Can''t open 'TmpFileName' for writing ...')
exit(20)
end