Fwd: opensmtpd can't handle long lines in aliases table

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: opensmtpd can't handle long lines in aliases table

openbsd.bugs
Hello,

  Edgar (cc'ed) has kindly provided patches to fix a buffer error in mailaddr.c
for opensmtpd.

I've minimally tested it and am forwarding the patches.

Would like to be able to get them into 6.8 release as this is quite problematic
with lots of aliases.

Thanks,
Aisha


-------- Forwarded Message --------
Subject: Re: opensmtpd can't handle long lines in aliases table
Date: Thu, 6 Aug 2020 19:47:33 -0500
From: Edgar Pettijohn <[hidden email]>
To: AIsha Tammy <[hidden email]>

Here are a few simple patches as discussed. These were written to apply
against current. However, they are pretty simple and may well apply to
others. With that in mind if you are using any filters they may not
work. My production system is still a couple version behind and the
current smtpd wouldn't work with some of my custom filters. So I had to
use a fairly basic temporary config for testing. I'm also including my
test <senders> table.

Steps involved: (untested off memory mostly, use doas as necessary)

cd /usr
cvs -d $CVSROOT checkout src

cp *.patch /usr/src/usr.sbin/smtpd
cd /usr/src/usr.sbin/smtpd

for file in `ls *.patch`
do
patch < $file
done

make
rcctl stop smtpd

#use the just built version at /usr/src/usr.sbin/smtpd/smtpd/smtpd
smtpd/smtpd -d -T expand

send a test email

if all goes well run it for an appropriat amount of time and make sure
there are not issues. If your satisfied send the patches to bugs@.

Enjoy,

Edgar


mailaddr.c.patch (1K) Download Attachment
smtpd.h.patch (615 bytes) Download Attachment
table.c.patch (570 bytes) Download Attachment