Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.