Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird logs during direct connection #48

Open
catap opened this issue Dec 9, 2024 · 5 comments
Open

Weird logs during direct connection #48

catap opened this issue Dec 9, 2024 · 5 comments

Comments

@catap
Copy link
Contributor

catap commented Dec 9, 2024

As part of testing of 2.62 I've tried to use spampd as SMTP server, and discovered this in logs:

Dec  9 14:59:27 matebook spampd[67475]: Use of uninitialized value $msg[0] in chomp at /usr/local/sbin/spampd line 217, <GEN5> line 7.
Dec  9 14:59:27 matebook spampd[67475]: Use of uninitialized value $msg[0] in join or string at /usr/local/sbin/spampd line 218, <GEN5> line 7.
Dec  9 14:59:27 matebook spampd[67475]: Use of uninitialized value $destresp in concatenation (.) or string at /usr/local/sbin/spampd line 1154, <GEN5> line 7.

here a telnet session which I made:

$ telnet 127.0.0.1 10025
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 matebook.local ESMTP OpenSMTPD
HELO fake.domain.tld
250 matebook.local Hello fake.domain.tld [127.0.0.1], pleased to meet you
MAIL FROM:<[email protected]>
250 2.0.0 Ok
RCPT TO:<[email protected]>
250 2.1.5 Destination address valid: Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Subject: Test spam mail (GTUBE)
Message-ID: <[email protected]>
Date: Wed, 23 Jul 2003 23:30:00 +0200
From: Sender <[email protected]>
To: Recipient <[email protected]>
Precedence: junk
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This is the GTUBE, the
        Generic
        Test for
        Unsolicited
        Bulk
        Email

If your spam filter supports it, the GTUBE provides a test by which you
can verify that the filter is installed correctly and is detecting incoming
spam. You can send yourself a test mail containing the following string of
characters (in upper case and with no white spaces and line breaks):

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

You should send this test mail from an account outside of your network.
.
250 2.0.0 54e90c11 Message accepted for delivery
QUIT
221 2.0.0 Bye
^CTerminated 
$

also, it hadn't closed the session after QUIT and I was forced to kill my telnet

@mpaperno
Copy link
Owner

mpaperno commented Dec 9, 2024

Hi, thanks for the report.

Could you enable spampd debug logging and run that again? I'm not clear on which response it fails to parse (the Bye?) or what could possibly be sent after that.

Though I do see that client->hear may return a null string... which AFAIK hasn't happened enough since ~2003 for anyone else to report :)

It does expect the server side to terminate the connection, so you'd need to shut down the terminal session manually, which is expected.

Thanks,
-Max

@catap
Copy link
Contributor Author

catap commented Dec 9, 2024

Here a debug log with -d all: spampd.txt

@mpaperno
Copy link
Owner

mpaperno commented Dec 9, 2024

Thanks! I don't see any errors in here, so I'm still not sure where/when exactly the other logged errors are coming from. I realized those could be from anywhere in the communication process, not just at the end.

Only thing I noticed is it took 6 seconds after "Bye" to disconnect, but I'm assuming that's how long it took you to quit the terminal session...

Mon Dec  9 15:36:51 2024 [53677] dbg: Destination response: '221 2.0.0 Bye'
Mon Dec  9 15:36:57 2024 [53677] dbg: Closed connections

@catap
Copy link
Contributor Author

catap commented Dec 9, 2024

@mpaperno I think I needed something like 6 seconds to switch to another terminal and kill telnet.

@mpaperno mpaperno changed the title Wired logs during direct conenct Weird logs during direct connection Dec 9, 2024
@catap
Copy link
Contributor Author

catap commented Dec 16, 2024

I had a dig a bit and seems that it is "blocked" inside $smtp_server->chat, after FIN from smtpd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants