Im trying to setup a mailserver om my machine and i have some trouble. when i try to email to or from the server the email get's removed because the adress's are wrong. for example, let's say my domain is cookies . com and im trying to send an email to admin@cookies . com the error i get is this

<admin@cookies . cookies> (expanded from <admin@cookies . com>): host
smtprelay1.telia . com[IP] said: 550 RCPT address has non-existant domain <cookies.cookies> (in reply to RCPT TO command)

what is wrong? why do i get "cookies.cookies" and how can i change it to the correct one "cookies . com" ?