Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Send mail from Postfix to Exch

Posted on 2013-11-05
17
Medium Priority
?
3,489 Views
Last Modified: 2013-11-13
Hello,

I am trying to send mail form a Linux server running Postfix to an Exchange server.  I am getting the following bounce back:

This is the mail system at host linserv.domain.local.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<"smtp:[winserv.domain.com]"@winserv.domain.local> (expanded from
    <user@domain.com>): host winserv.domain.local[192.168.217.10]
    said: 550 5.7.1 Unable to relay (in reply to RCPT TO command)


Reporting-MTA: dns; linserv.domain.local
X-Postfix-Queue-ID: CC31A1F003C8
X-Postfix-Sender: rfc822; user@domain.net
Arrival-Date: Tue,  5 Nov 2013 18:18:27 -1000 (HAST)

Final-Recipient: rfc822; "smtp:[winserv.domain.com]"@winserv.domain.local
Original-Recipient: rfc822;user@domain.com
Action: failed
Status: 5.7.1
Remote-MTA: dns; winserv.domain.local
Diagnostic-Code: smtp; 550 5.7.1 Unable to relay


Return-Path: <user@domain.net>
Received: by linserv.domain.local (Postfix)
      id CC31A1F003C8; Tue,  5 Nov 2013 18:18:27 -1000 (HAST)
Delivered-To: smtp:[winserv.domain.com]@linserv.domain.local
Received: from localhost (localhost.localdomain [127.0.0.1])
      by linserv.domain.local (Postfix) with ESMTP id BF06E1F01C68
      for <user@domain.com>; Tue,  5 Nov 2013 18:18:27 -1000 (HAST)
X-Virus-Scanned: Debian amavisd-new at linserv.domain.local
Received: from linserv.domain.local ([127.0.0.1])
      by localhost (linserv.domain.local [127.0.0.1]) (amavisd-new, port 10024)
      with ESMTP id TnVmqUPLgXb7 for <user@domain.com>;
      Tue,  5 Nov 2013 18:18:27 -1000 (HAST)
Received: by linserv.domain.local (Postfix, from userid 33)
      id 0E68B1F00D34; Tue,  5 Nov 2013 18:18:26 -1000 (HAST)
To: <user@domain.com>
Subject: Test @ 2317
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Wed, 06 Nov 2013 00:18:26 -0400
From: user@domain.net
Message-ID: <d75625a89477cb361bf018300f563458@domain.net>
X-Sender: user@domain.net
User-Agent: Roundcube Webmail/0.7.2

Test @ 2317


Any ideas?

Have a great day and thank you in advance,

Don
0
Comment
Question by:GEMCC
  • 9
  • 7
17 Comments
 
LVL 16

Expert Comment

by:Postmaster
ID: 39626431
Exchange EDGE servers handle external SMTP feeds.
The RECEIVE Connectors / Network tab / lower section, shows IP addresses of server that can RELAY mail.
Make sure your server IP is added.
0
 

Author Comment

by:GEMCC
ID: 39626444
Hello,

I do not have Edge installed, just Exchange 2010.

Please advise.

Have a great day,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39626448
To postmaster's point
You need to configure exchange's relay rules to allow the postfix system the rights to relay.

http://technet.microsoft.com/en-us/library/bb232021(v=exchg.141).aspx
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:GEMCC
ID: 39627307
Hello,

I followed the link and now I am getting:

Subject      Undeliverable: Test @ 837
From      Microsoft OutlookAdd contact
To      user@domain.netAdd contact
Date      Today 09:37
Delivery has failed to these recipients or groups:

"smtp:[winserv.domain.local]"@winserv.domain.local
A problem occurred and this message couldn't be delivered. Check to be sure the e-mail address is correct. If the problem continues, please contact your helpdesk.







Diagnostic information for administrators:

Generating server: winserv.domain.local

"smtp:[winserv.domain.local]"@winserv.domain.local
#554 5.4.4 SMTPSEND.DNS.MxLoopback; DNS records for this domain are configured in a loop ##rfc822;user@domain.com

Original message headers:

Received: from linserv.domain.local (192.168.217.20) by
 winserv.domain.local (192.168.217.10) with Microsoft SMTP Server id
 14.2.347.0; Wed, 6 Nov 2013 08:37:17 -0500
Received: by linserv.domain.local (Postfix)      id 39FB11F01C95; Wed,  6
 Nov 2013 03:38:26 -1000 (HAST)
Delivered-To: smtp:[winserv.domain.local]@linserv.domain.local
Received: from localhost (localhost.localdomain [127.0.0.1])      by
 linserv.domain.local (Postfix) with ESMTP id 30A9D1F005E6      for
 <user@domain.com>; Wed,  6 Nov 2013 03:38:26 -1000 (HAST)
X-Virus-Scanned: Debian amavisd-new at linserv.domain.local
Received: from linserv.domain.local ([127.0.0.1])      by localhost
 (linserv.domain.local [127.0.0.1]) (amavisd-new, port 10024)      with
 ESMTP id QHsufZK8c-4y for <user@domain.com>;      Wed,  6 Nov 2013 03:38:25
 -1000 (HAST)
Received: by linserv.domain.local (Postfix, from userid 33)      id
 870821F01C95; Wed,  6 Nov 2013 03:38:25 -1000 (HAST)
To: <user@domain.com>
Subject: Test @ 837
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
Date: Wed, 6 Nov 2013 09:38:25 -0400
From: <user@domain.net>
Message-ID: <66320439021c7c877db50c15d9fb5e1c@domain.net>
X-Sender: user@domain.net
User-Agent: Roundcube Webmail/0.7.2
Return-Path: user@domain.net
 Reporting-MTA: dns;winserv.domain.local
Received-From-MTA: dns;linserv.domain.local
Arrival-Date: Wed, 6 Nov 2013 13:37:17 +0000

Original-Recipient: rfc822;user@domain.com
Final-Recipient: rfc822;"smtp:[winserv.domain.local]"@winserv.domain.local
Action: failed
Status: 5.4.4
Diagnostic-Code: smtp;554 5.4.4 SMTPSEND.DNS.MxLoopback; DNS records for this domain are configured in a loop

Received: from linserv.domain.local (192.168.217.20) by
 winserv.domain.local (192.168.217.10) with Microsoft SMTP Server id
 14.2.347.0; Wed, 6 Nov 2013 08:37:17 -0500
Received: by linserv.domain.local (Postfix)      id 39FB11F01C95; Wed,  6
 Nov 2013 03:38:26 -1000 (HAST)
Delivered-To: smtp:[winserv.domain.local]@linserv.domain.local
Received: from localhost (localhost.localdomain [127.0.0.1])      by
 linserv.domain.local (Postfix) with ESMTP id 30A9D1F005E6      for
 <user@domain.com>; Wed,  6 Nov 2013 03:38:26 -1000 (HAST)
X-Virus-Scanned: Debian amavisd-new at linserv.domain.local
Received: from linserv.domain.local ([127.0.0.1])      by localhost
 (linserv.domain.local [127.0.0.1]) (amavisd-new, port 10024)      with
 ESMTP id QHsufZK8c-4y for <user@domain.com>;      Wed,  6 Nov 2013 03:38:25
 -1000 (HAST)
Received: by linserv.domain.local (Postfix, from userid 33)      id
 870821F01C95; Wed,  6 Nov 2013 03:38:25 -1000 (HAST)
To: <user@domain.com>
Subject: Test @ 837
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
Date: Wed, 6 Nov 2013 09:38:25 -0400
From: <user@domain.net>
Message-ID: <66320439021c7c877db50c15d9fb5e1c@domain.net>
X-Sender: user@domain.net
User-Agent: Roundcube Webmail/0.7.2
Return-Path: user@domain.net

Test @ 837

Please advise.  I know we are close!

Thanks for your help and have a great day,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39628767
the error points to a configuration issue where your postfix mailing recipient is not identifiable by the MX/valid domain check on the exchange.

does "domain.net" exist?

on your exchange or postfix, nslookup -q=mx domain.net or dig domain.net MX respectively.

The domain check is an anti-spam method used to check whether the domain of a sender is valid (have an MX record or an A record for a server that will "point" to a possible server to which a bounce can be delivered.
0
 

Author Comment

by:GEMCC
ID: 39628787
Hello,

Doing either nslookup -q=mx domain.net or dig domain.net MX, they come up with:
mail.domain.net
winserv.domain.net

Should linserv.domain.net be added?

Thanks for your time and help,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39628982
Your issue seems to be

"smtp:[winserv.domain.local]"@winserv.domain.local
#554 5.4.4 SMTPSEND.DNS.MxLoopback; DNS records for this domain are configured in a loop ##rfc822;user@domain.com

Suggests a misconfiguration seemingly leading to a loop.

not sure what this check is supposed to reflect/prevent.
0
 

Author Comment

by:GEMCC
ID: 39629383
I made some changes and getting a different message now:

Delivery has failed to these recipients or groups:
"smtp:[winserv.domain.local]"@winserv.domain.local
A problem occurred and this message couldn't be delivered. Check to be sure the e-mail address is correct. If the problem continues, please contact your helpdesk.
Diagnostic information for administrators:
Generating server: winserv.domain.local
"smtp:[winserv.domain.local]"@winserv.domain.local
#554 5.4.4 SMTPSEND.DNS.MxLoopback; DNS records for this domain are configured in a loop ##rfc822;user@domain.com
Original message headers:
Received: from linserv.domain.local (192.168.217.20) by
 winserv.domain.local (192.168.217.10) with Microsoft SMTP Server id
 14.2.347.0; Thu, 7 Nov 2013 00:16:43 -0500
Received: by linserv.domain.local (Postfix)      id BA4E41F01C9C; Thu,  7
 Nov 2013 00:17:12 -0500 (EST)
Delivered-To: smtp:[winserv.domain.local]@linserv.domain.local
Received: from localhost (localhost.localdomain [127.0.0.1])      by
 linserv.domain.local (Postfix) with ESMTP id AB29D1F01C79      for
 <user@domain.com>; Thu,  7 Nov 2013 00:17:12 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at linserv.domain.local
Received: from linserv.domain.local ([127.0.0.1])      by localhost
 (linserv.domain.local [127.0.0.1]) (amavisd-new, port 10024)      with
 ESMTP id YVEyATmHckUB for <user@domain.com>;      Thu,  7 Nov 2013 00:17:11
 -0500 (EST)
Received: from Laptop7 (c-68-58-136-101.hsd1.in.comcast.net
 [xxx.xxx.xxx.xxx])      (Authenticated sender: user@domain.net)      by
 linserv.domain.local (Postfix) with ESMTPA id B234B1F012E6      for
 <user@domain.com>; Thu,  7 Nov 2013 00:17:11 -0500 (EST)
From: Don <user@domain.net>
To: <user@domain.com>
Subject: Test @ 0016
Date: Thu, 7 Nov 2013 00:16:42 -0500
Message-ID: <00c701cedb78$8bb645e0$a322d1a0$@domain.net>
MIME-Version: 1.0
Content-Type: multipart/alternative;
      boundary="----=_NextPart_000_00C8_01CEDB4E.A2E14F50"
X-Mailer: Microsoft Outlook 14.0
Content-Language: en-us
Thread-Index: Ac7beIg28bLZ+Sf5R5eP76JAPPbfTg==
Return-Path: user@domain.net
Reporting-MTA: dns;winserv.domain.local
Received-From-MTA: dns;linserv.domain.local
Arrival-Date: Thu, 7 Nov 2013 05:16:43 +0000

Original-Recipient: rfc822;user@domain.com
Final-Recipient: rfc822;"smtp:[winserv.domain.local]"@winserv.domain.local
Action: failed
Status: 5.4.4
Diagnostic-Code: smtp;554 5.4.4 SMTPSEND.DNS.MxLoopback; DNS records for this domain are configured in a loop


Test @ 0016

Please advise.

Thanks for your help and have a great day,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39629461
Do not use the same email address for both the sender and recipient.

This is likely a spam test which were/are common in an attempt to take advantage of people who white listed their own email address as not being spam source.

See if the issue exists when you mail from user1@domain.net to user@domain.net

on the linux/postfix system try the following:

echo "To: <user@domain.net>
From: <user1@domain.net>
Subject: test

this is a test
" | /usr/sbin/sendmail -oi -fuser1@domain.net -t

tail /var/log/maillog to see what happened to this message.  Was it delivered to the exchange server.

Then see what happens on the exchange side with the message.
0
 

Author Comment

by:GEMCC
ID: 39631275
Hello,

I am not using the same address for both.  I am using user@domain.NET as the sender and user@domain.COM as the recipient.

Please advise.

Have a great day,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39632560
Are they pointing to the same mailbox on the exchange server?

I can only go based on the error you posted.
0
 

Author Comment

by:GEMCC
ID: 39632686
No, the .net account is on the Postfix server and the .com account is on Exchange.

Have a great day,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39632688
your nslookup -q=mx information for domain.net points to winserv (exchange server) which might be why it is rejecting.

try any other domain for the sender and see what happens.
0
 

Author Comment

by:GEMCC
ID: 39632699
Hello,

I fixed the issue:

Diagnostic-Code: smtp;554 5.4.4 SMTPSEND.DNS.MxLoopback; DNS records for this domain are configured in a loop

In the main.cf file for Postfix, I had to change luser_relay = $user@servername.domain.local to luser_relay = $user@domain.local.

Now I am getting:

Delivery has failed to these recipients or groups:

"smtp:[winserv.domain.local]"@domain.local
 The e-mail address you entered couldn't be found. Please check the recipient's e-mail address and try to resend the message. If the problem continues, please contact your helpdesk.

Diagnostic information for administrators:

Generating server: winserv-1.domain.local

"smtp:[winserv.domain.local]"@domain.local
 #550 5.1.1 RESOLVER.ADR.RecipNotFound; not found ##rfc822;user@domain-1.com

Original message headers:
Received: from linserv.domain.local (192.168.217.20) by
 winserv-1.domain.local (192.168.217.11) with Microsoft SMTP Server id
 14.2.347.0; Fri, 8 Nov 2013 00:13:49 -0500
Received: by linserv.domain.local (Postfix)      id B02941F01C74; Fri,  8
 Nov 2013 00:14:18 -0500 (EST)
Delivered-To: smtp:[winserv.domain.local]@linserv.domain.local
Received: from localhost (localhost.localdomain [127.0.0.1])      by
 linserv.domain.local (Postfix) with ESMTP id 9F1CB1F01717      for
 <user@domain-1.com>; Fri,  8 Nov 2013 00:14:18 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at linserv.domain.local
Received: from linserv.domain.local ([127.0.0.1])      by localhost
 (linserv.domain.local [127.0.0.1]) (amavisd-new, port 10024)      with
 ESMTP id TlECf7ySqrw1 for <user@domain-1.com>;      Fri,  8 Nov 2013 00:14:04
 -0500 (EST)
Received: by linserv.domain.local (Postfix, from userid 33)      id
 8BCB71F01C74; Fri,  8 Nov 2013 00:14:04 -0500 (EST)
To: Donald Doyle <user@domain-1.com>
Subject: Test @ 0013
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 8 Nov 2013 01:14:04 -0400
From: <user@domain-2.net>
Message-ID: <ca441adcd97a396d6b3ef160fb8d7924@domain-2.net>
X-Sender: user@domain-2.net
User-Agent: Roundcube Webmail/0.7.2
Return-Path: user@domain-2.net

 
Reporting-MTA: dns;winserv-1.domain.local
Received-From-MTA: dns;linserv.domain.local
Arrival-Date: Fri, 8 Nov 2013 05:13:49 +0000

Original-Recipient: rfc822;user@domain-1.com
Final-Recipient: rfc822;"smtp:[winserv.domain.local]"@domain.local
Action: failed
Status: 5.1.1
Diagnostic-Code: smtp;550 5.1.1 RESOLVER.ADR.RecipNotFound; not found

Received: from linserv.domain.local (192.168.217.20) by
 winserv-1.domain.local (192.168.217.11) with Microsoft SMTP Server id
 14.2.347.0; Fri, 8 Nov 2013 00:13:49 -0500
Received: by linserv.domain.local (Postfix)      id B02941F01C74; Fri,  8
 Nov 2013 00:14:18 -0500 (EST)
Delivered-To: smtp:[winserv.domain.local]@linserv.domain.local
Received: from localhost (localhost.localdomain [127.0.0.1])      by
 linserv.domain.local (Postfix) with ESMTP id 9F1CB1F01717      for
 <user@domain-1.com>; Fri,  8 Nov 2013 00:14:18 -0500 (EST)
X-Virus-Scanned: Debian amavisd-new at linserv.domain.local
Received: from linserv.domain.local ([127.0.0.1])      by localhost
 (linserv.domain.local [127.0.0.1]) (amavisd-new, port 10024)      with
 ESMTP id TlECf7ySqrw1 for <user@domain-1.com>;      Fri,  8 Nov 2013 00:14:04
 -0500 (EST)
Received: by linserv.domain.local (Postfix, from userid 33)      id
 8BCB71F01C74; Fri,  8 Nov 2013 00:14:04 -0500 (EST)
To: User Name <user@domain-1.com>
Subject: Test @ 0013
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 8 Nov 2013 01:14:04 -0400
From: <user@domain-2.net>
Message-ID: <ca441adcd97a396d6b3ef160fb8d7924@domain-2.net>
X-Sender: user@domain-2.net
User-Agent: Roundcube Webmail/0.7.2
Return-Path: user@domain-2.net

Test @ 0013


Please note there are 2 Exchange servers involved in this, winserv & winserv-1.  My goal with these is for winserv to be the "main" server and winserv-1 act as a replication/failsafe server.

Sending a message to user@domain.local is received.  I do have the domain-1.com account setup under the user account AND it is receiving messages from outside the LAN.

Thank you and have a great day,

Don
0
 
LVL 80

Expert Comment

by:arnold
ID: 39632715
The issue seems to be within the exchange server i.e. postfix submits/delivers the messages which are rejected.

Look at the exchange logs to see what is going on with the message in question.
0
 

Accepted Solution

by:
GEMCC earned 0 total points
ID: 39633802
Issue resolved!  I had the syntax in /etc/postfix/virtual incorrect.  I had user@domain.com     smtp:[winserv.domain.local] instead of user@domain.local     user.  Once changed and ran postmap /etc/postfix/virtual and service postfix restart all is good!

Have a great weekend,

Don
0
 

Author Closing Comment

by:GEMCC
ID: 39644070
Issue resolved!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Eseutil Hard Recovery is part of exchange tool and ensures Exchange mailbox data recovery when mailbox gets corrupt due to some problem on Exchange server.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question