View previous topic :: View next topic |
Author |
Message |
-leliel- Apprentice
Joined: 03 May 2003 Posts: 294 Location: Germany
|
Posted: Thu Aug 14, 2003 2:06 pm Post subject: Sendmail and MS Exchange |
|
|
Hi,
I want to send mail with sendmail through a MS Exchange server (relay).
How do I login to this server using sendmail??
ehlo output of the exchange server:
Quote: | 250-ex.domain.com Hello [172.28.0.1]
250-XEXCH50
250-HELP
250-ETRN
250-DSN
250-SIZE 8192000
250-AUTH LOGIN
250 AUTH=LOGIN |
Thanks a lot. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Thu Aug 14, 2003 11:29 pm Post subject: |
|
|
Sendmail is an MTA much like Exchange itself. I suppose you could hack something together to make Sendmail login into Exchange, but I'm not sure that you would need to. You would need to tell Exchange that the IP address of your Sendmail machine is allowed to relay mail and then configure Sendmail to use Exchange as the relay.
Unfortunately, I've usually done it the other way around for scalibitlity reasons.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
-leliel- Apprentice
Joined: 03 May 2003 Posts: 294 Location: Germany
|
Posted: Fri Aug 15, 2003 5:45 am Post subject: |
|
|
Well, I have to write a script to automatically send mails.
Code: | /usr/sbin/sendmail -t -n << EOF
From:blubb
To:abc
Subject:test
abcde
EOF |
This mail should be relayed through the exchange server.
Any Ideas?
I found a howto, but the mail will not be send cause sendmail couldn't find the dns hostname of the exchange server.
Thanks a lot |
|
Back to top |
|
|
Liathus Apprentice
Joined: 21 Mar 2003 Posts: 163 Location: Fargo, ND
|
Posted: Fri Aug 15, 2003 5:56 am Post subject: |
|
|
You will need to turn smtp relaying on for the IP address of the machine running sendmail.
After that you will need to tell sendmail to use the exchange server to deliver messages instead of doing so directly. You can do this in sendmail.cf or if you are scared of that file like me you could use webmin :) |
|
Back to top |
|
|
-leliel- Apprentice
Joined: 03 May 2003 Posts: 294 Location: Germany
|
Posted: Fri Aug 15, 2003 7:07 am Post subject: |
|
|
this is a part of the logfile:
Quote: | Aug 14 18:08:10 proxy2 sendmail[9337]: alias database /etc/aliases rebuilt by root
Aug 14 18:08:10 proxy2 sendmail[9337]: /etc/aliases: 40 aliases, longest 10 bytes, 395 bytes total
Aug 14 18:08:10 proxy2 sendmail[9350]: starting daemon (8.11.6): SMTP+queueing@01:00:00
Aug 14 18:08:32 proxy2 sendmail[9354]: h7EG8Tu09354: from=root, size=6, class=0, nrcpts=1, msgid=<200308141608.h7EG8Tu09354@localhost.localdomain>, relay=root@localhost
Aug 14 18:08:32 proxy2 sendmail[9354]: h7EG8Tu09354: to=test@domain.com, ctladdr=root (0/0), delay=00:00:03, xdelay=00:00:00, mailer=esmtp, pri=30006, relay=172.20.1.78, dsn=5.1.2, stat=Host unknown (Name server: 172.20.1.78: host not found) |
I also changed /etc/nsswitch.conf:
hosts: files [NOTFOUND=continue] dns
to search the /etc/hosts firstly but it's not working at all. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Fri Aug 15, 2003 4:47 pm Post subject: |
|
|
Looks like DNS resoltuion problems. Add an entry for the 172.x.x.x machine into your /etc/hosts and then change your smart relay to the host name you've entered.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
thorne Apprentice
Joined: 19 Sep 2002 Posts: 177
|
Posted: Wed May 12, 2004 9:43 pm Post subject: |
|
|
-leliel- wrote: | I found a howto, but the mail will not be send cause sendmail couldn't find the dns hostname of the exchange server. |
Hi... could you post a link to this how-to? I'm trying to setup bugzilla to go through an exchange server, but it only works with sendmail (or so I have read,) so I would like to know how to do this.
Thanks. _________________ Stupid bug, you go squish now!
-Homer Simpson
Registered linux user #287718 |
|
Back to top |
|
|
|