Hi there,

After playing with MDA delivery in smtpd.conf on two servers, I found that there seems to be an internal command line buffer overflow after 256 bytes.

Consider the following MDA config setting:

deliver to mda "echo '%{sender}' '%{sender.user}' '%{sender.domain}' %{rcpt} '%{rcpt.user}' '%{rcpt.domain}' '%{dest}' '%{dest.user}' '%{dest.domain}' '%{user.username}' '%{user.directory}' >> /tmp/mX-cmd.tmp"

However, all that will be executed is this part:

echo '%{sender}' '%{sender.user}' '%{sender.domain}' %{rcpt} '%{rcpt.user}' '%{rcpt.domain}' '%{dest}' '%{dest.user}' '%{dest.domain}' '%{user.username}' '%{user.directory}' >> /tmp/mX

i.e. there will be a file with the crippled name "/tmp/mX" after triggering the MDA command.

Since I had a similar MDA command set up on another machine that worked, I figured that the buffer overflow must be happening AFTER format specifier expansion. When I filled in the values by hand I ended up with the magical number of 256 after which my command execution was clipped.

So, here is my question, is this a feature or a bug? ;-)

Many thanks,
Holger

--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to