Solved

mail relaying

Posted on 2008-10-03
10
298 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:krishgudd
Comment Utility
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
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 29

Expert Comment

by:fosiul01
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

744 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

13 Experts available now in Live!

Get 1:1 Help Now