Closed jayjwa closed 10 months ago
Thanks for the problem report. Can you try the following to see if we can get some more informations on the problems:
Add -ddd to the "MAIL" line in /etc/dnetd.conf: MAIL 27 N,N vmsmail vmsmaild -ddd
This should generate some additional logging in /var/log/syslog or /var/log/messages
Grab a tcpdump of a small transfer in each direction with something like: tcpdump -i br0 -w file.dmp decnet host aa.nn
where aa.nn is the DECnet node address of your VMS system
I notice that you are using Slackware. Were there any changes necessary to the install script?
I didn't exactly use the install script, but rather cloned the repo, built the kmod, installed it, then the programs. Slackware doesn't have systemd. Since I already had a bridge (for Pydecnet) with tuntaps I used that. Pydecnet doesn't play nice with Linux DECNET (dnlogin and sethost won't work) so I shut it down. bridge.c (or the Italian modification with LAT/LAST/LAD) will work. If you already have a bridge, you don't have to change the lladdr of your external interface. Then you can start DECNET whenever you want, even after TCPIP, and it won't mess with IP6 addresses.
Today, with "MAIL 27 N,N vmsmail vmsmaild -ddd", I can get mail from VMS to Linux. Before I had "MAIL 27 N,Y vmsmail vmsmaild". So half the problem is solved I think?
O 3 LUNAST::SYSTEM 2023-10-31 12:20 20/710 Test from VMS to Linux
▸N 4 KIRIN::SYSTEM 2023-10-31 13:09 19/719 Another test from VMS to Linux
? 4
[-- Message 4 -- 19 lines, 719 bytes --]:
Date: Tue, 31 Oct 2023 13:09:12 -0400
Message-Id: <202310311709.39VH9CR3022535@atr2.ath.cx.com>
From: vmsmail@atr2.ath.cx.com (KIRIN::SYSTEM )
Subject: Another test from VMS to Linux.
To: jayjwa@atr2.ath.cx.com
Cc:
This is node KIRIN, hello.
?
Linux to VMS still won't work. Packet capture is mail both directions. vmsmail-debug.pcap.gz
Sendmail's logs are the same as before, so I won't include them.
syslog:
2023-10-31T12:19:56.781466-04:00 atr2 sendvmsmail[19880]: running as 197
2023-10-31T12:19:56.781497-04:00 atr2 sendvmsmail[19880]: Sending message from jayjwa <jayjwa@atr2.ath.cx.com> to lunast::jayjwa
2023-10-31T12:19:56.781728-04:00 atr2 sendvmsmail[19880]: Local user: vmsmail
2023-10-31T12:19:56.980870-04:00 atr2 sendvmsmail[19880]: sendvmsmail: mail_error: jayjwa <jayjwa@atr2.ath.cx.com>; lunast::jayjwa; Test of mail: Linux to OpenVMS; Cannot connect to VMS system: Connection refused#012
2023-10-31T12:20:23.923114-04:00 atr2 dnetd[19520]: using user vmsmail from dnetd.conf
2023-10-31T12:20:42.171436-04:00 atr2 vmsmaild[19901]: Forwarding mail from LUNAST::SYSTEM to jayjwa (n=1)
2023-10-31T12:20:42.259397-04:00 atr2 oidentd[19917]: Connection from localhost (127.0.0.1):34267
2023-10-31T12:20:42.259578-04:00 atr2 oidentd[19917]: [localhost] Successful lookup: 51470 , 25 : vmsmail (vmsmail)
2023-10-31T12:20:42.261401-04:00 atr2 milter-regex[1337]: localhost [127.0.0.1]: ACCEPT, HELO: atr2.ath.cx.com, FROM: , RCPT: , From: , To: , Subject:
2023-10-31T12:20:42.572855-04:00 atr2 vmsmaild[19901]: Forwarded mail? 0
2023-10-31T12:20:42.573142-04:00 atr2 dnetd[19520]: Reaped child process 19901
2023-10-31T12:24:40.587392-04:00 atr2 dnetd[19520]: using user vmsmail from dnetd.conf
syslog (debug level):
2023-10-31T12:20:23.923104-04:00 atr2 dnetd[19520]: Connection from: LUNAST::system
2023-10-31T12:20:23.940993-04:00 atr2 vmsmaild[19901]: got local user: JAYJWA
2023-10-31T12:20:42.171808-04:00 atr2 vmsmaild[19901]: body: You guessed it. 15
2023-10-31T12:20:42.172052-04:00 atr2 vmsmaild[19901]: body: 1
At this point, vmsmaild uses 100% (or near) CPU. Maybe hung?: 20101 vmsmail 20 0 3788 1984 1856 S 99.7 0.0 9:31.55 vmsmaild
An OPCOM message is on VMS side:
$
%%%%%%%%%%% OPCOM 31-OCT-2023 11:57:36.00 %%%%%%%%%%%
Message from user AUDIT$SERVER on LUNAST
Security alarm (SECURITY) and security audit (SECURITY) on LUNAST, system id: 1038
Auditable event: Network login failure
Event time: 31-OCT-2023 11:57:35.97
PID: 00000236
Process name: MAIL_8227
Username: DECNET
Remote nodename: ATR2
Remote node id: 1025 (1.1)
Remote username: Linux0000
Status: %LOGIN-F-NOSUCHUSER, no such user
What $ accounting thinks about it:
31-OCT-2023 11:57:36 LOGFAIL DECNET 00000236 ATR2 00D380F4
There certainly is a DECNET user. The setup is just the basic install with nothing fancy or changed.
DECNET DEFAULT DECNET [376,376] DECNET Normal 4 SYS$SPECIFIC:[DECNET]
DEFAULT [200,200] Normal 4 Disuser
FAL$SERVER DEFAULT FAL$SERVER [376,373] DECNET Normal 4 SYS$SPECIFIC:[FAL$SERVER]
FIELD SERVICE FIELD [1,10] FIELD All 4 Disuser
jayjwa JAYJWA [200,202] Object 4 DUA1:[JAYJWA]
MAIL$SERVER DEFAULT MAIL$SERVER [376,374] DECNET Normal 4 SYS$SPECIFIC:[MAIL$SERVER]
NML$SERVER DEFAULT NML$SERVER [376,371] DECNET Normal 4 SYS$SPECIFIC:[NML$SERVER]
PHONE$SERVER DEFAULT PHONE$SERVER [376,372] DECNET Normal 4 SYS$SPECIFIC:[PHONE$SERVER]
SYSTEM MANAGER SYSTEM [1,4] SYSTEM All 4 SYS$SYSROOT:[SYSMGR]
Here's a working one from another node (VMS to VMS). Note the name is MAIL$SERVER. Maybe that's important.
31-OCT-2023 12:07:30 PROCESS NETWORK MAIL$SERVER 00000237 KUSHAL 10000004
Thanks for taking this up. I've wanted to see Linux speaking DECNET for years.
I haven't used Slackware since one of the earliest releases where it had to be installed from floppies - just curious.
I don't think adding "-ddd" fixed anything. All that does is increase the logging level to syslog!
The mail error from your syslog corresponds to the OPCOM message, I'll take a look at the packet trace to see what it is trying to do. Are these systems accessible via HECnet? The node names don't seem to match. Can you capture the output of "ncp sho object mail characteristics" on the VMS system?
I'm working on setting up a VMS system here so I can test locally,
Yes, I remember Slackware floppies. 2003 or so was when I got onboard. I detoured to LFS and then came back a few years ago. These nodes are not on HECnet because I don't want to change all the nodes and names (the one I did change at one time was a nightmare).
$
LUNAST::JAYJWA 17:39:21 (DCL) CPU=00:00:01.07 PF=10478 IO=178 MEM=190
$ ncp show object mail characteristics
Object Volatile Characteristics as of 31-OCT-2023 18:05:57
Object = MAIL
Number = 27
File id = MAIL_SERVER.EXE
User id = MAIL$SERVER
Proxy access = outgoing
Alias outgoing = Enabled
As system, there's a Password field set to a random value, from install time. I never had to give any passwords to mail VMS to VMS, whether basic user or system.
Can you grab a tcpdump trace between 2 VMS systems?
Unfortunately, DEC did not publish some of the protocol specifications; dts/dtr, passthru and, of course, mail-11. The VMS utilities for Linux were reverse engineered sometime around the mid 1990's. It's possible, but unlikely, that the protocols have changed.
dnlogin from 1.1, watching 1.14 mail to 1.11, with reply. vmsmail-debug-vms2vms.pcap.gz
The latest version of sendvmsmail.c should solve the problem of logging into VMS using the default non-priviledged account. This version version also includes initial support for the latest mail-11 transport proctocol, mail11v3. Eventually this version will support "Cc:" lines. Use the "-3" switch to sendvmsmail to use mail11v3 by default with a fallback to the older protocol if the connection fails.
This fixes the problem. Add | "/usr/local/sbin/sendvmsmail -3" to the forward file.
#1 29-NOV-2023 22:27:50.07 NEWMAIL
From: ATR2::"jayjwa <jayjwa@atr2.ath.cx.com>"
To: lunast::jayjwa
CC:
Subj: Test of mail: Linux to OpenVMS
Test
MAIL>
x86_64 AMD Ryzen 5, Linux Slackware (current), 6.5.5 (kernel.org) Sendmail 8.17.2
Network layout:
OpenVMS 7.3 on [lunast]ra:
Sending from VMS sometimes hangs, forcing ctrl-Y exit.
A connection shows but nothing in the maillog. Debug info shows dnetd sees the connection.
From Linux to VMS (.com added to hostname to defeat spambots), mail never arrives:
What Sendmail thinks about it:
I don't think the "not authenticated" bit matters. I can send mail from here to a Solaris host and from there back.
In other words, SMTP mail is working. Sometimes the DEC mail arrives with headers only but no body. Here is one with no body (also from OpenVMS 7.3 but another node):
Notice the subject landed in the CC, and the body landed in the Subject. The "forward" file is set up as per instructions.
There's no vmsmail.conf (not needed) and dnetd.conf is mostly default except for the Mirror object.