Setting Up Mailman For External Email
Sending
Most people want to send email to the outside world from VISTA. So we will start with that.
First you need to set-up an Email Server that accepts unauthenticated email via SMTP and relays it to the outside world. If you have an old style smtp relay server from your ISP, that will suffice. If you, like me,
Receiving
While you can expose your VISTA system to the outside world, it is better to have email go through your own mail server and then be relayed to VISTA. Either way, the VISTA set-up is the same.
I have a domain name that is linked to my ip address through dynamic DNS. So I opened port 25 on my router and had it forwarded to the machine hosting VISTA on port 25 on the machine. So if I send email to my domain from Gmail, it reaches VISTA.
Set-up a xinetd listener to forward requests on port 25 (or another port, if you are forwarding email to VISTA from a mail server) to a script that sets up GT.M and calls GTMLNX^XMRUCX
.
sudo cat vista_pocn-moh_mm_port25 service vista-mm { disable = no port = 25 socket_type = stream protocol = tcp user = sam server = /bin/bash groups = yes server_args = /home/sam/pocn-moh/mm_rpcproc type = UNLISTED wait = no }
sam@sam-desktop:~/pocn-moh$ cat mm_rpcproc #!/bin/bash # cd /home/sam/pocn-moh export gtm_dist=/opt/fis-gtm/V5.4-002A/utf8/ export gtmroutines="uo(routines) $gtm_dist" export gtmgbldir=mumps.gld export PATH=$PATH:$gtm_dist export gtm_chset=utf-8 export gtm_icu_version=4.2 export gtm_badchar=0 date>>rpc_log.log $gtm_dist/mumps -run GTMLNX^XMRUCX 2>> rpc_log.log exit 0
Stop xinetd and start it in debug mode:
sam@sam-desktop:/etc/xinetd.d$ sudo service xinetd stop * Stopping internet superserver xinetd [ OK ] sam@sam-desktop:/etc/xinetd.d$ sudo xinetd -d
Make sure you see this line to indicate that your service started.
11/5/18@13:06:29: DEBUG: 6623 {cnf_start_services} Started service: vista-mm
Check netstat -tnlp to see that your port is open.
sam@sam-desktop:~$ netstat -tnlp (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:9200 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:9201 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:9270 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:9250 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:10025 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:9260 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:9100 0.0.0.0:* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::22 :::* LISTEN - tcp6 0 0 ::1:631 :::* LISTEN - tcp6 0 0 :::443 :::* LISTEN - tcp6 0 0 :::5900 :::* LISTEN 1472/vino-server