LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-05-2011, 05:47 AM   #1
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Rep: Reputation: 0
Question how to forward mail of one user to other in sendmail server ?


hi everybody,
i have configured sendmail server in my lan and it is working fine for me.but there is one little problem for me.
i want mails send sunita should be received by vinita.sunita and vinita both are normal users on same pc.

for this i made entry in
Code:
 /etc/aliases   sunita:  vinita
please tell me where m i wrong?
 
Old 01-05-2011, 06:31 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Did you run:
Code:
newaliases
after editing /etc/aliases?
 
Old 01-05-2011, 07:56 AM   #3
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
yea that was missing.thanx for your help.now i have one other problem i got error
Quote:
Starting sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 39: unknown configuration line "
when i restart sendmail service.

i have done the following edits
Quote:
MASQUERADE_AS('example.com')dnl
Quote:
define('SMART_HOST','smtp.abc.com')
is there any mistake?
 
Old 01-05-2011, 08:51 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Maybe it's because of the single quote instead of the backtick in front of smtp.abc.com in the SMART_HOST definitio
Better have a look at line 39 of /etc/mail/sendmail.cf
 
Old 01-05-2011, 09:06 AM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
piyusharora420,

I have merged your two duplicate threads, and removed any posts that were made redundant by the merge. Please take care to post your question in only one location in the future.

Kind regards, & good luck with this issue!

Sasha
 
Old 01-05-2011, 11:07 PM   #6
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
ya problem is at SMART_HOST line.beacause when i comment this line out the error disappeared.but what is the problem?i have not found yet.i have used front tick at front of SMART_HOST also but still same error

Last edited by piyusharora420; 01-05-2011 at 11:09 PM. Reason: full details were not given before
 
Old 01-06-2011, 03:19 AM   #7
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Hi,

You need to replace the opening single quotes with a backtick. Adding a dnl at the end is also good.
So the macro should look like:
Code:
define(`SMART_HOST',`smtp.abc.com')dnl
If this still doesn't work, you can edit directly /etc/mail/sendmail.cf (in general not recommended) and use:
Code:
DSsmtp.abc.com
Regards
 
Old 01-06-2011, 07:04 AM   #8
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
thanx for your reply.i am trying to make a system (without internet connection) in my lan as a sendmail server.will it work?i just want to use it in lan.i have rhel5,centos,in my lan.please guide me i have never used sendmail server
 
Old 01-06-2011, 07:53 AM   #9
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
If you want to want to use sendmail inside a lan, you don't need a smarthost.
 
Old 01-06-2011, 08:05 AM   #10
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
actually i was trying to solve a rhce question.so i tried alot.ok it is not needed in lan but can't we use it in lan?is it showing error because i am using it in lan?
 
Old 01-06-2011, 08:34 AM   #11
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
The error is because of the wrong arguments the SMART_HOST definition in the sendmail.mc
If you use:
Code:
define(`SMART_HOST',`smtp.abc.com')dnl
and rebuild sendmail.cf, it should go away

Sure you can use smarthost in a lan, but it's an overkill. Read this to see what it does and why you don't need it in a lan
 
Old 01-07-2011, 12:45 AM   #12
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
thanx for ur reply, but i have already tried what have you said.now i elaborate my problem.
i have three pc's in my lan- 1.centos 2.rhel 3.rhel and i want to make centos as mail server.should i need to configure client side for SMART_HOST only?means mails will be forwarded to my mail server.please guide me with full explanation.i know it will be time consuming for you.please help me out
 
Old 01-07-2011, 02:34 AM   #13
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Look I cannot answer the question in a way suited for rhce, cause I don't know what they want and I also can't do your homework.
I can only tell you that in theory you can setup sendmail on each client and configure it to use the centos box as a smarthost, but it's superfluous, as you will have as many sendmail servers as your clients. In this case you have to configure applications running on clients to use localhost as smtp server.

In practice you configure sendmail only on centos (and you add a smarthost to it, only if it's needed to send mail to the internet). In this case applications running on clients should be configured to use the centos box as smtp server.
 
Old 01-07-2011, 03:20 AM   #14
piyusharora420
Member
 
Registered: Nov 2010
Posts: 93

Original Poster
Rep: Reputation: 0
means only clients are needed to configured for smtp or i can say for SMART_HOST option?
suppose my server name is server.example.com then it should be
Quote:
define(`SMART_HOST',`smtp.server.example.com')dnl
or it should contain any user account ?
 
Old 01-07-2011, 04:09 AM   #15
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,883

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Quote:
suppose my server name is server.example.com then it should be
Quote:
define(`SMART_HOST',`smtp.server.example.com')dnl
If your server name is server.example.com, you should use this name (without the smtp in front). No user accounts or anything else.
Code:
define(`SMART_HOST',`server.example.com')dnl
If you mean that the client sendmail needs to authenticate to the sendmail acting as a smarthost, then I suggest you to read this howto.
It describes, how to setup sendmail with smtp auth either as a server as well as a client to another smtp server (smarthost)
 
  


Reply

Tags
aliases, sendmail, sendmail access, sendmailmc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Sendmail forward all incoming mail to localhost port 26 (Domino mail) speedgelb Linux - Software 3 09-27-2013 10:18 AM
where do mail go if user not exist on mail server(sendmail) Terry56 Linux - Server 1 01-22-2010 05:09 AM
Configuring Sendmail to forward to different mail server sweye Linux - Server 1 03-17-2009 12:55 PM
Sendmail mail forward prashanlk Linux - Networking 2 09-14-2008 10:35 PM
Sendmail problem .forward.mail Please HELP kepweng Linux - Software 0 04-16-2004 04:29 AM


All times are GMT -5. The time now is 10:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration