Changes made to enable the new Domain for a VistA instance on a single IP shared with other instances of VistA:

1. Change to allow the domain to be recognized as a mail serving domain.  In this case it is with EasyDNS that services the opensourcevista.net domain.
  EasyDNS Mx Change
 
  wvehr-2-test2.openforum.opensourcevista.net. handled by host mail2.openforum.opensourcevista.net., pref. 10
 
2. Postfix change to support Djigzo.  This tells Djigzo what port to send the mail to on the machine with the multiple instances of VistA.

    /etc/postfix/transport 

    #REMINDERS.OPENFORUM.OPENSOURCEVISTA.NET     :[66.206.177.84]:9302
    WVEHR-2-TEST2.OPENFORUM.OPENSOURCEVISTA.NET     :[66.206.177.84]:9309
    MULAB.OPENFORUM.OPENSOURCEVISTA.NET     :[66.206.177.84]:9302
    #WVEHR309A.OPENFORUM.OPENSOURCEVISTA.NET     :[66.206.177.84]:9309
    #GPL.MDC-CREW.NET                           :[68.35.27.66]:3601
    MDC-CREW.NET                            :[76.113.46.9]:3601
    VADEMO409.OPENFORUM.OPENSOURCEVISTA.NET     :[66.206.177.84]:9308
    WVEHR309.OPENFORUM.OPENSOURCEVISTA.NET     :[66.206.177.84]:9307
    WVEHR309A.OPENFORUM.OPENSOURCEVISTA.NET  :[66.206.177.84]:19320
    #NHIN.OPENFORUM.OPENSOURCEVISTA.NET      :[66.206.177.94]:9330

3. Add or edit the domain file to support the change.

   
  Select OPTION: 5  INQUIRE TO FILE ENTRIES



    OUTPUT FROM WHAT FILE: DOMAIN// 
    Select DOMAIN NAME: 66.206.177.87  
    ANOTHER ONE: wvehr-2-TEST2.OPNEFORUM.OPENSOURCEVISTA.NET  
    ANOTHER ONE: 
    STANDARD CAPTIONED OUTPUT? Yes//   (Yes)
    Include COMPUTED fields:  (N/Y/R/B): NO// BOTH Computed Fields and Record Number
    (IEN)

    NUMBER: 21                              NAME: 66.206.177.87
      FLAGS: S                              MAILMAN HOST: 127.0.0.1
      DISABLE TURN COMMAND: YES
    TRANSMISSION SCRIPT: SCRIPT             PRIORITY: 2
      NUMBER OF ATTEMPTS: 4                 TYPE: Simple Mail Transfer Protocol
      PHYSICAL LINK / DEVICE: NULL
      NETWORK ADDRESS (MAILMAN HOST): 127.0.0.1
    TEXT:   
    O H=127.0.0.1,P=TCP/GTM
    C TCPCHAN-SOCKKET25/GTM
    NOTES:   
    This is a djigzo mail transmitter to be used for secure transmissions 
    that is going out to local host ans stunnel, in 
    /etc/stunnel/stunnel.conf, relays thos to the external port 25 after 
    demanding StartTLS.
    SYNONYM: NAME
    SYNONYM: NET
    SYNONYM: COM
    SYNONYM: ORG
      LEVEL 1 NAME (c): 87                  LEVEL 2 NAME (c): 177.87
      LEVEL 3 NAME (c): 206.177.87          LEVEL 4 NAME (c): 66.206.177.87

    NUMBER: 22
    NAME: WVEHR-2-TEST2.OPNEFORUM.OPENSOURCEVISTA.NET
      FLAGS: S                              RELAY DOMAIN: 66.206.177.87
      MAILMAN HOST: 66.206.177.84           DISABLE TURN COMMAND: YES
    TRANSMISSION SCRIPT: SCRIPT             PRIORITY: 2
      NUMBER OF ATTEMPTS: 4                 TYPE: Simple Mail Transfer Protocol
      PHYSICAL LINK / DEVICE: NULL
      NETWORK ADDRESS (MAILMAN HOST): 66.206.177.84
    TEXT:   
    O H=66.206.177.87,P=TCP/GTM
    C TCPCHAN-SOCKET25/GTM
    NOTES:   
    This script uses a tranmissin server set up on 66.206.177.87 which sends 
    mail out using the Djizo mail relay service on 66.206.177.87 and the port 
    used for incoming mail in not 25 so configuration is necessary t make 
    this work.  This is documented in 
    AlternatePortMailmanDjigzoMailDeliveryVer*.txt
      LEVEL 1 NAME (c): NET                 LEVEL 2 NAME (c): OPENSOURCEVISTA.NET
      LEVEL 3 NAME (c): OPNEFORUM.OPENSOURCEVISTA.NET   
      LEVEL 4 NAME (c): WVEHR-2-TEST2.OPNEFORUM.OPENSOURCEVISTA.NET

4. Changes made for the stunnel communication between the machine with the VistA instances on it and the machine hosting Djigzo.  These changes were made on the machine hosting the VistA instances.


      gtm:/etc/xinetd.d# cat wvehr-2-test2-mail

      #This is tunneled with stunnel in /etc/stunnel/stunnel.conf 
      #actual open port is 9304
      service wvehr-2-test2-mail
	  {
	      disable = no
	      type    = UNLISTED
	      port    = 9305
	      socket_type = stream
	      wait    = no
	      user    = wvehr-2-test2
	      server  = /home/wvehr-2-test2/EHR/mailman_recv

	  }



      gtm:/home/wvehr-2-test2/EHR# cat mailman_recv
      #!/bin/sh
      #
      # mailman_recv - start a process to serve Mailman receiving
      # on port 9302
      cd /home/wvehr-2-test2/EHR
      #source /home/wvehr-2-test2/EHR/env2
      . /home/wvehr-2-test2/EHR/env2
      date>>/home/wvehr-2-test2/EHR/mailman_recv.log
      #env>>/home/wvehr-2-test2/EHR/mailman_recv.log
      # Run the server for the Mailman client
      /usr/local/gtm_V55000/mumps -run GTMLNX^XMRUCX 2>>/home/wvehr-2-test2/EHR/mailman_recv.log

      gtm:/etc/xinetd.d# cat /etc/stunnel/stunnel.conf
      ; Sample stunnel configuration file by Michal Trojnara 2002-2009
      ; Some options used here may not be adequate for your particular configuration
      ; Please make sure you understand them (especially the effect of the chroot jail)

      ; Certificate/key is needed in server mode and optional in client mode
      cert = /etc/ssl/certs/stunnel.pem
      key = /etc/ssl/certs/stunnel.pem

      ; Protocol version (all, SSLv2, SSLv3, TLSv1)
      ;sslVersion = SSLv3
      ;sslVersion = TLSv1
      sslVersion = all
      ; Some security enhancements for UNIX systems - comment them out on Win32
      chroot = /var/lib/stunnel4/
      setuid = stunnel4
      setgid = stunnel4
      ; PID is created inside the chroot jail
      pid = /stunnel4.pid

      ; Some performance tunings
      ;socket = l:TCP_NODELAY=1
      ;socket = r:TCP_NODELAY=1
      ;compression = zlib

      ; Workaround for Eudora bug
      ;options = DONT_INSERT_EMPTY_FRAGMENTS

      ; Authentication stuff
      ;verify = 2
      ; Don't forget to c_rehash CApath
      ; CApath is located inside chroot jail
      ;CApath = /certs
      ; It's often easier to use CAfile
      ;CAfile = /etc/stunnel/certs.pem
      ; Don't forget to c_rehash CRLpath
      ; CRLpath is located inside chroot jail
      ;CRLpath = /crls
      ; Alternatively you can use CRLfile
      ;CRLfile = /etc/stunnel/crls.pem

      ; Some debugging stuff useful for troubleshooting
      debug = 7
      output = /var/log/stunnel4/stunnel.log

      ; Use it for client mode
      ;client = yes

      ; Service-level configuration

      [smtp]
      accept = 25
      connect = 66.206.177.87:25
      client = yes
      protocol = smtp

      [smtps_incoming]
      ;wvehr3-09a
      accept = 19320
      connect = 127.0.0.1:9299
      client = no
      protocol = smtp

      [smtps_incoming]
      ;wvehr3-09
      accept = 9307
      connect = 127.0.0.1:9298
      client = no
      protocol = smtp

      [smtps_incoming]
      ;mulab was reminders
      accept = 9302
      connect = 127.0.0.1:9297
      client = no
      protocol = smtp

      [smtps_incoming]
      ;wvehr-2-test2
      accept = 9304
      connect = 127.0.0.1:9305
      client = no
      protocol = smtp

      ;[smtps_incoming]
      ;vademo4-09
      ;accept = 9308
      ;connect = 127.0.0.1:9296
      ;client = no    
      ;protocol = smtp

      ; vim:ft=dosini


      gtm:/etc/xinetd.d# cat /etc/stunnel/stunnel.conf
      ; Sample stunnel configuration file by Michal Trojnara 2002-2009
      ; Some options used here may not be adequate for your particular configuration
      ; Please make sure you understand them (especially the effect of the chroot jail)

      ; Certificate/key is needed in server mode and optional in client mode
      cert = /etc/ssl/certs/stunnel.pem
      key = /etc/ssl/certs/stunnel.pem

      ; Protocol version (all, SSLv2, SSLv3, TLSv1)
      ;sslVersion = SSLv3
      ;sslVersion = TLSv1
      sslVersion = all
      ; Some security enhancements for UNIX systems - comment them out on Win32
      chroot = /var/lib/stunnel4/
      setuid = stunnel4
      setgid = stunnel4
      ; PID is created inside the chroot jail
      pid = /stunnel4.pid

      ; Some performance tunings
      ;socket = l:TCP_NODELAY=1
      ;socket = r:TCP_NODELAY=1
      ;compression = zlib

      ; Workaround for Eudora bug
      ;options = DONT_INSERT_EMPTY_FRAGMENTS

      ; Authentication stuff
      ;verify = 2
      ; Don't forget to c_rehash CApath
      ; CApath is located inside chroot jail
      ;CApath = /certs
      ; It's often easier to use CAfile
      ;CAfile = /etc/stunnel/certs.pem
      ; Don't forget to c_rehash CRLpath
      ; CRLpath is located inside chroot jail
      ;CRLpath = /crls
      ; Alternatively you can use CRLfile
      ;CRLfile = /etc/stunnel/crls.pem

      ; Some debugging stuff useful for troubleshooting
      debug = 7
      output = /var/log/stunnel4/stunnel.log

      ; Use it for client mode
      ;client = yes

      ; Service-level configuration

      [smtp]
      accept = 25
      connect = 66.206.177.87:25
      client = yes
      protocol = smtp

      [smtps_incoming]
      ;wvehr3-09a
      accept = 19320
      connect = 127.0.0.1:9299
      client = no
      protocol = smtp

      [smtps_incoming]
      ;wvehr3-09
      accept = 9307
      connect = 127.0.0.1:9298
      client = no
      protocol = smtp

      [smtps_incoming]
      ;mulab was reminders
      accept = 9302
      connect = 127.0.0.1:9297
      client = no
      protocol = smtp

      [smtps_incoming]
      ;wvehr-2-test2
      accept = 9304
      connect = 127.0.0.1:9305
      client = no
      protocol = smtp

      ;[smtps_incoming]
      ;vademo4-09
      ;accept = 9308
      ;connect = 127.0.0.1:9296
      ;client = no    
      ;protocol = smtp

      ; vim:ft=dosini

      Christen the domain

      DO CHRISTEN^XMUDCHR

      Then do these sets:


      GTM>S ^XMB("NETNAME")="WVEHR-2-TEST2.OPENFORUM.OPENSOURCEVISTA.NET"

      GTM>S ^XMB("NAME")="WVEHR-2-TEST2.OPENFORUM.OPENSOURCEVISTA.NET"
