Relaying e-mail via Microsoft Exchange server for Elastix 1.6 or CentOS 5.x. You will need to have a valid Active Directory domain user with an Exchange mailbox to send mail as.
Configuring Postfix:
SSH to your Elastix/CentOS box and run the following commands:
1
2
3
4
5
6
7
8
9
10
11
12
13
postconf -e 'relayhost = exchange-ip-address'
postconf -e 'smtp_sasl_auth_enable = no'
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
postconf -e 'smtp_sasl_security_options ='
postconf -e 'mydomain = your-domain-name.com'
postconf -e 'myhostname = elastix-hostname.your-domain-name.com'
echo "exchange-ip-address domain-username:domain-password" > /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
Restarting Postfix to apply changes:
1
/etc/init.d/postfix restart
Testing if mail works:
1
mail -s test valid-email@whatever.com < /etc/hosts
If everything is configured correctly, you should get an email from your Elastix box with subject “test”.