LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2013, 11:22 PM   #1
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Rep: Reputation: Disabled
send email within network


hi, i have a server has no internet access,
but it needs to send email to other PC (this pc can ssh to the server)
can i know what pre requisite i need
there are mail server,dns server on the network

my idea is to relay on the mailserver.
is this work?

note:the server only need to send email, do not need to receive email
 
Old 01-15-2013, 05:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
You don't *need* DNS if it's not already there. Just put an entry to otherpc.domain.com in /etc/hosts and then any mail addressed to that domain will, on most default systems, be sent to that IP address. You'll then just need a mail server on the other end configured to recieve that specific domain.
 
Old 01-15-2013, 11:16 AM   #3
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Original Poster
Rep: Reputation: Disabled
hi thx for your reply.
i m using postfix. so i just put mailserver's ip on my main.cf relayhost, and then add a pc name on etc/hosts?

the server is just a normal server, it will relay on the mailserver to send the email
any setting i should do?
thx
 
Old 01-15-2013, 12:05 PM   #4
rmacd
LQ Newbie
 
Registered: Jan 2013
Location: Scotland
Distribution: Debian
Posts: 16

Rep: Reputation: 2
From what I gather, you've one server - your mail server - from which you send mail. Right? And you say you're hoping to 'receive' email on a PC which SSHs into the server. Right?

Take a step back for a minute. Your sending server - let's call this Server A - will need to 'speak' to the receiving Server B ('PC' as you've called it in this case) over SMTP. The receiving server will then say "hey, thanks - got the message" and depending on what rules you've set up, it'll either be delivered locally, or processed further.

Right now, you're saying the receiving server is able to SSH to the sending server. Unless, however, you're doing something exotic like using SSH to set up a reverse tunnel, triggering Server A to flush its mail queue via an unbound port back to the SMTP listener on Server B (which is possible, but ridiculous), forget about SSH.

It's hard to work out what you mean by 'relay[ing] on the mailserver to send the email'... can Server A and B see each other 24x7? If you set a hostname to loopback (ie 127.0.0.1 lenny.local in /etc/hosts, for example), you can then set up aliases as address:user in your Postfix configuration on box A and simply connect via, I don't know, whatever client you like on the PC - 'Server B' - to retrieve the mail.

Flesh out your set-up a little more and me wight be able to help you better.
 
Old 01-15-2013, 09:44 PM   #5
slowerogue
Member
 
Registered: Oct 2012
Posts: 93

Original Poster
Rep: Reputation: Disabled
I hv a server A,linux, need to send email but no internet access
Another server, is a mailserver, is up already and able to send email

My question is, my serverA is not connected to internet, how can I send email?
If I'm Using relay,what do I need to set in postfix
Thx

Last edited by slowerogue; 01-15-2013 at 09:46 PM.
 
  


Reply


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 postfix send email to another postfix in local network (LAN)? h4k33m Linux - Server 9 06-04-2015 05:33 PM
Send email to mail server/account on local network? dbrazeau Linux - Networking 2 03-07-2011 12:52 PM
Command based email client to send email through secure smtp havolinec Linux - Newbie 2 07-27-2010 08:40 AM
Perl email::send.. how to send the email? hawk__0 Programming 6 12-24-2009 02:53 PM
unable to send email from outside of the local network Andreja Linux - Software 2 06-05-2004 11:53 AM


All times are GMT -5. The time now is 04:48 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration