mars-mail/pmail.bat

50 lines
1.9 KiB
Batchfile
Raw Permalink Normal View History

2011-11-13 00:46:51 +01:00
@echo off
2011-11-13 00:46:51 +01:00
rem This batch file gets called when a dos user wants to run pmail from
2011-11-13 00:46:51 +01:00
rem a menu or command line. It relies on I: mapped to his user dir
rem and a valid pmail.ini that points to the correct gateways for
rem posting to be picked up with ohpostme.
2011-11-13 00:46:51 +01:00
rem It calls marsmail.exe to convert the unix mail file into readable
2011-11-13 00:46:51 +01:00
rem pmail messages. Note: The look for new mail option under pmail
rem wont work, exit pmail and restart it to have marsmail run again...
rem Use a unix2dos before using this file...
rem by linking the unix /var/spool/mail to SYS:/unixmail the user
rem can only access his own mailbox. Looks fairly secure...
2011-11-13 00:46:51 +01:00
rem 1/1000000 chance that user runs marsmail during a mail delivery
rem that might damage the last message coming in... Anybody have any
rem ideas?
2011-11-13 00:46:51 +01:00
rem might check the CaSEseNsitivity of ohpostme. pmail gets created from
rem skel...
if not exist i:\pmail\nul mkdir i:\pmail > nul
if not exist i:\pmail\out\nul mkdir i:\pmail\out > nul
if not exist i:\pmail\in\nul mkdir i:\pmail\in > nul
2011-11-13 00:46:51 +01:00
rem variable name get's set in the master login script to the user's
2011-11-13 00:46:51 +01:00
rem login name.
set pmuser=%name%
2011-11-13 00:46:51 +01:00
2011-11-13 00:46:51 +01:00
Echo Please wait -- converting mail from unix to dos format...
unix2dos f:\unixmail\%name% > i:\pmail\in\mailfile.dos
2011-11-13 00:46:51 +01:00
2011-11-13 00:46:51 +01:00
rem zero.txt is a file zero bytes long but MUST exists!
rem J: points to mapping where applications reside..
rem f:\unixmail is a ln -s /var/spool/mail subdirofmarssysvolume
2011-11-13 00:46:51 +01:00
2011-11-13 00:46:51 +01:00
copy j:\dos\net\pmail\zero.txt f:\unixmail\%name% > nul
rem The line above resets the mail file to zero after converting it to
rem pmail format.
2011-11-13 00:46:51 +01:00
2011-11-13 00:46:51 +01:00
j:\dos\net\pmail\marsmail.exe
2011-11-13 00:46:51 +01:00
rem Marsmail is the program that strips the unix mailfile appart and generates
rem a index file and loose message files... Source is included... Please
rem recompile to your needs...
2011-11-13 00:46:51 +01:00
i:
cd \pmail\in
2011-11-13 00:46:51 +01:00
2011-11-13 00:46:51 +01:00
rem please correct the path below to point to your pmail executable.
j:\dos\net\pmail\pmail.exe -a
2011-11-13 00:46:51 +01:00