Solved

mail relaying

Posted on 2008-10-03
10
302 Views
Last Modified: 2013-12-16
Hi,

We have one test domain  and exchange configured in windows2003. And we have one application running under rhel3 linux. How to relay mail from linux to windows.
I mean the application  has to send an email using windows exchange (Means relaying)

How to configure relaying.
Thxs inAdvance
krishgudd
0
Comment
Question by:krishgudd
  • 8
  • 2
10 Comments
 
LVL 29

Expert Comment

by:fosiul01
ID: 22632304
are you using sendmail ??

then in sendmail.mc

look for this :

# "Smart" relay host (may be null)
DSsbs.exchangeserver.local


# who I masquerade as (null for no masquerading) (see also $=M)
DMexchangeserver.com

then compile your sendmail.cf

then your  server should be abel to send email via exchang server
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22632307
Sorry the upper one is for sendmail.cf

you can edid sendmail.cf and add those,

or wait, i am sending you configuration for sendmail.mc

if you edit sendmail.cf diretly then you dont need to compile sendmai again

0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22632332
Ok here we go

in your sendmail.mc

look for this

define(`SMART_HOST',`sbs.yourdomain.local')dnl


MASQUERADE_AS(`mydomain.com')dnl MASQUERADE_AS(`yourdomain.com')dnl

then compile sendmail , it will work
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:krishgudd
ID: 22632369
Hi,
I didn't find this line
# who I masquerade as (null for no masquerading) (see also $=M)
DMexchangeserver.com
i am send a test mail
#mail user1@testing.local
subject ****
jjh
ctlr+d
when i check mailq there are no messages in queue but i am not able  to see those mails.
My domain is testing.local
DNS is win2k3.testing.local
Thxs in Advance
Krishgudd
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22632395
did you do this ??

in sendmail.mc

define(`SMART_HOST',`win2k3.testing.local')dnl
MASQUERADE_AS(`mydomain.com')dnl MASQUERADE_AS(`testking.com')dnl


then : you need to compile sendmail by using

make command

then try to sendemail like this
cat /etc/hosts | mail -s "host file" user1

or cat /etc/hosts | mail -s "host file" user@gmail.com



0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22632607
One more thing :

in /etc/aliases  , you need to add mailing list of user, other wise it will not send email

you need to add user and their address like this

usera:        usera, usera@testing.com


then  this command : newaliases

0
 

Author Comment

by:krishgudd
ID: 22635498
Hi

I want to clearly explain u
I have one domain testing.local
and my mail server is win2k3.testing.local(172.24.203.203)
i have one linux box just i started the sendmail service .what to do next ?
starting from scratch can you tell me
Thxs in Advance
Krishugdd
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22635946
i already told you at my previous 2 comments. Stil if u need more specifiq give me some time i wil post again.i m nt infront of pc.
0
 
LVL 29

Accepted Solution

by:
fosiul01 earned 500 total points
ID: 22641238
Sorry for late reply,
ok you need to re configure your sendmail.cf file

which is in , /etc/mail/sendmail.cf


as I  said earlier edit these 2 lines

define(`SMART_HOST',`win2k3.testing.local')dnl
MASQUERADE_AS(`mydomain.com')dnl MASQUERADE_AS(`testing.com')dnl


after this :

you need to compile sendmail.mc with this command

make sure you are in /etc/mail
then type : make

then  you need to add username and email address in the /etc/aliases file
like this

usera:        usera, usera@testing.com

then type , newaliases ( it will recreate aliases)

then try to send email, it will work

when you will complete these as i said, then let me know what happended





0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22667984
hi any luck ??

one more this , from your exchange mailserve you will have to give permission to send email from that linux box
other wise mail will not pass via your mailserver
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question