home *** CD-ROM | disk | FTP | other *** search
- /* A simple script script to PUT an e-mail file into a directory */
- /* Copies incoming mail file to the directory shown below. */
- /* No post processing is done, but you could easily auto-uudecode */
- /* files if you wanted to. Just watch out that people don't send any */
- /* viruses! */
-
- dir = 'mailserver:public/incoming/'
- parse arg line
-
- msg = word(line,1)
- filename = word(line,2)
-
- writeln(stdout,'Your request: PUT 'filename)
- writeln(stdout,'')
-
- if filename = '' then
- writeln(stdout,'File not accepted. You must specify a filename.')
- else
- do
- if exists(dir || filename) then
- writeln(stdout,'The file 'filename' already exists - cannot overwrite it.')
- else
- do
- writeln(stdout,'Transfer successful.')
- writeln(stdout,'Your file can be found in the 'dir' directory.')
- address command 'copy 'msg' 'dir || filename
- end
- end
-
- writeln(stdout,'')
- writeln(stdout,'--')
- writeln(stdout,'The Mailserver')
-