1

i have a site running in a amazon EC2 ubuntu instance. My webserver is apache. I am using php mail function to send mails from a contact form. I have installed postfix and used default ocnfiguration. The emails for our domain are hosted by rackspace. When the contacr form tries to send mail to a email id in our domain ([email protected]) which is a valid id, the mail.log shows that postfix is trying to deliver it locally. However it works fine for gmail ids. Here is my mail.log from the server :

Sep 17 07:48:15 ip-10-134-177-117 postfix/pickup[2189]: EC11D68106: uid=0 from=<root>
Sep 17 07:48:15 ip-10-134-177-117 postfix/cleanup[11700]: EC11D68106: message-id=<20110917074815.EC11D68106@ip-10-134-177-117.ap-southeast-1.compute.internal>
Sep 17 07:48:15 ip-10-134-177-117 postfix/qmgr[17377]: EC11D68106: from=<[email protected]>, size=650, nrcpt=1 (queue active)
Sep 17 07:48:15 ip-10-134-177-117 postfix/local[11702]: EC11D68106: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.05, delays=0.03/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 17 07:48:15 ip-10-134-177-117 postfix/qmgr[17377]: EC11D68106: removed
Sep 17 08:01:53 ip-10-134-177-117 postfix/pickup[13498]: AC5EA68106: uid=33 from=<www-data>
Sep 17 08:01:53 ip-10-134-177-117 postfix/cleanup[13628]: AC5EA68106: message-id=<20110917080153.AC5EA68106@ip-10-134-177-117.ap-southeast-1.compute.internal>
Sep 17 08:01:53 ip-10-134-177-117 postfix/qmgr[17377]: AC5EA68106: from=<[email protected]>, size=604, nrcpt=4 (queue active)
Sep 17 08:01:53 ip-10-134-177-117 postfix/local[13631]: AC5EA68106: to=<[email protected]>, relay=local, delay=0.28, delays=0.04/0.23/0/0.02, dsn=5.1.1, status=bounced (unknown user: "info")
Sep 17 08:01:55 ip-10-134-177-117 postfix/local[13632]: AC5EA68106: to=<[email protected]>, relay=local, delay=1.5, delays=0.04/0.23/0/1.2, dsn=5.1.1, status=bounced (unknown user: "nithin.kv")
Sep 17 08:01:58 ip-10-134-177-117 postfix/smtp[13630]: AC5EA68106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.27]:25, delay=5.2, delays=0.04/0.08/0.94/4.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1316246518 m10si2182807yhk.92)
Sep 17 08:01:58 ip-10-134-177-117 postfix/smtp[13630]: AC5EA68106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.27]:25, delay=5.2, delays=0.04/0.08/0.94/4.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1316246518 m10si2182807yhk.92)
Sep 17 08:01:58 ip-10-134-177-117 postfix/cleanup[13628]: DB42468107: message-id=<20110917080158.DB42468107@ip-10-134-177-117.ap-southeast-1.compute.internal>
Sep 17 08:01:58 ip-10-134-177-117 postfix/qmgr[17377]: DB42468107: from=<>, size=2795, nrcpt=1 (queue active)
Sep 17 08:01:58 ip-10-134-177-117 postfix/bounce[13633]: AC5EA68106: sender non-delivery notification: DB42468107
Sep 17 08:01:58 ip-10-134-177-117 postfix/qmgr[17377]: AC5EA68106: removed
Sep 17 08:01:58 ip-10-134-177-117 postfix/local[13631]: DB42468107: to=<[email protected]>, relay=local, delay=0.09, delays=0.01/0/0/0.07, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 17 08:01:58 ip-10-134-177-117 postfix/qmgr[17377]: DB42468107: removed
Sep 17 08:27:43 ip-10-134-177-117 postfix/pickup[13498]: 22FC468106: uid=33 from=<www-data>
Sep 17 08:27:43 ip-10-134-177-117 postfix/cleanup[15563]: 22FC468106: message-id=<20110917082743.22FC468106@ip-10-134-177-117.ap-southeast-1.compute.internal>
Sep 17 08:27:43 ip-10-134-177-117 postfix/qmgr[17377]: 22FC468106: from=<[email protected]>, size=624, nrcpt=5 (queue active)
Sep 17 08:27:43 ip-10-134-177-117 postfix/local[15566]: 22FC468106: to=<[email protected]>, relay=local, delay=0.06, delays=0.03/0.02/0/0.02, dsn=5.1.1, status=bounced (unknown user: "info")
Sep 17 08:27:44 ip-10-134-177-117 postfix/local[15567]: 22FC468106: to=<[email protected]>, relay=local, delay=0.98, delays=0.03/0.02/0/0.93, dsn=5.1.1, status=bounced (unknown user: "nithin.kv")
Sep 17 08:27:45 ip-10-134-177-117 postfix/smtp[15565]: 22FC468106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.26]:25, delay=2.9, delays=0.03/0.02/0.93/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1316248065 g47si9242631yhn.13)
Sep 17 08:27:45 ip-10-134-177-117 postfix/smtp[15565]: 22FC468106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.26]:25, delay=2.9, delays=0.03/0.02/0.93/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1316248065 g47si9242631yhn.13)
Sep 17 08:27:45 ip-10-134-177-117 postfix/smtp[15565]: 22FC468106: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.45.26]:25, delay=2.9, delays=0.03/0.02/0.93/1.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1316248065 g47si9242631yhn.13)
Sep 17 08:27:45 ip-10-134-177-117 postfix/cleanup[15563]: F3DBA68107: message-id=<20110917082745.F3DBA68107@ip-10-134-177-117.ap-southeast-1.compute.internal>
Sep 17 08:27:46 ip-10-134-177-117 postfix/qmgr[17377]: F3DBA68107: from=<>, size=2815, nrcpt=1 (queue active)
Sep 17 08:27:46 ip-10-134-177-117 postfix/bounce[15568]: 22FC468106: sender non-delivery notification: F3DBA68107
Sep 17 08:27:46 ip-10-134-177-117 postfix/qmgr[17377]: 22FC468106: removed
Sep 17 08:27:46 ip-10-134-177-117 postfix/local[15566]: F3DBA68107: to=<[email protected]>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 17 08:27:46 ip-10-134-177-117 postfix/qmgr[17377]: F3DBA68107: removed

How to tell postfix to route my mails being sent to jivity.com externally and not treat it as a local domain? Thanks.

2 Answers 2

5

Most likely this domain name is listed in Postfix' mydestination directive. The solution is to edit your /etc/postfix/main.cf and change the myhostname and mydestination directives:

myhostname = hostname.jivity.com
mydestination = $myhostname

This way your mail server will consider only hostname.jivity.com as local hostname and everything else will be routed properly.

1
  • Thanks but i am not able to ssh into my instance using putty. Its refusing my key. I will try it as soon i can login.
    – Nithin
    Sep 18, 2011 at 11:01
3

Your machine is the final destination for that mail. You need to adjust $mydestination so that such mailboxes are no longer in the local domain class and don't get passed to the local transport.

1
  • Thank you for the links, they helped me understand the settings a little more.
    – Nithin
    Nov 17, 2011 at 6:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .