Configure sendmail to use exchange server

i am new in AIX i am trying to write a script to take a backup for specific files on server to and check error log if backup success send email to administrator , script done except for sending mail , i try to configure sendmail on aix to use our exchange server to send emails but still get error user unknown

In your /etc/sendmail.cf, try setting the line that starts with "DS" to the name of your windows exchange server. From this:

DS

to this:

DShostname.domain.com

Run this command and you should see similar output after the change.

localhost:/:$ grep ^DS /etc/sendmail.cf
DShostname.domain.com
localhost:/:$

Try a simple mail command like this:

mailx -s "subject" user@domain.com << /dev/null

hi,
i already change sendmail.cf file with this parameter

regarding code u send i do not underestand what i do with it

this is the o/p from mailx command

# mailx -s "subject" ahmed_salah@gasco.com.eg << /dev/null
> Null message body; hope that's ok
ahmed_salah@gasco.com.eg... User unknown
/dead.letter... Saved message in /dead.letter

attached is sendmail.cf after changed

Can you resolve gasco.com.eg? Try to ping it and see what happens. If not, you may need your DNS configured correctly.

hi,
i can ping mail server mail.gasco.com.eg and i got replay but when i ping gasco.com.eg i got replay from differerent addresses cause we have multiple domain controllers all members in the same domain gasco.com.eg

why are u troubling use postfix

So, you have multiple addresses, so could this be a DNS issue that you are not guarenteed to get the right server?

Could this be a firewall issue? Try to open the connection:-

telnet www.xxx.yyy.zzz 25

for each IP address that the DNS returns. Port 25 is the smtp port. You should get output similar to the following:-

# telnet www.xxx.yyy.zzz 25
Trying...
Connected to mail.mycomp.com.
Escape character is '^]'.
220 mail.mycomp.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at  Tue, 21 Dec 2010 13:30:58 +0000 
quit
221 2.0.0 mail.mycomp.com Service closing transmission channel
Connection closed.

If not, you could have a firewall issue, or perhaps even be going to the wrong place entirely. If you can ping the address, then a firewall issue would simply seem to hang (timeout in about 30 seconds usually) If you can't ping, then it's DNS or routing I expect.

Do let us know how you get on.

Robin
Liverpool/Blackburn
UK