I am trying to configure sendmail to send emails out through an MS
Exchange server.
I have tried all kinds of things with the sendmail.cf file, the hosts
file and netsvc.conf file.
Have also tried adding the servers IP to the Exchange machine, but no
joy.
Would anybody care to lend a hand, please? The directors arent
signing off expenditure forms without a fight these days, so payment
in cash might be a problem, but could perhaps pay in old hardware from
all the branches we are closing!
Many thanks,
> I am trying to configure sendmail to send emails out through an MS
> Exchange server.
>
> I have tried all kinds of things with the sendmail.cf file, the hosts
> file and netsvc.conf file.
You've probably mucked up the sendmail.cf file by directly editing it with
no knowledge of what you're doing.
Use the sendmail.mc file, and add the line
define(`SMART_HOST', `your.exchange.server')
somewhere above your MAILER() statements, then rebuild the sendmail.cf from
the sendmail.mc file.
Of course you'll lose any other changes you've directly edited in the
sendmail.cf file, so maybe you'll want to edit sendmail.cf directly again
and change:
# "Smart" relay host (may be null)
DSyour.exchange.server
Thanks for your assistance. I copied the newly generated sendmail.cf
file over to /etc/mail & restarted sendmail, but got the same error.
(Which I didnt include in the previous post...)
# sendmail -v @EXSVR:joe.b...@jobbs.co.uk < /emailfile
@EXSVR:joe.b...@jobbs.co.uk... User unknown
It cleared up the nag message about the out of date config file
though, so thanks!
I also found a website about building the hash tables, so I ran this
little lot too:
# cd /etc/mail
# touch access domaintable mailertable virtusertable
# for file in access domaintable mailertable virtusertable
> do
> makemap dbm /etc/mail/${file} < /etc/mail/${file}
> makemap hash /etc/mail/${file} < /etc/mail/${file}
> done
#
# touch /etc/mail/local-host-names
# chmod 664 access* domaintable* mailertable* virtusertable*
(still no joy...)
Here's a clue though - if we set the email address to a recognised
user name within /etc/passwd, we dont get this error. (still doesnt
send anything though :-()
Any ideas?
Configure the Exchange server as the SMART_HOST - see the section titled
"MASQUERADING AND RELAYING" in cf/README or
http://www.sendmail.org/doc/sendmail-current/cf/README.
--
Rob MacGregor (BOFH)
Rule 37: "There is no 'overkill'. There is only 'open fire'
and 'I need to reload.'"
tlhIngan Hol vIjatlhbe' MacGregor, and the README is long and my
attention span short, I'm afraid.
I have tried setting SMART_HOST in sendmail.mc, then m4'ing it, then
copying sendmail.cf, then restarting. I just want somebody to make it
go away, so that I can go back to whatever it is I normally do in this
office based alternate reality.
define(`SMART_HOST', `SERVER99')
was the kind of thing I tried in sendmail.mc. Should that be the name
of the server, or the domain name (somethingorother.co.uk)?
The name of the smarthost (your exchange machine)
needs to be resolved by the sendmail server.
Type "host <name.of.exchange_machine" on the sendmail
machine. If you receive a result (an IP-Address), and it
is the right IP-Address of the echange server, then
configure the smart_host directive with that name and
after m4'ing the sendmail.mc and restarting sendmail
all mails should be pushed to exchange.
If it doesn't work give us a look on the related part of
your mail log file normally located in /var/log
named "mail" or "maillog".
-Ingo.
Sounds like your Sendmail still considers jobbs.co.uk a local domain.
Remove it from your Cw definition or /etc/mail/local-host-names file.
Alternatively, look into the LUSER_RELAY feature.
HTH
T.
--
Please excuse my bad English/German/French/Greek/Cantonese/Klingon/...
This is a bit of a guess, but if you are getting delivery errors for
users that are not listed in `/etc/passwd', then it looks like your
Sendmail is trying to deliver the email messages for the particular
domain through the `local' mailer.
Can you run
# sendmail -bv joe.b...@jobbs.co.uk
and show us the results?