I have two domain names(eg. aaa.com and bbb.com) hosted on one vps with sendmail.
My problem is that when I register in aaa.com I get the email from bbb.com.
Please tell me how to configure sendmail to send emails from the corresponding domain name so that emails sent from aaa.com will appear as coming from aaa.com and emails coming from bbb.com will appear as coming from bbb.com.
UPDATE: Bellow is header from my Hotmail account. Notice that it contains both domains. I need to configure so that only one appears.
x-store-info:4r51+eLowxxxxxxxxxxxxxxxx+Jr9bBBOgMyiUm19XMY5Rxxxxxxxxxxxxxxxxxxxxxxx= Authentication-Results: hotmail.com; spf=none (sender IP is xxx.xxx.xxx.xxx) email@example.com; dkim=none header.d=aaa.com; x-hmca=none firstname.lastname@example.org X-SID-PRA: email@example.com X-AUTH-Result: NONE X-SID-Result: NONE X-Message-Status: n:n X-Message-Delivery: Vj0xLjE7dXM9MDxxxxxxxxxxxxxxxxxxxxxxxxxx X-Message-Info: z6+tzUa3IoTXR87giofdF9roKbKDipmFxxxxxxx+8w+3EpLxxxxx Received: from bbb.com ([x.x.x.x]) by SNT0-MC1-F6.Snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900); Sun, 1 Dec 2013 12:13:53 -0800 Received: from bbb.com (localhost [127.0.0.1]) by bbb.com (8.14.4/8.14.4/Debian-2.1ubuntu2) with ESMTP id rB1Kxxxxxxxx (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <firstname.lastname@example.org>; Sun, 1 Dec 2013 21:13:52 +0100 Received: (from www-data@localhost) by bbb.com (8.14.4/8.14.4/Submit) id rB1Kxxxxxxxxxxx; Sun, 1 Dec 2013 21:13:52 +0100 Message-Id: <201312012013.rB1Kxxxxxxxx@bbb.com> To: email@example.com Subject: =?UTF-8?B?2YfYp9iq2YXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2LHZiNix?= X-PHP-Originating-Script: 0:mail.php MIME-Version: 1.0 Date: Sun, 01 Dec 2013 20:13:52 +0000 From: =?UTF-8?B?2YfYpxxxxxxxxxxxxxxxxxx==?=<firstname.lastname@example.org> Reply-To: =?UTF-8?B?2YfYxxxxxxxxxxxxxxxxx==?=<email@example.com> X-Mailer: PHP/5.4.9-4ubuntu2.3 Content-Type: multipart/related; boundary="----=_NextPart_b3670a170xxxxxxxxxxxxxxxxxxx" Return-Path: firstname.lastname@example.org X-OriginalArrivalTime: 01 Dec 2013 20:13:53.0725 (UTC) FILETIME=[DB6CF6D0:01CEEED1]