Configure Postfix to relay to Exchange Server with NTLM authentication

Hello

I have a shell script, which should send email, if any error occurred. This script is running in Red Hat Linux 4.6, and want to configure postfix so it can relay to an Exchange Server.

The Authorization method of Exchange server, I guess is: 250-AUTH NTLM. So I have:

Server A ( Red Hat 4.6 10.150.200.60)
Server B ( Exchange Server 172.22.85.125 )

I would like you to help me with the necessary configurations in files of postifx, and if needed, the configurations in Exchange Server. Also, how to use NTLM authentication please.

This is what I have done already

  • Postifx is already installed
root     10194     1  0 May23 ?        00:00:00 /usr/lib/postfix/master
postfix  10253 10194  0 May23 ?        00:00:01 qmgr -l -t fifo -u
postfix  21995 10194  0 17:08 ?        00:00:00 pickup -l -t fifo -u
  • Succesful test connection with telnet to Exchange Server.
sdis09cor:~ # telnet 172.22.85.125 25
Trying 172.22.85.125...
Connected to 172.22.85.125.
Escape character is '^]'.
220 MEXHUB09.movi.com.yy Microsoft ESMTP MAIL Service ready at Fri, 1 Jun 2012 14:12:45 -0500
ehlo
250-MEXHUB09.movi.com.yy Hello [10.150.200.60]
250-SIZE
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250-XRDST
250 XSHADOW

Appreciate your help

Thanks in advance !!

Regards

Solution:

Hi:

I finally got it. Here are the steps:

Postfix 2.1.1
Cyrus 2.1.25

  1. install libtool2.4
./configure
make 
make install
  1. install openssl-1.0.1c
./config shared
make
make test
make install
echo /usr/local/ssl/lib > /etc/ld.so.conf.d/openssl.conf
ldconfig

echo /usr/local/lib/sasl2 >> /etc/ld.so.conf
ldconfig
gzip -d cyrus-sasl-2.1.25.tar.gz
tar -xvf cyrus-sasl-2.1.25.tar
cd cyrus-sasl-2.1.25

export CPPFLAGS=-I/usr/local/ssl/include
export LDFLAGS=-L/usr/local/ssl/lib   

./configure --with-plugindir=/usr/local/lib/sasl2 --with-saslauthd=/var/run/saslauthd --disable-gssapi --disable-cram --disable-anon --disable-otp --disable-krb4 --disable-digest --disable-scram --enable-plain --enable-login --enable-ntlm
make 
make install
cp /usr/local/lib/sasl2/libntlm.la /usr/lib/sasl2/
cp /usr/local/lib/sasl2/libntlm.so.2.0.25 /usr/lib/sasl2/

cd /usr/lib/sasl2/

ln -s libntlm.so.2.0.25 libtnlm.so
ln -s libntlm.so.2.0.25 libtnlm.so.2

Victor

2 Likes