3 Commits

Author SHA1 Message Date
Mario Fetka
76d298045b correct install dir 2011-11-13 19:31:19 +01:00
Mario Fetka
e49fb581e4 restructure 2011-11-13 18:04:08 +01:00
Mario Fetka
b9586462cb marsmail-0.2 2011-11-13 00:46:51 +01:00
11 changed files with 263 additions and 350 deletions

46
CMakeLists.txt Normal file
View File

@@ -0,0 +1,46 @@
#################################
# Project
##############
#################################
# Dependencies
##############
#################################
# Compiler Switches
##############
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/include
)
if (CMAKE_SYSTEM_NAME MATCHES Linux)
add_definitions(
-DLINUX -D_GNU_SOURCE -Dsignal=__sysv_signal
)
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
add_definitions(
-D_VERS_H_=\"${VERSION_MAJOR}\"
-D_VERS_L_=\"${VERSION_MINOR}\"
-D_VERS_P_=\"${VERSION_PATCH}\"
)
#################################
# Source Files
##############
#add_executable( net logon.c ... )
#################################
# Linking
##############
#################################
# Install Files
##############
install(FILES marsmail.exe pmail.bat pmgate.sys ohlogscr.bat pmdflts.ini DESTINATION ${MARS_NWE_INSTALL_FULL_FILEDIR}/SYS/public)

7
README
View File

@@ -5,9 +5,4 @@ Authors: Gert Cronje: gac@eng.rau.ac.za
Eddie Dunckley: eddie@eng.rau.ac.za
Francois Wolmarans: fwo@eng.rau.ac.za
Modification for Natural Netware Mail by:
Guillermo Dominguez A: guido@lux.labinf.uaa.mx
Please contact Eddie for bug reports in the scripts, etc.etc.
Please contact Guido for bug report on marsmail.pas (Natural Netware Mail).
Please contact Eddie for bug reports etc.etc.

179
doc/marsmail.doc Normal file
View File

@@ -0,0 +1,179 @@
Marsmail ver 0.2 GNU-GPL by Eddie Dunckley & Gert Cronje of RAU Engineering.
---------------- bug reports:eddie@eng.rau.ac.za gac@chopin.rau.ac.za
This whole package is licensed under the GNU Public License.
See the file COPYING for details.
Marsmail is a pascal frontend for mail that translates the
unix mailfile into smaller files that pegasus mail understands.
Please examine all the files carefully as this is not a commercial
program suite, it's freeware. Written by staff/students for students..
file list:
----------
327 Feb 4 11:53 marsmail.doc This doc file
8608 Feb 4 11:48 marsmail.exe dos executable to convert mail
5480 Feb 4 12:51 marsmail.pas dos sources for marsmail
1430 Feb 4 13:32 monlan Basic monitor for LAN/WAN
12051 Feb 4 13:12 newuser.pl Process the user application
3757 Feb 4 12:50 nomasteruser deletes users with cleanup
4080 Feb 4 11:32 ohbirthcheck birthday reminder script
793 Feb 4 11:34 ohexiry expire accounts on mars/samba
13141 Feb 4 13:18 ohform.htm User application form for Mars server
1296 Feb 4 11:35 ohlogscr.bat modified supervisor login script
690 Feb 4 09:32 ohmail automatic mail notifier start script
6648 Feb 4 10:50 ohmasteruser creates new users with extra features
1381 Feb 4 09:27 ohmessage automatic mail notifier main script
1046 Feb 4 09:33 ohpostme handles posting from pegasus to unix
3585 Feb 4 10:35 ohquota Disk quota accounting automated
856 Feb 4 09:34 ohsendnt Console broadcast script
1954 Feb 4 11:45 pmail.bat front-end dos batch file for pmail
8161 Feb 4 11:48 pmdflts.ini pmail defaults for all users
1024 Feb 4 11:48 pmgate.sys USER defined gateway via pconfig
859 Feb 4 11:00 wwwhomepage Creates homepages for new users.
what's new
----------
Lot's of automation....
Lot's of new ideas ie birthday reminders, expiry scripts etc etc
Better docs
Procedure:
----------
Take a deep breath and realize that there is no install script.
Make sure your mars is running successfully and dos users can log into
the server with normal novell client software. Make sure your directory
layout for Mars looks simmular to the one listed in this document. Get a good
editor for linux to edit the scripts to suite your company's needs. Get
the pegasus mail program from one of it's mirror sites. Unpack and follow it's
install method. DON't use pegasus's bindery features to fetch mail in the
SYS:\mail locations. This requires a mercury.nlm that cannot run on linux.
You can attempt using the pmpop utilities for dos to fetch mail via pop from
the server, (which might have been the best possible solution if it worked),
but there is a seperate project to edit the ini file on the fly for multiple
users....
Make sure you map drive I: to the user's home directory (or change the
scripts). I've used a map root i:=sys:\home\%name% to do this in the
master mars login script that can be created with syscon.
Start by examining each script carefully - there is a lot of undocumented
features in them... Then start by editing the pmdflts.ini to suite your needs.
Use the one included as a template. Read the pmail docs carefully.
Link your unix mailboxes into your mars SYS
volume space i.e. ln -s /var/spool/mail /home/SYS/unixmail
Run pconfig to create a user defined gateway. Mine looked like this:
Pegasus Mail/DOS Configuration v3.11
____+---------------------- User Gateway Definition ----------------------+_____
___ <20> <20>_____
___ <20> Gateway name : [OH ] <20>+____
___ <20> *New mail path : i:\pmail\in <20><>____
___ <20> Is  a program to run? : N <20><>____
___ <20> *New mail search mask : *.cnm <20><>____
___ <20> *Outgoing mail path : i:\pmail\OUT <20><>____
___ <20> *Run for outgoing mail : <20><>____
___ <20> *Filename format : ~d~d.CNM <20><>____
___ <20> Run to validate address : <20><>____
___ <20> *Reply address format : ~n@eng.rau.ac.za <20><>____
___ <20> Accepts SMTP addresses? : Y <20><>____
___ <20> Simple message headers? : Simple headers <20><>____
___ <20> UUEncode attachments? : N <20><>____
___ <20> Burst messages? : N <20><>____
___ <20> Strip gateway name? : Y <20><>____
___ <20> Force all mail through? : Y <20><>____
___ <20> <20><>____
___ <20> The name users will use to access this gateway. Addresses will <20><>____
___ <20> be entered in the form GWNAME/address. <20><>____
___ <20> <20>+____
___ +---------------------------------------------------------------------+_____
___ ______
Check if your unixmail is secure i.e. mars users cannot read each others mail.
This can be done by loggin in from a dos box with different user names and
trying to view the sys:\unixmail\%name% files
Edit the pmail.bat to suite your needs. Make sure the drive mappings is correct.
i.e. I: maps to userdir. Compile the marsmail.pas to suite your needs if needed.
Test to see if you can read mail from pegasus and that the gateway places
outgoing messages in i:\pmail\out.
Edit the ohpostme scripts until it posts mail out for your users.
This can be tested by posting a message with pmail, seeing if a file is created
in i:\pmail\out, and waiting for ohpostme to visit the directory, removing and
posting the file.
Deploy (!) the ohmail and ohmessage scripts to run out of rc.local or however
you prefer. See if it notifies the user when new mail arrives.... You can
tail -f the log files to see what is happening. A note on samba notification:
the message gets sent to a machine instead of a user.
Decide if you want to use the new adduser script called ohmasteruser and
nomasteruser for creating users and destroying users on a mars aware unix
server. MAKE BACKUPS of your original passwd files etc before continueing.
Note this new adduser creates /etc/expiry /etc/birthdays /etc/ohmyusers
/etc/ohmaillist
Remove users from ohmaillist to prevent them from mailing
Remove users from expiry to prevent account expiry
Remove users from birthdays to prevent birthday notification
Please note the change to passwd file:
auser:x:505:512:A dummy user:/hamster/home/./auser:/etc/ftponly
The extra dot after home forces ftp to see this as the root, thus
allowing the ftp to enter ../httpd/html/auser via the link. Note that
/app or unixmail cannot be reached via ftp.
Edit your mars's net$log.dat in SYS:\public to exit to the extended login
script ohlogscr.bat that actually creates the users with a default password
on the mars server. Modify the wwwhomepage script to create homepages for
your new users.
You might need to either install quotas or remove mentioning of quotas from
the scripts.
Customize the ohform.htm to your needs and decide if you would like to use it
as a user application form from the web. The apache server can run on the
same server as mars.... ohform.htm calls newuser.pl that creates a script file
to ease the user creation. newuser.pl sends mail to admin user to inform him
of the new application.
These scripts can handle shadow passwords. Create a blank file /etc/ftponly
and use this dummy shell for users to prevent them from telnetting to the
server. Mail fetching via pop and ftp will continue to work.
Suggested directory structure for good operation...
/apps
/base
/base/SYS (mars server SYS volume)
/base/SYS/unixmail ln -s /var/spool/mail /base/SYS/unixmail
/base/SYS/apps ln -s /apps /base/SYS/apps
/base/SYS/home ln -s ../home home
/base/home base home directories
/base/home/auser (Yip, the user's home dir)
/base/home/auser/www ln -s ../httpd/html/dummyuser www
/base/home/auser/pmail gets created from /etc/skel used for pmail
/base/home/httpd/html Web server root space
/base/home/httpd/html/main non-user related space.
/base/home/httpd/html/auser (user's www space)
You can now even share the apps, home dirs and unixmail with samba and you've
got a complete novell and nt server all in one, sharing the same space!
If you find ANY errors with this doc or missing files please let me know...
The marsmail is just a dirty hack to satisfy the dos users. Stick with
pop3 or imap to fetch mail via tcpip from win95, os2, wfw, linux and other.
The other stuff included with marsmail is just to automate as much as possible
for our poor overworked netadmins!

View File

@@ -1,293 +0,0 @@
Marsmail ver 0.2c GNU-GPL by EL GUIDO <guido@lux.labinf.uaa.mx> - UAA
& Eddie Dunckley & Gert Cronje of RAU Engineering.
the c is for the charon mail queue emulation
---------------- bug reports:guido@lux.labinf.uaa.mx
Marsmail ver 0.2 GNU-GPL by Eddie Dunckley & Gert Cronje of RAU Engineering.
---------------- bug reports:eddie@eng.rau.ac.za gac@chopin.rau.ac.za
--------- (License)
This whole package is licensed under the GNU Public License.
See the file COPYING for details.
---------
Marsmail is a pascal frontend for mail that translates the
unix mailfile into smaller files that pegasus mail understands.
--------- (Added)
This version doesn't need the unix2dos application for marsmail (works alone)
---------
Please examine all the files carefully as this is not a commercial
program suite, it's freeware. Written by staff/students for students..
--------- (And now, teachers for teachers too. )
file list:
----------
327 Feb 4 11:53 marsmail.doc The marsmail-02c doc file
8608 Feb 4 11:48 marsmail.exe dos executable to convert mail
5480 Feb 4 12:51 marsmail.pas dos sources for marsmail c release
1430 Feb 4 13:32 monlan Basic monitor for LAN/WAN
12051 Feb 4 13:12 newuser.pl Process the user application
3757 Feb 4 12:50 nomasteruser deletes users with cleanup
4080 Feb 4 11:32 ohbirthcheck birthday reminder script
793 Feb 4 11:34 ohexpiry expire accounts on mars/samba
13141 Feb 4 13:18 ohform.htm User application form for Mars server
1296 Feb 4 11:35 ohlogscr.bat modified supervisor login script
690 Feb 4 09:32 ohmail automatic mail notifier start script
6648 Feb 4 10:50 ohmasteruser creates new users with extra features
1381 Feb 4 09:27 ohmessage automatic mail notifier main script
---------------- (This is no longer needed)
#1046 Feb 4 09:33 ohpostme handles posting from pegasus to unix
---------------- (End)
3585 Feb 4 10:35 ohquota Disk quota accounting automated
856 Feb 4 09:34 ohsendnt Console broadcast script
1954 Feb 4 11:45 pmail.bat front-end dos batch file for pmail
8161 Feb 4 11:48 pmdflts.ini pmail defaults for all users
1024 Feb 4 11:48 pmgate.sys USER defined gateway via pconfig
859 Feb 4 11:00 wwwhomepage Creates homepages for new users.
what's new
----------
pmail.bat script dosn't need unix2dos anymore, the marsmail have an better
readline logic that understand the unix lines. (EL GUIDO)
----------
marsmail read directly from the user's spool mail, don't need make copies.
----------
marsmail let the unix mail directly into the user's mail directories on novell
----------
marsmail uses a Charon alike Print Queue for mail output
----------
Lot's of automation....
Lot's of new ideas ie birthday reminders, expiry scripts etc etc
Better docs
Procedure:
----------
Take a deep breath and realize that there is no install script.
Make sure your mars is running successfully and dos users can log into
the server with normal novell client software. Make sure your directory
layout for Mars looks simmular to the one listed in this document. Get a good
editor for linux to edit the scripts to suite your company's needs. Get
the pegasus mail program from one of it's mirror sites.
Unpack and follow it's install method.
----------- (This is obsolete)
#DON't use pegasus's bindery features to fetch mail in the
#SYS:\mail locations. This requires a mercury.nlm that cannot run on linux.
----------- (New Feature)
The marsmail-02c needs the bindery features to work, this is the natural mail
on Netware. The SYS:\mail\<userid> must exist.
There is no mercury, but the Charon Mail Queue Emulation works fine! :-)
-----------
----------- (The pop solution)
You can attempt using the pmpop utilities for dos to fetch mail via pop from
the server, (which might have been the best possible solution if it worked),
but there is a seperate project to edit the ini file on the fly for multiple
users....
----------- (My comments)
I didn't investigated about this, but someone reading this could :-))
-----------
----------- (This is obsolete too!)
#Make sure you map drive I: to the user's home directory (or change the
#scripts). I've used a map root i:=sys:\home\%name% to do this in the
#master mars login script that can be created with syscon.
----------- (New Feature)
The volumes required for this new c release are:
Volume Route Drive
-------- ----------- -------
SYS -> route/SYS F:
...others... route/<VOL> (G: , H: , I: , etc)
HOME -> ~ (G: , H: , I: , etc)
-----------
Start by examining each script carefully - there is a lot of undocumented
features in them...
----------- (This os more obsolete!!!)
#Then start by editing the pmdflts.ini to suite your needs.
#Use the one included as a template. Read the pmail docs carefully.
----------- (New Feature)
Just install the pmail suite and reconfigure the gateway (see this part next).
-----------
----------- (This is important!!!)
Link your unix mailboxes into your mars SYS
volume space i.e. ln -s /var/spool/mail /<route>/SYS/unixmail
(but the 0.99pl1 do it in a different way)
-----------
----------- (This Changed)
Run pconfig to create a SMTP gateway. Use the name of a Print Queue defined on the
/etc/nwserv like a charon mail queue.
-----------
----------- (This is for the SMTP gateway)
Select: Pegasus Mail/DOS Configuration v3.11
SMTP Gateway
____+--------------- Mercury / Charon SMTP Interface ---------------+_____
___ <20> <20>_____
___ <20> Spool Interface? : [N ] <20>+____
___ <20> Queue Name? : CHARON <20><>____
___ <20> Enabled? : Y <20><>____
___ <20> Prefered? : N <20><>____
___ <20> Use always? : N <20><>____
___ <20> This server's name : your.name.org.contry <20><>____
___ <20> Our time zone : GMT +/- #num <20><>____
___ <20> Organization : organization's name <20><>____
___ <20> <20><>____
___ <20> The name you want placed in the Organization header of <20><>____
___ <20> outgoing message. Use this to identify your site more <20><>____
___ <20> clearly in your email. <20>+____
___ +---------------------------------------------------------------+_____
___ ______
---------- (This is for the Charon alike emulation)
Declare a Print Queue on the /etc/nwserv.conf like this:
21 CHARON SYS:/PRINT/O /usr/sbin/mailout
The mailout is a executable (755 mode) file with this line:
# File that emulate the Charon Mail Gateway
(sed "1,3d" | /usr/sbin/sendmail -t)
#End of file
-----------
----------- (This is very important!!)
Check if your unixmail is secure i.e. mars users cannot read each others mail.
This can be done by loggin in from a dos box with different user names and
trying to view the sys:\unixmail\%name% files
-----------
Edit the pmail.bat to suite your needs.
----------- (This is more more obsoleted !!!)
#Make sure the drive mappings is correct.
#i.e. I: maps to userdir.
----------- (New Feature)
Just need the SYS:/mail drive mapping correct
-----------
Compile the marsmail.pas to suite your needs if needed.
----------- (Ahooommmm, more obsolted !!!)
#Test to see if you can read mail from pegasus and that the gateway places
#outgoing messages in i:\pmail\out.
-----------
----------- (This is no more used !!!)
#Edit the ohpostme scripts until it posts mail out for your users.
#This can be tested by posting a message with pmail, seeing if a file is created
#in i:\pmail\out, and waiting for ohpostme to visit the directory, removing and
#posting the file.
-----------
----------- (This was no tested !!!)
Deploy (!) the ohmail and ohmessage scripts to run out of rc.local or however
you prefer. See if it notifies the user when new mail arrives.... You can
tail -f the log files to see what is happening. A note on samba notification:
the message gets sent to a machine instead of a user.
Decide if you want to use the new adduser script called ohmasteruser and
nomasteruser for creating users and destroying users on a mars aware unix
server. MAKE BACKUPS of your original passwd files etc before continueing.
Note this new adduser creates /etc/expiry /etc/birthdays /etc/ohmyusers
/etc/ohmaillist
Remove users from ohmaillist to prevent them from mailing
Remove users from expiry to prevent account expiry
Remove users from birthdays to prevent birthday notification
Please note the change to passwd file:
auser:x:505:512:A dummy user:/hamster/home/./auser:/etc/ftponly
The extra dot after home forces ftp to see this as the root, thus
allowing the ftp to enter ../httpd/html/auser via the link. Note that
/app or unixmail cannot be reached via ftp.
----------- (No tested)
----------- (This is no more needed (hope) !!!)
#Edit your mars's net$log.dat in SYS:\public to exit to the extended login
#script ohlogscr.bat that actually creates the users with a default password
#on the mars server. Modify the wwwhomepage script to create homepages for
#your new users.
----------- (the work is just ....)
Edit your mars's net$log.dat adding this two lines to the end
DOS SET ID=%USER_ID%
DOS SET LN=%LOGIN_NAME%
-----------
----------- (this was untouched)
You might need to either install quotas or remove mentioning of quotas from
the scripts.
Customize the ohform.htm to your needs and decide if you would like to use it
as a user application form from the web. The apache server can run on the
same server as mars.... ohform.htm calls newuser.pl that creates a script file
to ease the user creation. newuser.pl sends mail to admin user to inform him
of the new application.
These scripts can handle shadow passwords. Create a blank file /etc/ftponly
and use this dummy shell for users to prevent them from telnetting to the
server. Mail fetching via pop and ftp will continue to work.
Suggested directory structure for good operation...
/apps
/base
/base/SYS (mars server SYS volume)
/base/SYS/unixmail ln -s /var/spool/mail /base/SYS/unixmail
/base/SYS/apps ln -s /apps /base/SYS/apps
/base/SYS/home ln -s ../home home
/base/home base home directories
/base/home/auser (Yip, the user's home dir)
/base/home/auser/www ln -s ../httpd/html/dummyuser www
/base/home/auser/pmail gets created from /etc/skel used for pmail
/base/home/httpd/html Web server root space
/base/home/httpd/html/main non-user related space.
/base/home/httpd/html/auser (user's www space)
You can now even share the apps, home dirs and unixmail with samba and you've
got a complete novell and nt server all in one, sharing the same space!
If you find ANY errors with this doc or missing files please let me know...
---------- (Untouched)
---------- (This is just for fun)
#The marsmail is just a dirty hack to satisfy the dos users. Stick with
#pop3 or imap to fetch mail via tcpip from win95, os2, wfw, linux and other.
#The other stuff included with marsmail is just to automate as much as possible
#for our poor overworked netadmins!
---------- (My opinion)
The marsmail-02c is a ver hard work to improve the resources and the time on
the sessions with dos users, based on the marsmail-02 (thanxs a lot boys), but
with a lot of new features, hawever have the principal trouble on marsmail:
the user can use only one mail reader (pmail or pine), never both in a time.
New features:
a) easy of install (a very few steps)
b) reads mail in the netware natural mode
c) output mail in the natural CHARON mode
Changes:
a) The ohpostme go to the trash
b) the oh* scripts still in test (don't know if works)
Future: (the one or the scond, but not the two)
a) ask to PMAIL worktime to make a PMAIL that work with spool files
b) improve the mail read for read only the new mail for pmail
and return the undeleted mail to the spool (both readers)
----------

Binary file not shown.

View File

@@ -3,7 +3,6 @@ uses dos;
var mailfile, numfile, outfile: text;
number, miline, moline, sl, slc: string; {mail-in, mail-out}
UserId,UserLn: string; {mail dir on netware}
nfile, odir, mfile: string; {numberfile, output dir, mailfile}
numbint: longint;
o, code, mi, i,j: integer; {mailindex}
@@ -25,33 +24,12 @@ begin
FileExists := (IOResult = 0) and (FileName <> '');
end; { FileExists }
Function ReadLine(var ReadFile: Text): String;
var
C: Char;
S: String;
O: boolean;
Begin
O:=False;
S:='';
If Not EOF(ReadFile) Then Repeat
{$I-}
Read(readfile,c);
{$I+}
If EOF(ReadFile) Or (Ioresult <> 0) Or (C = #10) then
O:=True
Else
S:=S+C;
Until O;
ReadLine:=S;
End;
Begin
v:=false;
UserId:=GetEnv('ID');
UserLn:=GetEnv('LN');
nfile:='F:\mail\'+UserId+'\numfile';
mfile:='F:\unixmail\'+UserLn;
odir:='F:\mail\'+UserId;
nfile:='i:\pmail\in\numfile';
mfile:='i:\pmail\in\mailfile.dos';
odir:='i:\pmail\in';
for i:=1 to paramcount do
begin
sl:=paramstr(i);
@@ -63,7 +41,6 @@ begin
if (pos('/?',sl)=1) or (pos('/H',sl)=1) or (pos('/HELP',sl)=1) then
begin
Writeln('Copyright 1996/9 Dud software');
Writeln(' Modifications by EL GUIDO');
Writeln;
Writeln('Purpose: Creates *.cnm files from a unix mail file for Pegasus');
Writeln('Usage: marsmail.exe [/n=x:\numb\file] [/m=y:\mail\file]');
@@ -144,8 +121,7 @@ end;
while not eof(mailfile) do
begin
{readln(mailfile,miline); this was the problem, the next is the solution}
miline:=readline(mailfile);
readln(mailfile,miline);
if v then write(mi,':');
prevline:=shortline;
shortline:=false;
@@ -195,3 +171,4 @@ end;
writeln(' ');
if v then writeln('Program finished.');
end. {of program}

4
monlan
View File

@@ -7,8 +7,6 @@
FLT=0
MLOG='/var/log/unitrace.log'
LLOG='/var/log/unilast.log'
MACHINE=lc.labinf.uaa.mx
PARTOFIP=148.211
if [ ! -f $MLOG ]; then
touch $MLOG
@@ -24,7 +22,7 @@ while /bin/true; do
echo "Last error: " > $LLOG
# check for nslookup failures
/usr/bin/nslookup $MACHINE | grep '$PARTOFIP' 2>&1 > /dev/null
/usr/bin/nslookup machineinyourdomain | grep 'partofip.i.e.235' 2>&1 > /dev/null
if [ $? -eq 1 ]; then
ER="Name lookups on our domain failed on $NOW. "
echo "$ER" >> $MLOG

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# (This is no more needed on the marsmail-02c)
#
#
# This script runs through all the user dirs to collect mail that needs to
# be sent.

View File

@@ -1,38 +1,49 @@
@echo off
rem This batch file gets called when a dos user wants to run pmail from
rem a menu or command line.
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.
rem It calls marsmail.exe to convert the unix mail file into readable
rem pmail messages.
rem Need linked the unix /var/spool/mail to SYS:/unixmail
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...
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?
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
rem variable name get's set in the master login script to the user's
rem login name and the userid.
set pmuser=%ln%
set iduser=%id%
rem login name.
set pmuser=%name%
if not exist f:\mail\%id% mkdir f:\mail\%id% > nul
Echo Please wait -- converting mail from unix to dos format...
unix2dos f:\unixmail\%name% > i:\pmail\in\mailfile.dos
rem read the mail directly from the f:\unixmail\%ln% and let it on the
rem f:\mail\%id%\<files>.cnm for pegasus mail
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
marsmail.exe
rem if need routes, add it to the line before (g:\pmail\marsmail.exe)
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.
j:\dos\net\pmail\marsmail.exe
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...
rem zero.txt is a file zero bytes long but MUST exists in f:\mail !
i:
cd \pmail\in
copy f:\mail\zero.txt f:\unixmail\%name% > nul
rem call the pegasus mail reader in the natural mode
echo Please move all the mail into folders!!!
pause
pmail.exe
rem if need routes, add it to the line before (g:\pmail\pmail.exe)
rem please correct the path below to point to your pmail executable.
j:\dos\net\pmail\pmail.exe -a