Cannot route mail through an internal Exch5.5 SMTP server



I am at my wits end with this... help please!

FreeBSD 6.1-RELEASE
Sendmail 8.13.6 (base)

I'm trying to accomplish what should be simple:

1) all outgoing From: email addresses should be stamped @ourdomain.com and
not @server.corpdomain.com

2) All emails should be routed through the corp SMTP server (runs MS
Exchange 5.5.2658.3). Users use Outlook clients to connect to the corp
Exchange system and this SMTP server is our only gateway into it.

I'm a bit rusty on my Sendmail and .mc stuff (I really haven't done much
with managing email flow, sendmail or other MTAs) so I tried to brush up
online as best I can, but I don't remember it being this hard in the past.

At this point, here are the things I've put in my .mc file (I'm sure at
least some is redundant or not needed/applicable, but this is the result of
trying more and more ideas):

define(`SMART_HOST', `internal.corp.smtp')
define(`LOCAL_RELAY', `internal.corp.smtp')
FEATURE(masquerade_envelope)
FEATURE(always_add_domain)
FEATURE(`masquerade_entire_domain')
FEATURE(`allmasquerade')
MAILER(local)
MAILER(smtp)
MASQUERADE_AS(`ourdomain.com.')
MASQUERADE_DOMAIN(`outdomain.com.')

(and did the required "make install" in /etc/mail to apply it)

resolv.conf has the corp DNS servers in it. I can use ping and host on
internal.corp.smtp and it resolves to the proper IP address. I also tried
putting them into /etc/hosts along with entries for the versions of the
name with the ending dot.

10.xxx.xxx.xxx internal.corp.smtp internal
10.xxx.xxx.xxx internal.corp.smtp.
10.xxx.xxx.xxx internal.

I've even done up mailertable (plus the hash) with the following line:
.ourdomain.com smtp:internal.corp.smtp

This was the result of some stuff I read on the web regarding the error.
Anyways, here is the problem that persists after all that:

Sep 14 15:25:04 bugzilla sm-mta[67919]: k8EJOhhB067917:
to=<xxxxxx@xxxxxxxxxxxxx>, delay=00:00:21, xdelay=00:00:20, mailer=relay,
pri=30985, relay=internal.corp.smtp., dsn=4.0.0, stat=Deferred: Name
server: internal.corp.smtp.: host name lookup failure

First of all, not sure why it's adding the trailing dot, but hence my
additions to the /etc/hosts file. Secondly: how can it not resolve?

bugzilla# host internal.corp.smtp
internal.corp.smtp has address 10.xxx.xxx.xxx
bugzilla# host internal.corp.smtp.
internal.corp.smtp has address 10.xxx.xxx.xxx

my /etc/nsswitch.conf file:
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files

And not that it applies here... but I can telnet to the SMTP server on port
25, type out a session manually and send an email that way. So ultimately
it can work. I just don't get this quirky name-resolution problem.

I searched on Google and came up with tons of stuff on this, lots of people
asking about it but not a lot of answers... I've tried the ones I've found,
but a lot of discussions fell dead without the problem being solved. I'm
hoping a fellow FreeBSD user (who knows more than me) might help guide me
to a solution. Any ideas?

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: renaming of /tmp partition. Any adverse effect on OS
    ... The applications running under FreeBSD consider /home/app as the root ... FreeBSD hosts are being used for running our native applications. ... you are effectively disabling the required permissions on ... one host to check whether everything is fine or not. ...
    (comp.os.linux.setup)
  • Re: Sendmail- Is this correct.?
    ... > Paul Howarth wrote: ... as it's a requirement to have the address in a DNS ... I sort of believed that if you used 'smart host' that if the smart host ... >From Cox.net SMTP server ...
    (Fedora)
  • Re: Problems using gssapi authentication from FreeBSD to Linux machines
    ... work between a FreeBSD host and a Linux host. ... STABLE code on the FreeBSD box, I've got forwardable Kerberos tokens ... but I can't get the Linux box to accept the Kerberos ...
    (FreeBSD-Security)
  • Re: MX records for non-mail hosts
    ... Lately I have been getting a lot of spam that was originally sent to ... record and send the message to our smtp server. ... have an MX record for every host" but haven't said why. ... "root" - there's no law that forbids you from masquerading root's mail, ...
    (comp.mail.sendmail)
  • Re: Problems using gssapi authentication from FreeBSD to Linux machines
    ... work between a FreeBSD host and a Linux host. ... STABLE code on the FreeBSD box, I've got forwardable Kerberos tokens ... but I can't get the Linux box to accept the Kerberos ...
    (FreeBSD-Security)