HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Howto configure SMTP

 
Markus Waldorf_1
Regular Advisor

Howto configure SMTP

Hi,

I thought there was only a VMS heaven, until I met SMTP.

The following setup:

2 node cluster with memory channel

Host1 (cluster)
ewa0 -- reserved
ewb0 -- 172 network to Firewall1
eia0 -- Decnet and LATCP to switch1
eib0 --192 network to switch

Host2 (cluster)
ewa0 -- reserved
ewb0 -- 172 network to Firewall2
eia0 -- Decnet and Latcp to switch1
eib0 -- 192 network to switch1

HostA
eia0 -- 172 network to Firewall3
ewa0 -- Decnet and Latcp to switch1
ewb0 --192 network to switch1

Decnet Lines and Circuits have been purged from the TCP/IP interfaces. Actually, not needed for the 192 interfaces, which switch does do any security, but... Latcp has been set to the interfaces used for Decnet (last and lat$device logicals). EWB is the only Gigabit interface. All devices are set to auto-negotiate and are using the correct speed and duplex.

The cluster runs OpenVMS 7.2-1 with TCP/IP 5.1 eco 5.
Decnet/Latcp <-> HostA
SMTP, DNS <-> HostA (192 network)

HostA runs OpenVMS 7.3-1 with TCP/IP 5.3 eco 2.
Decnet/Latcp <-> Cluster
STMP, BIND server <-> Cluster (192 network)

Problems:

In the initial setup I could not exchange STMP mail beween the nodes of the cluster using their node name. Mail beween HostA and the cluster resulted in host unknown, same with using BIND MX records. Mail between the nodes in the cluster was extremely slow, 15 min. delay.

Mail between the cluster and HostA would also bounce with unknown user (system). With SMTP Relay enabled on the cluster, mail would loop and exceed max number of hops. Nslookup, $tcpip show MX, etc. all looked fine.

I could not see any problems or confusion of DNS names or local host names. I tried several variations, even installed TCP/IP 5.0a, but went back to 5.1 again. No luck, although sending betwen the cluster worked with version 5.0a, exchange with HostA had the same trouble. I also played with Telnet on port 25 to send messages. I analyzed the SMTP logfiles with level 5 debugging, etc. Nothing unusual.

I figured that most of the problems seem to be that the SMTP listener obviously listend on the 172 and 192 interfaces, but would only know about accounts and host on the 172 interface. The reject messages were usually coming from the 172 interface on behalf of the 192 interface.

So I have now worked around some of the issues above by clearing all TCPIP configurations and settings (again) and installing the 192 interface first, setting up SMTP, and then enabling the 172 interface last. At least, now I can exchange mail between the nodes in the cluster and HostA by using hostnames without delays or problems. Actually sending from the cluster to HostA works, but I'm not so sure about the other way.

The problems that remain are:

I cannot use Bind MX records.

mail (nw2lan) to: system@newsgate.xxx.org

--> returns back
From: SMTP%"TCPIP$SMTP@nw2lan.aa.xxx.org"
To: system@nw2lan.aa.xxx.org
--- Transcript of session follows ----
551 %TCPIP-E-SMTP_NOSUCHUSER, no such user, SYSTEM@NEWSGATE.XXX.ORG
SYSTEM@NEWSGATE.XXX.ORG (bounced)

SYSTEM@NW2>tcpip sho mx newsgate.xxx.org
Server: 192.168.100.201 BIND MX database
192.168.100.201 10 ng2lan.aa.XXX.ORG
192.168.100.101 20 ng1lan.aa.XXX.ORG


mail (nw2lan) to: system@newswire.xxx.org

--> returns back
From: SMTP%"TCPIP$SMTP@nw2lan.aa.xxx.org"
To: system@nw2lan.aa.xxx.org
-- Transcript of session follows ----
%TCPIP-E-SMTP_UNKHST, remote host unknown, newswire.xxx.org
-SYSTEM-F-NOSUCHNODE, remote node is unknown

SYSTEM@NW2>tcpip sho mx newswire.xxx.org
Server: 192.168.100.201 BIND MX database
192.168.100.200 10 nw2lan.aa.XXX.ORG
192.168.100.100 20 nw1lan.aa.XXX.ORG


Configurations:

----- Cluster NW2: -----

SYSTEM@NW2>ucx sho hosts /local
127.0.0.1 LOCALHOST, localhost
192.168.100.100 nw1lan, NW1LAN(off)
172.18.152.128 nw1pub, NW1PUB(off)
192.168.100.200 nw2lan, NW2LAN
172.18.152.129 nw2pub, NW2PUB

SYSTEM@NW2>ucx sho int
IE1 192.168.100.200 255.255.255.0
LO0 127.0.0.1 255.0.0.0
WE1 172.18.152.129 255.255.255.0

SYSTEM@NW2>sho network
Product: DECNET Node: NW2 Address(es): 1.2
Product: TCP/IP Node: nw2lan.aa.xxx.org Address(es): 192.168.100.200

SYSTEM@NW2>ucx sho conf smtp
EIGHT_BIT (needed)
RELAY
NOHEADERS (needed)
Alternate gateway: not defined
General gateway: not defined
Substitute domain: not defined
Zone: not defined

SYSTEM@NW2>ucx sho conf name
Transport: UDP
Domain: aa.xxx.org
Retry: 4
Timeout: 4
Servers: 192.168.100.201, 192.168.100.101(off)
Path: No values defined


HostA NG2:

SYSTEM@NG2>ucx sho hosts /local
127.0.0.1 LOCALHOST, localhost
192.168.100.201 ng2lan, NG2LAN
172.18.136.65 ng2pub, NG2PUB

SYSTEM@NG2>ucx sho int
IE0 172.18.136.65 255.255.255.0
LO0 127.0.0.1 255.0.0.0
WE1 192.168.100.201 255.255.255.0

SYSTEM@NG2>sho network
Product: DECNET Node: NG2 Address(es): 1.20
Product: TCP/IP Node: ng2lan.aa.xxx.org Address(es): 192.168.100.201
SYSTEM@NG2>tcpip sho conf smtp
NOEIGHT_BIT
NORELAY
TOP_HEADERS
Alternate gateway: not defined
General gateway: not defined
Substitute domain: not defined
Zone: not defined

SYSTEM@NG2>ucx sho conf name
Transport: UDP
Domain: aa.xxx.org
Retry: 4
Timeout: 4
Servers: 127.0.0.1
Path: No values defined

--- BIND on NG2

;File: SYS$SPECIFIC:[TCPIP$BIND]XXX_ORG.DB
;Domain: XXX.ORG
;
@ IN SOA xxx.org. system.localhost (
20 ; Serial number
3600 ; 1 hour Refresh
300 ; 5 minutes Retry
172800 ; 2 days Expire
43200 ) ; 12 hours Minimum

IN NS ng2lan.aa.xxx.org.

newsgate IN MX 10 ng2lan.aa.xxx.org.
newswire IN MX 10 nw2lan.aa.xxx.org.

nw1lan.aa.xxx.org. IN A 192.168.100.100(off)
nw2lan.aa.xxx.org. IN A 192.168.100.200
ng1lan.aa.xxx.org. IN A 192.168.100.101(off)
ng2lan.aa.xxx.org. IN A 192.168.100.201

6 REPLIES
Steve Reece_3
Trusted Contributor

Re: Howto configure SMTP

Hi Markus,

I did respond to your other thread about this.

When you get errors like the no such user, what does the SMTP log file say?

The page http://h71000.www7.hp.com/doc/83final/6526/6526pro_042.html may help too.

Steve
Markus Waldorf_1
Regular Advisor

Re: Howto configure SMTP

Thanks again. I have been changing and experimenting too much that I started a new thread to be able to reproduce errors again. I'm done with experimenting.

The error from the log file is %SYSTEM-?-TAPEPOSLOST, magnetic tape position lost, which is very strange I think.

Regarding the /zone and alternate gateway, I'm not sure what I should enter there. I played with it but whatever I put there, mail just disappears. To my understanding, the machines default zone according to the Bind resolver is aa.xxx.org. Mail send to xxx.org should thus call the MX recordsm querying the DNS server.

For the tests below, the zone and gateway entries are cleared again.

I wonder about "Relay-Based-On-Mx : FALSE" though.

TCPIP SMTP configuration data:
Server-Nodes : NW2
Queue-Name : TCPIP$SMTP_NW2_00
Alternate-Gateway :
General-Gateway :
Substitute-Domain :
Zone :
Postmaster-Alias : TCPIP$SMTP
Postmaster-Forwards-To : SYSTEM
Foreign-Transport-Synonyms :
Initial-Interval : 0 00:30:00.00
Retry-Interval : 0 01:00:00.00
Retry-Maximum : 3 00:00:00.00
Receive-Timeout : 5
Retry-Address : 16
Hop-Count : 16
Symbiont-Snapshot-Blocks : 0
Receiver-Snapshot-Blocks : 0
Utilities-Snapshot-Blocks : 0
Send-Timeout-Init : 5
Send-Timeout-Mail : 5
Send-Timeout-Rcpt : 5
Send-Timeout-Data : 3
Send-Timeout-Term : 10
Log-Level : 5
Receiver-Debug : 0
Receiver-Trace : 0
Symbiont-Debug : 0
Symbiont-Trace : 0
Utilities-Debug : 0
Utilities-Trace : 0
EF-Debug-Level : 0
Channel-Debug-Level : 0
Header-Placement : NONE
Eightbit : TRUE
Relay : TRUE
Altgate-Always : FALSE
Mx-If-Noaltgate : FALSE
No-Mx : FALSE
No-Subs-Domain-Inbound : FALSE
Smtp-Jacket-Local : TRUE
Cent-Sign-Hack : TRUE
Nosey : FALSE
Log-Line-Numbers : FALSE
Memory-Debug : FALSE
Mail$Protocol-Debug : FALSE
CF-Debug : FALSE
Parse-Debug : FALSE
Deliver-VMS-Def-To : FALSE
Deliver-NoXVMS : FALSE
MTS-From-Hack : FALSE
Rewrite-MTS-From : FALSE
Local-Alias-Only : FALSE
Relay-Based-On-Mx : FALSE
Reject-Unbacktranslatable-IP : FALSE
Accept-Unqualified-Senders : FALSE
Accept-Unresolvable-Domains : FALSE
SFF-Requires-Priv : FALSE
8BitMIME-Hack : FALSE
Suppress-Version-Info : FALSE



---> sending from nw2 to system@newswire.xxx.org

It bounces with remote host unknown

The portions of the stmp log file show:

#smtp$util\4697 MX Lookup for destination newswire.xxx.org
smtp$util\4845 gateway nw2lan.aa.xxx.org is me. Stopping MX lookup. Skipping MX rec's with equal preference
Dump of MX list for destination host newswire.xxx.org
Number of MX entries: 0
... etc...
From: system@nw2lan.aa.xxx.org
To: SYSTEM@newswire.xxx.org
Subject:
X-VMS-To: SYSTEM@NEWSWIRE.XXX.ORG
A permanent error makes this mail undeliverable. Must bounce it.

My interpretation of this is that SMTP queries MX, finds out that its pointing back to the itself, but instead of resolving the MX record and changing the MX domain to a host name, it just enters the MX domain into VMS mail, which of course bounces.


----> sending from nw2 to system@newsgate.xxx.org


#smtp$util\4697 MX Lookup for destination newsgate.xxx.org
Dump of MX list for destination host newsgate.xxx.org
Number of MX entries: 2
Expiration Date: 6-JUL-2009 12:28:57.89
Gate: ng2lan.aa.xxx.org, Preference: 10
Gate: ng1lan.aa.xxx.org, Preference: 20
... etc...
#smtp_sender_cmd\1037 entering connect_to_server
tcp_connecting to server ng2lan.aa.xxx.org
.... etc...
#smtp_read_reply:recv:status=80, vaxc$errno=1
recv buf=250 ng2lan.aa.xxx.org Hello nw2lan.aa.xxx.org, pleased to meet you, friend\0d\0a
... etc...
#smtp$send_error.c\1612:smtp$send_error: name SYSTEM@NEWSGATE.XXX.ORG
#smtp$send_error.c\1615:smtp$send_error: status->a_ercode %TCPIP-E-SMTP_NOSUCHUSER, no such user, !AS
#smtp$send_error.c\1619:smtp$send_error: status->absl.error_code %SYSTEM-?-TAPEPOSLOST, magnetic tape position lost
551 %TCPIP-E-SMTP_NOSUCHUSER, no such user, SYSTEM@NEWSGATE.XXX.ORG

What the heck is a TAPE position lost doing here?


At the end it shows:

#smtp_symbiont\801:close trace file and exit
smtp$symb condh entered with condition code. %TCPIP-I-SMTP_SYMBSTOP, symbiont is stopped

%%%%%%%%%%%% 5-JUL-2009 12:29:07.66 %%%%%%%%%%%%
%TCPIP-I-SMTP_SYMBSTOP, symbiont is stopped
#smtp_symbiont\1363:smtp$send_to_jobctl
#smtp_symbiont\1386:smb$send_to_jobctl st:1
#smtp_symbiont\917:out of AST
#smtp_symbiont\651: woke up sf 1 ef 1 af 1 tf 0
PAGFILCNT has dropped from 4243088 to 4241744.
#smtp_symbiont\291: 5-JUL-2009 12:29:07.67: symb_exit_handler entered. exit_status=1. log_level=5
5-JUL-2009 12:29:07.67: Symbiont process exiting.



Markus Waldorf_1
Regular Advisor

Re: Howto configure SMTP

here is the logfile from

--> sending from NG2 to system@newswire.xxx.org

#smtp$util\4799 MX Lookup for destination newswire.xxx.org
Dump of MX list for destination host newswire.xxx.org
Number of MX entries: 2
Expiration Date: 6-JUL-2009 13:05:41.13
Gate: nw2lan.aa.xxx.org, Preference: 10
Gate: nw1lan.aa.xxx.org, Preference: 20
Sender will relay mail to newswire.xxx.org using this ordered list of gateways
Number of MX entries: 2
Expiration Date: 17-NOV-1858 00:00:00.00
Gate: nw2lan.aa.xxx.org, Preference: 10
Gate: nw1lan.aa.xxx.org, Preference: 20
#smtp_sender_cmd\1037 entering connect_to_server
tcp_connecting to server nw2lan.aa.xxx.org
...
recv buf=220 nw2lan.aa.xxx.org V5.1-15Q, OpenVMS V7.2-1 Alpha ready at Sun, 5 Jul 2009 13:05:52 +0200 \0d\0a
#smtp_read_reply:end_of_reply=1
#smtp_read_reply:returning 1
#smtp_sender_cmd\1270 smtp_sender_greeting exiting: status: 1
#smtp_sender_cmd\1746 Entering smtp_sender_helo
send buf=HELO ng2lan.aa.xxx.org\0d\0a
...
recv buf=250 nw2lan.aa.xxx.org Hello ng2lan.aa.xxx.org, pleased to meet you, friend\0d\0a
...
recv buf=250 <>... Recipient OK\0d\0a
#smtp_read_reply:end_of_reply=1
....
Return-Path: system@ng2lan.aa.xxx.org
Date: Sun, 5 Jul 2009 13:05:31 +0200 (MET DST)
Message-Id: <09070513053115@ng2lan.aa.xxx.org>
From: system@ng2lan.aa.xxx.org
To: SYSTEM@newswire.xxx.org
Subject:
X-VMS-To: SYSTEM@NEWSWIRE.XXX.ORG
#smtp$do_task\1727:smtp$do_task: All done with CF. Deleting it. CF name _NG2$DKA0:[SYS0.SYSMGR]09070513053115_SYSTEM-133.TCPIP_NG2;1
#smtp$do_task\1739:Task is done. status: %SYSTEM-S-NORMAL, normal successful completion

$TCPIP show mail on NW2 shows that
the mail is pending. I removed all mail on NW2 with $tcpip remove mail, anal mail and removed the files shown with no queue entries. After that I defined the logicals below and restarted smtp by @sys$startup:tcpip$smtp_shutdown /startup


SYSTEM@NW2>define/system tcpip$smtp_recv_debug 1
SYSTEM@NW2>define/system tcpip$smtp_recv_trace 1

Sending the same mail from NG2 to sytem@newswire.xxx.org this time the bounced back to NG2 with "unkown host newswire.aaa.org"

the TCPIP$SMTP_RECV_RUN.LOG on NW2 shows:

SMTP_RECV_MAIL: address family is IPv6 (AF_INET6)
SMTP_RECV_MAIL: remote host IP address: 192.168.100.201
SMTP_RECV_MAIL: remote host name: ng2lan.aa.xxx.org
Empty Good-Clients list. Consider everybody a known good client.
check_client_ip_list checking 192.168.100.201 against Bad-Clients list
Empty list. Returning no match.
recv_serv: local host = nw2lan.aa.xxx.org
recv_serv: remote host = ng2lan.aa.xxx.org
recv_serv: client_known = CLIENTGOOD
...etc...
no problems.

Analayze mail on NW2 shows again:
%TCPIP-I-ANA_FILNOQ, found 5 files with no queue entries

The smtp log files shows:

#smtp_sender_cmd\1362 Building MX record list.
Entering build_server_mx_list
#smtp_sender_cmd\2693 Entering new_smtp_sender_gate
#smtp$util\4697 MX Lookup for destination newswire.xxx.org
smtp$util\4845 gateway nw2lan.aa.xxx.org is me. Stopping MX lookup. Skipping MX rec's with equal preference
Dump of MX list for destination host newswire.xxx.org


--> that's the same problem as sending from NW2 to newswire.xx.org




Markus Waldorf_1
Regular Advisor

Re: Howto configure SMTP

By now I'm probably reporting to myself here, but so far I have come to the following update:

a) there is nothing wrong with the configuration. I stopped SMTP on NG2 and installed Communigate Pro. For the fist time I can email from NW2 to NG2 using the NG2 "newsgate.xxx.org" MX domain. Why this does not work with UCX SMTP - I don't know.

b) there is no reason for me to specify any zone or smtp alternate gateway. To be honest, I read this section in the manual several times, and while it sounds logic, it does not make any sense. If a mail host ist not known such as "newswire.xxx.org" it should query the DNS. But instead, UCX smtp queries the DNS, finds out that it points to back to the me, decides not to use MX and tries to deliver the mail locally, probably using the MX domain name, which of course does not work, returning an unknown host error.

Btw. I reconfigured the MX record for newsgate.xxx.org to newsgate.aa.xxx.org, so it is in the same domain as the server nw2lan.aa.xxx.org I'm sending from. Now when sending mail to newsgate.aa.xxx.org it returns: DNS Loop: MX-record ng2lan.cz.rferl.org points back to us. That is not true. I verified it several times, including reverse lookup. There are no local host entries for ng2lan either. nslookup reports proper IP addresses.

c) I can send from NW2 to NG2 now with Communigate installed on NG2. However the other way around does not work, either using the NW2 hostname or domain name. According to the logs, NW2 accepts the email, but on NW2 the email keeps processing forever. The difference to the previous setup with where it works sending to NW2 using its hostname, is that NG2 is now relaying to NW2. SMTP relay on NW2 is on. It creates SMTP control files without queue entries, or whatever.

My conclusion:

I tried everyting possible with this SMTP. Something just seems hardcoded inside: Don't send or accept smtp mail if the MX record points to myself. Well, how else can it work?!
Markus Waldorf_1
Regular Advisor

Re: Howto configure SMTP

I still have not found out what could possibly be wrong in my environment. But I found a work-around today that enables me to address mail from outside to @newswire MX domain, without having the cluster nodes processing such mail forever and delaying every other emails.

Creating a local aliase file in each
TCPIP$SMTP_COMMON directory for each node:

TCPIP$SMTP_LOCAL_ALIASES.TXT

containing:

newswire.xxx.org

Mail to the mx domain from inside and outside now delivers instantly. Why this is necessary - I don't know.

Thanks,
Markus
Ananth S
Occasional Advisor

Re: Howto configure SMTP

Have you tried configuring substitute domain ?