[Bug 266629] contrib/dma corrupted queue files

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 26 Sep 2022 18:35:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266629

--- Comment #3 from Mikko Lehto <mslehto@kapsi.fi> ---
(In reply to Ed Maste from comment #2)

Thank you Ed, unfortunately still gives "corrupted queue file".
Hope this helps, looking forward not to use Sendmail.


Below are steps to reproduce:

1. Succesful case with no problems (13.1 binary pkg
mail/dma-0.13.20220128_1,1):
---
echo -n 'hello world' | /usr/local/libexec/dma -bq -f localuser@localhost
remouser@remotehost.example.invalid
---
In this OK case queue file /var/spool/dma/M... ends in byte 0x0A, that seem to
be the expected queue file body suffix.
Remote delivery is succesful.


2. Failing case (13.1 src.txz + new mail.c from
2e8403e0215868a13e2bdd1c979fc351971b8d91):
---
echo -n 'hello world' | /usr/libexec/dma_266629 -bq -f localuser@localhost
remouser@remotehost.example.invalid
---
In this failing case I can see that queue file /var/spool/dma/M... ends in
0x64, that is last letter of "world".
Remote delivery fails.


I use "hexdump -C /var/spool/dma/M..." to observe last byte in queue file.


For fun I also took mail.c from upstream repository and compiled.
With this, frankenstein, there is always 0x0A at the end of /var/spool/dma/M...
queue file.


( Still comparing readmail() loops, trying to figure something )

-- 
You are receiving this mail because:
You are the assignee for the bug.