Operating System - OpenVMS
1752694 Members
5348 Online
108789 Solutions
New Discussion

Re: OpenVMS Disable SMTP Listener but still send email

 
Thomas Ritter
Respected Contributor

Re: OpenVMS Disable SMTP Listener but still send email

Willem's approach should work

$ ucx show service smtp/full

Service: SMTP
State: Enabled
Port: 25 Protocol: TCP Address: 0.0.0.0
Inactivity: 5 User_name: TCPIP$SMTP Process: TCPIP$SMTP
Limit: 300 Active: 0 Peak: 1

File: TCPIP$SYSTEM:TCPIP$SMTP_RECV_RUN.COM
Flags: Listen IPv6

Socket Opts: Rcheck Scheck
Receive: 0 Send: 0

Log Opts: Acpt Actv Dactv Conn Error Exit Logi Logo Mdfy Rjct TimO Addr
File: SYS$SPECIFIC:[TCPIP$SMTP]TCPIP$SMTP_RECV_RUN.LOG

Security
Reject msg: not defined
Accept host: 0.0.0.0
Accept netw: 0.0.0.0
$ type TCPIP$SYSTEM:TCPIP$SMTP_RECV_RUN.COM
$ !
$ ! File name: TCPIP$SMTP_RECV_RUN.COM
$ ! Product: HP TCP/IP Services for OpenVMS
$ ! Version: V5.6-ECO2
$ !
$ ! © Copyright 1976, 2006 Hewlett-Packard Development Company, L.P.
$ !

...

$ ! constituting an additional warranty.
$ !
$ set :=
$ set noon
$ set symbol /scope=(nolocal,global)
$ set symbol /scope=(nolocal,noglobal)/verb
$ serv_id = f$edit("tcpip$smtp","upcase")
$ serv_home = f$edit("sys$specific:[''serv_id']","upcase")
$ !
$ ! purge smtp receiver logs
$ !
$ purge:
$ set default 'serv_home'
$ logsav = 2 * f$getsyi("cluster_nodes") + 5
$
$ lognam = f$edit("tcpip$smtp_recv_run.log","upcase")
$ if f$search(lognam) .nes. ""
$ then
$ purge /noconfirm/nolog/keep='logsav' 'lognam'
$ endif
$ !
$ ! start smtp receiver process
$ !
$ run:

Make your changes here ...

$ run 'f$edit("sys$system:tcpip$smtp_receiver.exe","upcase")'
$ !
$ ! completed smtp receiver execution
$ !
$ exit:
$ exit $status .or. %x10000000
Thomas Ritter
Respected Contributor

Re: OpenVMS Disable SMTP Listener but still send email

Look for the listener ...

$ pipe netstat -na |sea sys$input *.25
tcp 0 0 *.25 *.* LISTEN
$ ucx disable service smtp

Listener now gone ...

$ pipe netstat -na |sea sys$input *.25
%SEARCH-I-NOMATCHES, no strings matched

Send email ...

$ mail/subject="test" nl: smtp%"thomas.ritter@secret.com.au"

allows outgoing email but no incoming email.
and email received.