I wanted to send emails from my Slackware box, directly with sendmail (no smart program or script in between to catch problems). Sendmail gave this error:
Dec 21 12:28:51 slackware14 sm-mta[3813]: sBLBSnif003811: sBLBSpif003813: DSN: Data format error
I resolved it using the info on this page: sendmail dsn=5.6.0, stat=Data format error by Dmitry Zayats and an additional hint from the poster on this forum page.
cp
the file /usr/share/sendmail/cf/cf/sendmail-slackware.mc
to /usr/share/sendmail/cf/config.mc
cd /usr/share/sendmail/cf
open config.mc
in your favourite editor
add these lines
MASQUERADE_AS(`myshortdomain.com')dnl
MASQUERADE_DOMAIN(very.long.domain.com)dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
I don’t know what the very.long.domain.com should be other than myshortdomain.com, I used the identical From
address for a valid mail server (localhost won’t work) for both the first and second line. (Leave the last two lines unchanged. And yes, the file uses opening and closing quote marks, that look asymmetrical in a lot of modern fonts.)
The Slackware mc file contains two apparent errors: it says one should do sh Build config.cf
but that doesn’t work.
include(\`../m4/cf.m4')
is wrong, change it to include(`m4/cf.m4')
. Then, execute (while you’re still in /usr/share/sendmail/cf
):m4 /usr/share/sendmail/cf/m4/cf.m4 config.mc > /etc/mail/sendmail.cf
restart sendmail as root: /etc/rc.d/rc.sendmail restart
With this, the error was resolved on my box.
Note: unresolved at this point: Google's gmail servers might refuse mail (claiming it looks like spam) from a box that has no valid dns entry (I think). (In other words, from behind a router. I'm sure there's a solution to that, but don't know what it is yet.)