<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sendmail can not relay mail to exchange server in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5335767#M59952</link>
    <description>&lt;P&gt;Did you resolved the problem or it is still appears?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2011 06:54:59 GMT</pubDate>
    <dc:creator>tuxy</dc:creator>
    <dc:date>2011-09-19T06:54:59Z</dc:date>
    <item>
      <title>sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299421#M59944</link>
      <description>&lt;P&gt;My goal is to be able to&amp;nbsp;send all&amp;nbsp;email through my Linux server using sendmail, to&amp;nbsp;Exchange Server. I have added Exchange Server entry in /etc/mail/sendmail.cf file but still it is relaying to localhost.localdomain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Red Hat OS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 3 (Taroon Update 8)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;sendmail version&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# rpm -qa | grep -i sendmail*
sendmail-cf-8.12.11-4.RHEL3.6
sendmail-8.12.11-4.RHEL3.6&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RelayHost entry in sendmail.cf file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# cat /etc/mail/sendmail.cf | grep -e DS
DSmailhost
# Return-Receipt-To: header implies DSN request
# DHParameters (only required if DSA/DH is used)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/etc/hosts file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 mail]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
146.178.24.70   vburplsmtp06    mail2.alinta.net.au
146.178.73.228  mailhost&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;resolv.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# cat /etc/resolv.conf
domain alinta.net.au
search alinta.net.au ue.com.au
nameserver 218.185.65.254
nameserver 203.94.140.38
nameserver 203.94.129.130
nameserver 146.178.22.217
nameserver 146.178.73.217&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/var/log/maillog output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Aug 13 21:29:41 vburplsmtp06 sm-msp-queue[19707]: p7D6jqcT014362: p7DBQp1j019707: sender notify: Warning: could not send message for past 4 hours
Aug 13 21:29:41 vburplsmtp06 sendmail[19734]: alias database /etc/aliases.db out of date
Aug 13 21:29:41 vburplsmtp06 sendmail[19734]: p7DBSiEX019734: from=&amp;lt;&amp;gt;, size=10664, class=0, nrcpts=1, msgid=&amp;lt;201108131129.p7DBQp1j019707@mail2.alinta.net.au&amp;gt;, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried to send mail manually and it is pointing relayhost to localhost.localdomain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# sendmail -v root
test
.
root... Connecting to [127.0.0.1] via relay...
220 mail2.alinta.net.au ESMTP Sendmail 8.12.11.20060308/8.12.11; Sat, 13 Aug 2011 20:48:54 +1000
&amp;gt;&amp;gt;&amp;gt; EHLO mail2.alinta.net.au
250-mail2.alinta.net.au Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI
250-DELIVERBY
250 HELP
&amp;gt;&amp;gt;&amp;gt; MAIL From:&amp;lt;abanerjee@mail2.alinta.net.au&amp;gt; SIZE=5 AUTH=abanerjee@mail2.alinta.net.au
250 2.1.0 &amp;lt;abanerjee@mail2.alinta.net.au&amp;gt;... Sender ok
&amp;gt;&amp;gt;&amp;gt; RCPT To:&amp;lt;root@mail2.alinta.net.au&amp;gt;
&amp;gt;&amp;gt;&amp;gt; DATA
250 2.1.5 &amp;lt;root@mail2.alinta.net.au&amp;gt;... Recipient ok
354 Enter mail, end with "." on a line by itself
&amp;gt;&amp;gt;&amp;gt; .
250 2.0.0 p7DAmsYo019039 Message accepted for delivery
root... Sent (p7DAmsYo019039 Message accepted for delivery)
Closing connection to [127.0.0.1]
&amp;gt;&amp;gt;&amp;gt; QUIT
221 2.0.0 mail2.alinta.net.au closing connection&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Tried to send mail manually through Exchange Server (mailhost - 146.178.73.228) and I got the mail in my mailbox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# telnet mailhost 25
Trying 146.178.73.228...
Connected to mailhost (146.178.73.228).
Escape character is '^]'.
220 VTALPWSMTP05.alinta.net.int Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at  Sat, 13 Aug 2011 21:49:41 +1000
HELO
250 VTALPWSMTP05.alinta.net.int Hello [146.178.24.70]
MAIL FROM: root@vburplsmtp06
250 2.1.0 root@vburplsmtp06....Sender OK
RCPT TO: barunab@maxis.com.my
250 2.1.5 barunab@maxis.com.my
DATA
354 Start mail input; end with &amp;lt;CRLF&amp;gt;.&amp;lt;CRLF&amp;gt;
This is a test mail
.
250 2.6.0 &amp;lt;VTALPWSMTP05WEsBk310000137e@VTALPWSMTP05.alinta.net.int&amp;gt; Queued mail for delivery
QUIT
221 2.0.0 VTALPWSMTP05.alinta.net.int Service closing transmission channel
Connection closed by foreign host.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So why sendmail is always pointing "relay=localhost.localdomain [127.0.0.1]" why not "mailhost" after adding the "DSmailhost" entry&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Aug 2011 12:06:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299421#M59944</guid>
      <dc:creator>Arunabha Banerjee</dc:creator>
      <dc:date>2011-08-13T12:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299511#M59945</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Could you please paste configuration for&lt;BR /&gt;&lt;BR /&gt;#more /etc/mail/access&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;BR&lt;BR /&gt;Naj</description>
      <pubDate>Sat, 13 Aug 2011 17:46:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299511#M59945</guid>
      <dc:creator>Naj</dc:creator>
      <dc:date>2011-08-13T17:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299513#M59946</link>
      <description>&lt;P&gt;Please find /etc/mail/access entry as below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 root]# cat /etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
localhost.localdomain           RELAY
localhost                       RELAY
127.0.0.1                       RELAY&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Aug 2011 17:55:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299513#M59946</guid>
      <dc:creator>Arunabha Banerjee</dc:creator>
      <dc:date>2011-08-13T17:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299565#M59947</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How about sendmail.mc file configuration, did you add relay server there?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#vi sendmail.mc&lt;/P&gt;&lt;P&gt;dnl define(`SMART_HOST',`smtp.your.provider')dnl﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace your mail exchange server as below&lt;/P&gt;&lt;P&gt;define(`SMART_HOST',`exchange-server name')﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;::save configuration&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# m4 /etc/mail/sendmail.mc &amp;gt; /etc/mail/sendmail.cf﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Naj&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2011 01:12:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299565#M59947</guid>
      <dc:creator>Naj</dc:creator>
      <dc:date>2011-08-14T01:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299597#M59948</link>
      <description>&lt;P&gt;This entry I have added already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[root@vburplsmtp06 mail]# cat sendmail.mc | grep -e mailhost
define(`SMART_HOST',`mailhost')
[root@vburplsmtp06 mail]#&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2011 06:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5299597#M59948</guid>
      <dc:creator>Arunabha Banerjee</dc:creator>
      <dc:date>2011-08-14T06:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5300505#M59949</link>
      <description>&lt;P&gt;In /etc/hosts, you have told "mail2.alinta.net.au" is an alias for vburplsmtp06.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your test message is addressed to "abanerjee@mail2.alinta.net.au". Because the destination hostname matches one of the aliases of the local host, our sendmail will notice this is supposed to be a &lt;STRONG&gt;local&lt;/STRONG&gt; recipient, so there is no reason to use a smarthost. It will attempt to deliver the mail locally, typically to Unix mailbox file /var/mail/abanerjee (assuming that such an user exists on the system).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "forwarding to localhost" happens because in RHEL 3 and newer, Sendmail runs as two separate processes:&lt;/P&gt;&lt;PRE&gt;# ps -ef |grep send
root      4078     1  0 Jul04 ?        00:01:59 sendmail: accepting connections
smmsp     4087     1  0 Jul04 ?        00:00:00 sendmail: Queue runner@01:00:00 &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;All the messages are first forwarded to the local Sendmail queue runner process, which will then make the necessary outgoing connections and/or invoke the local delivery agent as necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want absolutely &lt;STRONG&gt;all&lt;/STRONG&gt; mail (even the messages addressed to local recipients) to go to exchange server, you should add&lt;/P&gt;&lt;PRE&gt;define(`MAIL_HUB',`mailhost')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;to your sendmail.mc, and then regenerate your sendmail.cf using these commands:&lt;/P&gt;&lt;PRE&gt;cd /etc/mail
make&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;(The /etc/mail/Makefile contains instructions for the "make" command, including the correct m4 command line for regenerating the sendmail.cf using the sendmail.mc as a template.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sendmail's logic works out like this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is MAIL_HUB set? If yes, send message to MAIL_HUB server for further delivery; otherwise continue.&lt;/LI&gt;&lt;LI&gt;Is the destination address local? If yes, then deliver locally; otherwise continue.&lt;/LI&gt;&lt;LI&gt;Is SMART_HOST set? If yes, send message to SMART_HOST server for further delivery; otherwise continue.&lt;/LI&gt;&lt;LI&gt;(all the other steps required to find and contact a remote mail server over the Internet)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If you use MAIL_HUB, your Exchange server must be prepared to accept and handle incoming messages addressed to destinations like "root@mail2.alinta.net.au", "root@vburplsmtp06" or maybe even just "root" in some meaningful fashion.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2011 14:32:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5300505#M59949</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-08-15T14:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5306269#M59950</link>
      <description>&lt;P&gt;Hi Matti,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the explantaion. But after implementing the steps "define(`MAIL_HUB',`mailhost')" still I am facing the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 18:12:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5306269#M59950</guid>
      <dc:creator>Arunabha Banerjee</dc:creator>
      <dc:date>2011-08-19T18:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5326139#M59951</link>
      <description>&lt;P&gt;If you use an IP of the exchange server for the DS directive, can you relay mail?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2011 18:41:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5326139#M59951</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2011-09-08T18:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: sendmail can not relay mail to exchange server</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5335767#M59952</link>
      <description>&lt;P&gt;Did you resolved the problem or it is still appears?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2011 06:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sendmail-can-not-relay-mail-to-exchange-server/m-p/5335767#M59952</guid>
      <dc:creator>tuxy</dc:creator>
      <dc:date>2011-09-19T06:54:59Z</dc:date>
    </item>
  </channel>
</rss>

