Solved

mail relaying

Posted on 2008-10-03
10
300 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now