To summarize the issue:
Mails sent from my domains (multiple domains - one static IP) are being rejected by hotmail/yahoo/etc with the following error messages:
DSN: User unknown
DSN: Service unavailable
DSN: Data format error
A minority of emails are being sent without problems.
A little info on my setup:
- My sendmail is configured as it is out of the box (i havent changed anything)
- My Server is hosting 26 domains - all mapped to one IP. All domains are sending email.
- No MX Records are configured as im only interested in sending mails not receiving them.
- Im only sending mails via PHP.
Snippet from maillog describing my problem:
Code:
Sep 8 18:57:27 VS5003 sendmail[32136]: k88GvRi4032136: from=root, size=15, class=0, nrcpts=1, msgid=<200609081657.k88GvRi4032136@localhost.localdomain>, relay=root@localhost
Sep 8 18:57:27 VS5003 sendmail[32137]: k88GvR1I032137: from=<root@localhost.localdomain>, size=315, class=0, nrcpts=1, msgid=<200609081657.k88GvRi4032136@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=VS5003 [127.0.0.1]
Sep 8 18:57:27 VS5003 sendmail[32136]: k88GvRi4032136: to=somerandomemail@hotmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k88GvR1I032137 Message accepted for delivery)
Sep 8 18:57:28 VS5003 sendmail[32139]: k88GvR1I032137: to=<somerandomemail@hotmail.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120315, relay=mx1.hotmail.com. [65.54.245.8], dsn=5.0.0, stat=Service unavailable
Sep 8 18:57:28 VS5003 sendmail[32139]: k88GvR1I032137: k88GvS1I032139: DSN: Service unavailable
Sep 8 18:57:28 VS5003 sendmail[32139]: k88GvS1I032139: to=<root@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31557, dsn=2.0.0, stat=Sent
After som troubleshooting i found the problem. Problem was that i had to set the Dj field in the sendmail.cf file to my domain eg Dj domaina.com
Now problem is that my server is hosting many domains, eg:
domaina.com
domainb.com
domainc.com
.
.
domainz.com
So if i set Dj to domaina.com i can receive mails from domaina.com in my hotmail account but not from any other domain?.com
So if i set Dj to domainb.com i can receive mails from domainb.com in my hotmail account but not from any other domain?.com
And it continues.
Is it possible to set the Dj value to multiple domains ?
Or maybe i should try to find out why i have to set the Dj field, as that is used when sendmail cannot figure out the domainname, then it can be set explicitly with Dj. If i can let sendmail figure it out automatically i dont need to set it and it should work with all my 26 domains (i think).
Please provide some input. thanks