From b9586462cb5120d5ca5f4bc574ab7ec427ed152a Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sun, 13 Nov 2011 00:46:51 +0100 Subject: [PATCH] marsmail-0.2 --- README | 7 +- marsmail.doc | 222 +++++++++++++-------------------------------------- marsmail.exe | Bin 9184 -> 8608 bytes marsmail.pas | 33 ++------ monlan | 4 +- ohpostme | 2 +- pmail.bat | 49 +++++++----- 7 files changed, 92 insertions(+), 225 deletions(-) diff --git a/README b/README index 02889a0..972bf3c 100644 --- a/README +++ b/README @@ -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. diff --git a/marsmail.doc b/marsmail.doc index e43e8bb..33b10de 100644 --- a/marsmail.doc +++ b/marsmail.doc @@ -1,45 +1,31 @@ -Marsmail ver 0.2c GNU-GPL by EL GUIDO - 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 + 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 c release + 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 ohexpiry expire accounts on mars/samba + 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 ----------------- (This is no longer needed) -#1046 Feb 4 09:33 ohpostme handles posting from pegasus to unix ----------------- (End) + 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 @@ -49,20 +35,6 @@ file list: 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 @@ -74,125 +46,67 @@ 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\ must exist. -There is no mercury, but the Charon Mail Queue Emulation works fine! :-) ------------ - ------------ (The pop solution) +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.... ------------ (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/ (G: , H: , I: , etc) - HOME -> ~ (G: , H: , I: , etc) ------------ +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... +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. ------------ (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 //SYS/unixmail -(but the 0.99pl1 do it in a different way) ------------ +volume space i.e. ln -s /var/spool/mail /home/SYS/unixmail +Run pconfig to create a user defined gateway. Mine looked like this: ------------ (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) + Pegasus Mail/DOS Configuration v3.11 +____+---------------------- User Gateway Definition ----------------------+_____ +___ ¦ ¦_____ +___ ¦ Gateway name : [OH ] ¦+____ +___ ¦ *New mail path : i:\pmail\in ¦¦____ +___ ¦ Is  a program to run? : N ¦¦____ +___ ¦ *New mail search mask : *.cnm ¦¦____ +___ ¦ *Outgoing mail path : i:\pmail\OUT ¦¦____ +___ ¦ *Run for outgoing mail : ¦¦____ +___ ¦ *Filename format : ~d~d.CNM ¦¦____ +___ ¦ Run to validate address : ¦¦____ +___ ¦ *Reply address format : ~n@eng.rau.ac.za ¦¦____ +___ ¦ Accepts SMTP addresses? : Y ¦¦____ +___ ¦ Simple message headers? : Simple headers ¦¦____ +___ ¦ UUEncode attachments? : N ¦¦____ +___ ¦ Burst messages? : N ¦¦____ +___ ¦ Strip gateway name? : Y ¦¦____ +___ ¦ Force all mail through? : Y ¦¦____ +___ ¦ ¦¦____ +___ ¦ The name users will use to access this gateway. Addresses will ¦¦____ +___ ¦ be entered in the form GWNAME/address. ¦¦____ +___ ¦ ¦+____ +___ +---------------------------------------------------------------------+_____ +___ ______ -Select: Pegasus Mail/DOS Configuration v3.11 - SMTP Gateway -____+--------------- Mercury / Charon SMTP Interface ---------------+_____ -___ ¦ ¦_____ -___ ¦ Spool Interface? : [N ] ¦+____ -___ ¦ Queue Name? : CHARON ¦¦____ -___ ¦ Enabled? : Y ¦¦____ -___ ¦ Prefered? : N ¦¦____ -___ ¦ Use always? : N ¦¦____ -___ ¦ This server's name : your.name.org.contry ¦¦____ -___ ¦ Our time zone : GMT +/- #num ¦¦____ -___ ¦ Organization : organization's name ¦¦____ -___ ¦ ¦¦____ -___ ¦ The name you want placed in the Organization header of ¦¦____ -___ ¦ outgoing message. Use this to identify your site more ¦¦____ -___ ¦ clearly in your email. ¦+____ -___ +---------------------------------------------------------------+_____ -___ ______ - ----------- (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. +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. ------------ (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 ------------ +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. -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: @@ -215,21 +129,12 @@ 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 +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. -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. @@ -264,30 +169,11 @@ 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. +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! -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) ----------- diff --git a/marsmail.exe b/marsmail.exe index 579bbbcc9365176de13ae078c4d8187bc46a4f65..69efa4986f69ba4342ca30a85ec821b70c9a4fa9 100755 GIT binary patch delta 4109 zcmb8x4{#LK9l-Iod$*T_4F?Kd5a>yyjEt!YGl4dt9GP~ABWmVcC5JIE1QE;>5G7~r z_-BJOElCvroQmuylN4c8bWl-yU}a-FjTuq#&mc3QIR2%%nvP|rg<%Rwzi;<)w|DvD z)R_48;iMP;&_izMX;v~Mq zd8h?K6yRcnF%$DpiAA^pwYUZAaTk7#R%}B8yYV9S;hh3gh;AMZ;{?9K-*F13Aqs`i zFaeV>9aUJ2CAb}TVH=)C2X^CSbmK5S!q@1-KXC@<5M+6$nEX?Y2&!={qF9Ds;kRhT zHgsS&Uc~D-fF7JjXq*t!Fax*aUObB3*oOo73wrP+PU2rM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UAE@ zTFVXjUL|^f1qyv~!+DQ2*Po(&?bz?J&N0Hoe^vdWK4FLHL{r!4N#;ZD5B4(I!m0k-;Q^sO-{drOp}Yv?eO5-hRnj^QoKPU zD7BdMn%g$T=Z!4EO?3J=G*7Mi#^;C=_*@!~@xV{z7l=L?fJue}g z?v7Yw_)1#4zhfDE_=H8*j+?5-W{M&jRXBa7>!WHdm%r~R(I(NvMR97O{&lam%eB`d zeGo@0<)3UcCel#ou~~L;OI6AeHH(;_K19D?Yv*jL`1q6Ocy-!hUQt_8EHDUMBQRon zG1iGO;6P!Sb~8JSSE|J8ytRz}%H&3hr122me>L_==QSObdo zmb8787PNa!J0Xl68oxyT?;WCT=2N-xU8KEvnVv!P%5S9G5#C4mPeFdWelrjLmq`0t z8t858&2~j6Yt$T_3()t z*CE$K;*e{mnAhL1Skz`vD{%SN@!I6ICsW(~cX~bwgk6rgliJS;>E^Hc|9r7NwfVIZ zw~plmKB%~Cqr-E3E%#@xl*YAe%`BWCyGmRoq0JU&iL-01#o2Yq5~_B#sF~lC`dSuG z`1-x%JG*9RiQ1Q`7PWfZnf3`gCCPmzKl`#na<>e)CT8=ReJRlC&wRSha^`P-Yge8K XEwY_+x6I0MQE+umr$l$trat*UC#3`^ diff --git a/marsmail.pas b/marsmail.pas index 0d5d415..bf41866 100755 --- a/marsmail.pas +++ b/marsmail.pas @@ -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} + diff --git a/monlan b/monlan index 75bd374..df4d8d6 100755 --- a/monlan +++ b/monlan @@ -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 diff --git a/ohpostme b/ohpostme index 2f0e48f..43ae518 100755 --- a/ohpostme +++ b/ohpostme @@ -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. diff --git a/pmail.bat b/pmail.bat index a95239d..f7ab53c 100755 --- a/pmail.bat +++ b/pmail.bat @@ -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%\.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