LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-11-2012, 11:18 AM   #1
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Rep: Reputation: Disabled
Adding new user and getting sendmail to work


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.
 
Old 05-11-2012, 11:32 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,403

Rep: Reputation: Disabled
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.
 
Old 05-11-2012, 11:34 AM   #3
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Ser Olmy,

I know that this will prove that I am really a rookie at this, but I have tried to do that but don't know the code for doing such.
 
Old 05-11-2012, 11:47 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,403

Rep: Reputation: Disabled
/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:
Code:
cd /etc/mail
make
 
Old 05-11-2012, 12:04 PM   #5
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
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 ----------

that one line should have been:
username: <tab> username@domain.com
 
Old 05-11-2012, 12:09 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,403

Rep: Reputation: Disabled
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?
 
Old 05-11-2012, 12:18 PM   #7
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
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:

michaelc@domain.com

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;
d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=xVJQEBX7wkg6sHwyIIzVUE3vyHM7kPITlRoPXGVBHjY=;
b=Gn0hLL/R0a1A5TQhfhRgnspPnZP9c9S7ZD7PXsJpLZqcgDp++gigCgdSM5+uvzlayv
N8/MNNxMOz6SfSWk5YgMj2LbJT76lI+7+gaSmanQ1bMZ9lfVP6po5qESDg4cbluRjvgQ
2PByjz7+5U2cXihZ/E1dbFuAS6iFfQXe2hVYKgzWlA7rDeX/7TXldPWHn7PLEh9ML9eu
MRq+FKlZ6WuSlzWXuKIh4i6Jr9FScgt9yZyW89XctMhbbPahfmDzzQ606ZgrclNOAhPS
dBFyTl7zCePgp/F8xCOP7H2bDZYoGcWtg5+T0MXLZouxVlnKX7YpjL9ql8n5vRBHvKzF
PPtQ==
MIME-Version: 1.0
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
Message-ID: <CAJKotTHc5qLrEJ2t5EQyOgHUoaPpp_=Hsf29RUHHf1i64dyvyg@mail.gmail.com>
Subject: Test
From: Name <username@gmail.com>
To: michaelc@domain.com
Content-Type: multipart/alternative; boundary=00504502c6572ded9304bfc3af28
 
Old 05-11-2012, 12:42 PM   #8
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,403

Rep: Reputation: Disabled
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):

Code:
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: <michaelc@domain.com>
If the server responds with "550 5.1.1 <michaelc@domain.com>... 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 ...
 
Old 05-11-2012, 01:24 PM   #9
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Ser Olmy,

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 <1sgmike@gmail.com>
bash: syntax error near unexpected token 'newline'
root@server:/etc/mail# MAIL FROM 1sgmike@gmail.com
bash: MAIL: command not found
root@server:/etc/mail#RCPT TO: michaelc@domain.com
bash: RCPT: command not found
root@server:/etc/mail# HELO
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.
 
Old 05-11-2012, 01:34 PM   #10
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,403

Rep: Reputation: Disabled
You didn't actually follow what I wrote.

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.
 
Old 05-11-2012, 01:59 PM   #11
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
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'.
 
Old 05-11-2012, 02:04 PM   #12
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,403

Rep: Reputation: Disabled
"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).
 
Old 05-11-2012, 02:16 PM   #13
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
I did as you stated, correctly this time, and at MAIL FROM: my.gmail it said "sender ok" and at RCPT TO: michaelc@domain.com 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.
 
Old 05-11-2012, 02:31 PM   #14
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
I did it twice and got:

May 11 12:19:34 romulus popper [27039]: (v4.0.5) POP login by user "michaelc" at (192.168.**.**) 192.168.**.***

Same thing both times.
 
Old 05-11-2012, 02:36 PM   #15
now4mike
LQ Newbie
 
Registered: May 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
I have another one for you...
While in the maillog, I noticed a lot of errors occuring because the calendar has a typo in the domain name. How would I go about correcting that?
 
  


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
Sendmail with apache user does not work DarkAge Linux - General 2 09-13-2011 09:58 AM
[SOLVED] Adding a new user to Solaris 9 so that this user can ssh into the server rcforster Solaris / OpenSolaris 2 03-14-2011 07:10 AM
[SOLVED] How do I get rtsp:// in firefox to work? (adding entries in :config does not work) Olaus Slackware 13 02-04-2010 09:56 AM
Adding a user in squirrelmail with sendmail mithras Linux - Software 1 08-14-2003 08:22 PM
help again - adding user and sendmail Tigger Linux - Newbie 1 06-25-2003 04:13 AM


All times are GMT -5. The time now is 08:40 PM.

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