Link to home
Start Free TrialLog in
Avatar of Rabeyc
Rabeyc

asked on

Getting error when trying to forward mail from my Linux email server to Exchange Server on a WIN NT <br>SERVER.

1. I use Exchange Server on my internal network.

2. I use Linux on an "external network" to relay mail from the Internet in and out. The Linux has a fixed IP address from my ISP.

3.  Internet Mail is successfully transmitted from any client on my internal network via Exchange Server to my Linux box on my external network and to the Internet.

problem:  I am ALREADY RECEIVING  INTERNET MAIL from the Internet as far as my Linux box.  I have a test user on the Linux box and the test user receives mail from the Internet.  However my internal network users' mail is reject by the linux box with the following error "Reason: 5.7.1 testuser@mydomain.org .... relaying denied"

Done:
1) I have relay setup in /etc/access for my Exchange Server' NT Server.
2) I have an entry in /etc/mailertable as follows:
   "@mydomain.org     SMTP:exchange.mydomain.org
3) I have entered lines for my two hosts in their hosts files

In my sendmail.mc file I have defined the smarthost as my ISP mail server and also setup the MASQUERADE lines recommended.

PS.  I have the Exchange Server (Winnt) and the Linux server connected to each other via a hub and secondary nics on each and sharing their own subnet.

Thanks
Avatar of jlevie
jlevie

Does your access file look like:

1.2.3.4      RELAY

with the IP being that of your exchange server? And after changing the access file did you rebuild the access map?

How about posting the envelope headers of a failed message?
Avatar of Rabeyc

ASKER

The access has the ip address:
10.0.0.25 RELAY

And the access.db was rebuilt the access map using
# makemap hash /etc/mail/access < /etc/mail/access


Is all outbound email from internal users being sent to the exchange server and then through the Linux relay? You can tell what the path is by looking at the envelope headers in the bounce. Depending on what client you are using you may need to enable viewing of all headers in order to see them.
Avatar of Rabeyc

ASKER

Yes all outbound mail from internal users are sent to the exchange server and then through the Linux relay.  The Exchange server routes the mail directly to the ip address of the Linux server.  This portion works well.

The envelope header of an incoming mail that cannot be relayed from linux to exchange follows:

Mar 20 20:56:37 isumail sendmail[1848]: g2L2ubp01848: ruleset=check_rcpt, arg1=<rabeyc@mydomain.org>, relay=wgs1.isp.net [206.27.238.5], reject=550 5.7.1 <rabeyc@mydomain.org>... Relaying denied

Thanks
Rabeyc

Okay, so it's inbound mail from the Internet that's bounced by Linux. I misunderstood the problem. I going to assume that you are using the Linux box as a true relay and want all mail addresses to your domain sent on to the exchange server and that you won't have any accounts on the Linux box.

Add your domain name to /etc/mail/local-host-names and empty the mailertable file. Add an entry to /etc/mail/virtusertable that looks like:

@mydom.tld    %1@exchange-srv.mydom.tld

replacing mydom.tld with your domain name and exchange-srv.mydom.tld with the FQDN of your exchange server. Rebuild the maps and re-start sendmail and I believe that you'll find that it will relay mail.

If that doesn't work I'll need to see the contents of your sendmail.mc file.
Avatar of Rabeyc

ASKER

Thanks! It worked!

I also deleted the line that defines the SMARTHOST in the sendmail configuration file.  I am not sure if it was required.

You may also want to comment on the following: The email working as it is what are the areas of security in Linux that can be looked at to improve the security from the point of view of viruses and also from unauthorized access to my internal network.

Thanks

Avatar of Rabeyc

ASKER

I accept answer.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial