# sendmail not delivering (some) mail

## nitro322

I have KMail set to use sendmail running on localhost for smtp, but not all mail is being delivered.  In fact, the two main recipients that keep rejecting messages I send are both Mailman mailing lists.  Here's a snippit from my log file that was a failed delivery.  The only problem I see is something about a "Data format error," but I have no idea what that means, and fI really can't understand why only two recipients have a problem with this (and don't bounce the mail or anything - it just disappears).  Here's the log, any suggestions?

```
Aug 13 18:45:41 [sendmail] g7DNjehB005162: from=user, size=599, class=0, nrcpts=1, msgid=<200208131845.40750.user@domain.com>, relay=localhost [[UNIX: localhost]]

Aug 13 18:45:45 [sendmail] g7DNjgQn005163: from=<user@host.domain.com>, size=788, class=0, nrcpts=1, msgid=<200208131845.40750.user@domain.com>, proto=ESMTP, daemon=Daemon0, relay=localhost.localdomain [127.0.0.1]

Aug 13 18:45:45 [sendmail] g7DNjehB005162: to=recipient@rhost.domain.com, ctladdr=user (1000/1000), delay=00:00:05, xdelay=00:00:04, mailer=relay, pri=30311, relay=localhost.localdomain. [127.0.0.1], dsn=2.0.0, stat=Sent (g7DNjgQn005163 Message accepted for delivery)

Aug 13 18:45:54 [sendmail] g7DNjgQn005163: to=<recipient@rhost.domain.com>, ctladdr=<user@host.domain.com> (1000/1000), delay=00:00:10, xdelay=00:00:09, mailer=esmtp, pri=30500, relay=rhost.domain.com. [XXX.XX.XX.XX], dsn=5.6.0, stat=Data format error

Aug 13 18:45:54 [sendmail] g7DNjgQn005163: forward /home/user/.forward.host+: Group writable directory

Aug 13 18:45:54 [sendmail] g7DNjgQn005163: forward /home/user/.forward+: Group writable directory

Aug 13 18:45:54 [sendmail] g7DNjgQn005163: forward /home/user/.forward.host: Group writable directory

Aug 13 18:45:54 [sendmail] g7DNjgQn005163: forward /home/user/.forward: Group writable directory

Aug 13 18:45:54 [sendmail] g7DNjgQn005163: g7DNjsQn005165: DSN: Data format error

Aug 13 18:45:54 [sendmail] g7DNjsQn005165: to=<user@host.domain.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31812, relay=local, dsn=2.0.0, stat=Sent
```

Also, there's a bunch of errors about a .forward file and a group writable - anyone know what this is about?  I have no .forward file, and I can't find anything group writable near it.  Thanks again.

----------

## nitro322

ok, just to be sure, I did narrow it down to a problem with sendmail.  I tried to send an email to the same recipient with the CLI mail command, and it also failed, with the same log entries.  I also got a warning printed back to the CLI, however:

```
echo "This is a test." | mail -s "Test" recipient@rhost.domain.com

WARNING: RunAsGid for MSP ignored, check group ids (egid=0, want=1001)
```

GID 0 is of course root, and GID 1001 (which I don't recall seeing before) is smmsp.  I guess maybe there's a permissions problem somewhere?  I hate to sound like an idiot, but I've been chasing this problem on and off for about a week now, and I ran out of ideas long ago.  Any help would be much appreciated.  Thanks.

----------

## nitro322

ok, narrowing it down even more...  This is happening with both sendmail and postfix now.  Postfix gives me a better more information in the error log:

```
Aug 13 23:14:01 [postfix/smtp] 88508E3C5F: to=<recipient@rhost.domain.com>, relay=rhost.domain.com[xxx.xx.xx.xx], delay=7, status=bounced (host thost.domain.com[xxx.xx.xx.xx] said: 553 5.1.8 <user@localhost.localdomain>... Domain of sender address user@localhost.localdomain does not exist)
```

It appears my e-mails are being rejected becuase the source domain doesn't exist.  In this case with localhost, duh.  I also tried setting it to my hostname and domain name, but since the domain name I use on my private network is private, I get the same error message.  Any encounter this before, have any ideas what might fix it?  I checked google, and although I've seen mentioned quite a few times, I haven't found an answer yet.  Thanks.

----------

## rac

For the "group writable directory" complaints by sendmail, see http://www.sendmail.org/faq/section3.html#3.33.

For the "domain of sender address does not exist", for sendmail you can use FEATURE(accept_unresolvable_domain) if you don't have the authority (or time) to set your local DNS environment up.  This is an anti-spam feature that is enabled by default.  If you can make sendmail recognize your local setup (via /etc/hosts or a local DNS server), turning off this feature should not be necessary.

----------

## nitro322

 *rac wrote:*   

> For the "group writable directory" complaints by sendmail, see http://www.sendmail.org/faq/section3.html#3.33.

 

thanks, looks like what I need

 *Quote:*   

> For the "domain of sender address does not exist", for sendmail you can use FEATURE(accept_unresolvable_domain) if you don't have the authority (or time) to set your local DNS environment up.  This is an anti-spam feature that is enabled by default.  If you can make sendmail recognize your local setup (via /etc/hosts or a local DNS server), turning off this feature should not be necessary.

 

Hmm...  I don't think I'm understanding you here.  If other servers are rejecting my outgoing e-mail, how would accepting unresolvable domains on my end help?  Wouldn't that need to be enabled on (all of) their end?

----------

## rac

 *Quote:*   

> Hmm...  I don't think I'm understanding you here.  If other servers are rejecting my outgoing e-mail, how would accepting unresolvable domains on my end help?  Wouldn't that need to be enabled on (all of) their end?

 

Good point.  I misread your clip as saying that you were sending the mail from local to local.  In this case, then maybe http://www.sendmail.org/m4/masquerading.html is helpful, or try changing sendmail's opinion of $w (the local hostname) with a statement like "Dwactualhost.domain.com" in your sendmail configuration.

----------

