home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / dialip2.zip / exmail.cmd < prev    next >
OS/2 REXX Batch file  |  1998-07-16  |  1KB  |  46 lines

  1. /* REXX */
  2. /*  Written by: Stan Towianski
  3. **  With this routine your machine can handle faxing along with internet connections
  4. **  by simply turning off one while you use the other.
  5. **   I now call this from my scheduler instead of putting the dialip command
  6. **  in it.  What I have found is that for the Chameleon mailer program if
  7. **  sendmail is running in server mode while I am connected to the internet
  8. **  if they sent me an email it would come over, but then the Cham. mailer
  9. **  would have a problem with the last 2 bytes of its send and error out.
  10. **  It would then wait and send it again and run into the same error and
  11. **  does this continuously.
  12. **  So what I do is kill sendmail before connecting to the internet.  Nobody
  13. **  can send my machine mail during this time but they don't mess up.
  14. **  Then I restart sendmail server again after disconnect.
  15. */
  16.  
  17. etc_path = value( 'ETC', , 'OS2ENVIRONMENT' )
  18.  
  19. /* kill of sendmail */
  20. rc = killbn( sendmail )
  21.  
  22. /* kill of faxworks if you have it */
  23. rc = killbn( faxworks )
  24.  
  25. call syssleep 3
  26.  
  27. /* start network interface monitor for sl line 1 */
  28. 'start nifmon sl0 1'
  29.  
  30. 'dialip -idSTANTOW -dl -sm -cm -gdm -gm -not -hu -ex -noshow'
  31.  
  32. /* kill of nifmon */
  33. rc = killbn( nifmon )
  34.  
  35. /* restart sendmail on my machine */
  36. 'start /n /min sendmail -bd -q30m -C'etc_path'\sendmail.uml'
  37.  
  38. call syssleep 6
  39.  
  40. /* restart faxworks in receiving mode */
  41. 'start /n /min D:\faxworks\faxworks -r'
  42.  
  43. 'exit'
  44. exit 0
  45.  
  46.