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 new to using Linux, but have been put in a possition to manage a system using it, with Slackware, to run the email accounts.
I attempted to add myself as a new user, and I show-up in the /home directory.
My problem is that I don't feel that I did everything correct because using outlook (POP3), I am able to send mail to everyone, but I can only receive mail back from persons in the same domain as me. All other mail is rejected because "name not recognized".
Again, I am very new to the Linux world, although I am getting a crash course (not literally, yet) in it's use.
Assuming the rejecting mail server is your sendmail server and not some other filtering server in front of it, it would seem that sendmail doesn't associate your (external) mail address with your local account on the server.
You may have to add your address to /etc/mail/virtusertable.
/etc/mail/virtusertable is a text file, and can be edited with any text editor. A Slackware distribution contains a number of these, some more newbie-hostile than others (I'm looking at you, vi). pico should do nicely, it even shows the keybord shortcuts to the most common operations at the bottom of the screen.
pico /etc/mail/virtusertable should get you started. You have to add a line containing your external mail address and your local account name, as explained here.
Exit and save with Ctrl-X (press Y and then enter to save the changes), then rebuild the virtusertable.db file with the following commands:
I am familure with the text editing. I have been using jed for that. I have been in this file in the past, and am currently in the file, but there is nothing in it that shows me the format for what the actual entry should be.
When I just put in my username, the system saves it, but doesn't "make" any changes to the db and nothing changes.
Once in the file, what is it that I need to place in the file?
Like in "aliases" I put:
username: <tab> username.domain.com
and then saved, exited and typed "make" and it updated the aliases db.
---------- Post added 05-11-12 at 11:05 AM ----------
The format of virtualusertable is explained in the wiki article I linked to. The article also says "If there is no match in the virtusertable file, sendmail checks for the full email address in the /etc/aliases file". In other words, a proper entry in /etc/mail/aliases should do the trick.
Are you sure the mails are being rejected by your server? What is the exact error message being returned?
I am sure they aren't getting through. I sent a test from my gmail and it didn't go through, and I even sent my gmail a test and it received it and when I tried to reply, it didn't work.
Here is the error message:
Delivery to the following recipient failed permanently:
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 No such user - psmtp (state 13).
----- Original message -----
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
Received: by 10.216.27.200 with SMTP id e50mr1690068wea.23.1336747085392; Fri,
11 May 2012 07:38:05 -0700 (PDT)
Received: by 10.180.105.66 with HTTP; Fri, 11 May 2012 07:38:05 -0700 (PDT)
Date: Fri, 11 May 2012 08:38:05 -0600
From: Name <firstname.lastname@example.org>
Content-Type: multipart/alternative; boundary=00504502c6572ded9304bfc3af28
It's not immediately clear from the error message above which server is producing the 550 error. If host -vt mx domain.com return the DNS name and IP address of your server, you can be reasonably certain that no other servers are involved.
Also, there's the telnet test. Telnet to your server on port 25 (telnet IP address 25), and pretend to be an SMTP-speaking mail server. Type the text in bold (and replace the values in bold and italics with something sensible):
220 servername.domain.com ESMTP Sendmail (version); Fri, 11 May 2012 (time of day)HELO anything
250 servername.domain.com Hello (name) [(IP address)], pleased to meet you
MAIL FROM: <an external mail address>
250 2.1.0 <an external mail address>... Sender ok
RCPT TO: <email@example.com>
If the server responds with "550 5.1.1 <firstname.lastname@example.org>... User unknown", then you know that something is amiss in /etc/mail/aliases. (Type QUIT to end the SMTP session.)
Does /etc/mail/aliases contain the e-mail addresses of the other users of this system? Have you tried restarting sendmail (/etc/rc.d/rc.sendmail restart on Slackware)? It shouldn't be necessary, but ...
I apologize, but I am not having any luck. Here is what I got trying to follow what you wrote:
root@server:/etc/mail# HELO anything
bash: HELO: command not fount
root@server:/etc/mail# MAIL FROM <email@example.com>
bash: syntax error near unexpected token 'newline'
root@server:/etc/mail# MAIL FROM firstname.lastname@example.org
bash: MAIL: command not found
root@server:/etc/mail#RCPT TO: email@example.com
bash: RCPT: command not found
bash: HELO: command not found
root@server:/etc/mail# cd //
root@server://# HELO anything
bash: HELO: command not found
root@server://# cd etc
root@server://etc# cd rc.d
root@server://etc/rc.d# rc.sendmail restart
bash: rc.sendmail: command not found
root@server://etc/rc.d# sendmail restart
and now it is just hung up sitting there with apparently nothing happening.
OF NOTE: One thing that is very confussing, is that everyone else seems to get email from outside the domain. It's just me...thankfully.
Additionally, I can't seem to see inside the aliases db file.
To connect to the mail server with telnet, you must use telnet to connect. If you're logged in to the server, you can connect directly to localhost with telnet localhost 25.
The .db files in /etc/mail are not human-readable. They are database files created by sendmail, and contain data from the corresponding text files: aliases.db is the database version of aliases, virtusertable.db is the database version of virtusertable and so on.
The idea is that sendmail takes the contents of the (potentially very large) text files and turns them into some sort of database to reduce the time it takes to search through the data. That's why you have to run "make" from /etc/mail whenever you make changes to any of those files. From what I can tell, the "make" bit seems to be Slackware-specific. Other distributions have a script called "newaliases" that does the same.
So, did you run make after adding your mail address and account name to /etc/mail/aliases?
Also, the command to restart sendmail is /etc/rc.d/rc.sendmail restart. You have to type the entire path.
OK, I did it correctly this time. It said, "Sender OK" and "Recipient OK".
Then I did the restart and it said:
Starting sendmail MTA daemon: user/sbin.....
Starting sendmail MSP queue runner: user/sbin.....
But I tried sending an email from gmail again and it still didn't work.
Oh, yes I did run "make" and it said "nothing to be done for 'all'.
"Recipient OK" is not what I would have expected, as it means that sendmail is happy to receive mail to your address. Though it could be that sendmail interprets your address as non-local, and permits relaying from localhost. Can you run the test from another system?
When you tried to send from GMail, does an error message appear in /var/log/maillog? Try running tail -f /var/log/maillog, then send a new message from Gmail. You should see the error message appear in the log in real time (Ctrl-C aborts).
I did as you stated, correctly this time, and at MAIL FROM: my.gmail it said "sender ok" and at RCPT TO: firstname.lastname@example.org it said "recipient ok".
Then I did the full restart you stated and it said:
Starting sendmail MTA daemon: user/sbin....
Starting sendmail MSP queue runner: user/sbin....
Then I went to etc/mail/# make
and it said "make: nothing to be done for 'all'
but when I tried to send another email from gmail, it didn't work...again.