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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to better understand how email works under Linux and to use mail from the command line.
I don't know why I want to do this, I just do. I guess it would be convenient in a way.
My Unix books simply tell me how to use the "mail" program.
I have since learned that I probably need to configure my MTA (mail transfer agent) which is Postfix.
Postfix is installed with my OpenSuse distro. I can see my /etc/postfix/main.cf file.
Many of the lines are commented out with a "#", such as #myhostname = host.domain.tld, #myhostname = virtual.domain.tld, #mydomain = domain.tld, #inet_interfaces = all.
I suppose these lines need to be uncommented in order for me to use mail from the command line.
And they probablay need to be edited to fit my needs.
1) I would like any basic suggestions on configuring this file.
2) Also, if and when I get mail to work on the command line, is it safe? I understand mail to be a filterless program, so any spam or virus might get thru and opened if I'm not careful.
The mail command is safe. The mail command uses the sendmail binary, which ultimately just drops the mail into the postfix mail queue. Postfix then handles delivery. Any filtering/antivirus scans you want to perform would be configured in Postfix. Since sendmail uses a different entrance path into Postfix, there are other controls that can be tuned, but you can get into that later.
Woah. They don't dumb it down do they? I am looking for simple steps to configure this file and my computer so I can use mail. The documentation isn't very clear. I would think somewhere in there I'd have to put my email address. I have a dynamic ip address so I guess I don't have a real internet hostname. The example at http://www.postfix.org/SOHO_README.html isn't very clear to me.
To configura a mail server involves following steps:
(a) Getting a domain name and the MX record for your domain on the DNS server points to the addresss of your mail server.
(b) Configure basic postfix setings (/etc/postfix/main.cf): Read the configuration file carefully. Add the following code at the end of the file
The distros do the dumbing-down, but providing installation wizards that help configure some of the basic settings.
The postfix documentation is clear and precise, but like all documentation, must make some assumptions about the existing and prerequisite knowledge of its audience. The postfix documentation assumes minimally an understanding of SMTP mail terminology and some of the protocol.
There are multiple How To recipes in existence routinely referenced by others. Find one that's suitable for your distribution's particularities.
Of course, the better solution is always to gain an understanding of the software and services you install, as installation is the cheap and easy part - maintenance, troubleshooting, and tuning are the real expenses.
With a dynamic IP, you will have some difficulties running a mail server, as a large portion of remote MTAs will not accept email from dynamic or residential IPs.
You asked if the mail command line was safe. Perhaps the more important question is "can you safely run an MTA?"