How to permit all local accounts to send mail directly to Exchange addresses
Environment
- Red Hat Enterprise Linux 5
Issue
- How to permit all local accounts to send mail directly to Exchange addresses
Resolution
- Edit /etc/mail/sendmail.mc and change following line from:
dnl # define(`SMART_HOST', `smtp.your.provider')dnl
To:
define(`SMART_HOST', `custom_exchange_address')dnl
Note : You should change custom_exchange_address with appropriate address.
- Change following line from:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
To:
dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
- Execute following command:
cd /etc/mail
m4 sendmail.mc > sendmail.cf
service sendmail restart
Diagnostic Steps
- Send test mails :
echo test | mail -s test ralst_g
echo test | mail -s test-remote username@domainname.com
The first echo command should send email locally to user ralst_g and second one should send email to custom_exchange_address which should handle the finally delivery to username@domainname.com. Please replace username@domainname.com with an actual email address.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments