Question : 554 - Relaying Error

I have www.domain.com hosted on my webserver, with the DNS hosted at GoDaddy.

At GoDaddy I have the A record and a CName for www pointing to my server, and the MX record pointed to another mail server I do not have control over.

On the DNS for my server, I have the MX record pointing to the mail server... but when I try to send an email to [email protected] I receive the below message where XXX.XXX.XXX.XXX is the mail server's IP.

Is this a problem on my end or the mail server's end?
Code Snippet:
1:
2:
3:
:
XXX.XXX.XXX.XXX does not like recipient.
Remote host said: 554 : Relay access denied Giving up on XXX.XXX.XXX.XXX

Answer : 554 - Relaying Error

No changes.

This is how it is:

2 domain names (1&2) with their www addresses pointing to IPaddressA
1 of these domains (1) also has mail MX record pointing to IPaddressA ?
1 of these domains (2) wants all mail to go to godaddy smtp server directly so they can use webmail ?

so.. domain name (1) (settings hosted on out-of-state server only) would have:
NS  - out-of-state server NS
MX - mail.domain1
mail CNAME IPaddressA

and domain name (2) (settings hosted on godaddy and out-of-state server) would have :
NS - godaddy NS
MX - mail.domain2
mail CNAME godaddy SMTP mail server ** (so long as their mail server is setup to accept this mail)

They can accept all mail, except from any domain hosted on the out-of-state server where JUST the website resides. I don't need to configure DNS at all for this site on the out-of-state server for them to receive email from everyone else, have their website accessible, etc. The only reason I need to configure the DNS on the out-of-state server is so that I can send mail to them since my domain, mail, etc. is also hosted on that server. Without making a DNS change on that server, the MTA tries to deliver the mail to domain2 locally. So I simply tell the out-of-state mail server that no, don't do that, and instead send all mail to the godaddy smtp.  I don't see how this would cause any problems...
Random Solutions  
 
programming4us programming4us