LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-02-2004, 02:52 PM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
Help with IMAP server setup


Let me precursor this by saying I've been using Linux for about a month now, and am just about as newbie as it gets. I'm also an MCSE, which probably makes it worse.

Anyhow, I have a box that I'm trying to get a basic IMAP server running on. Basically all I need to do is to be able to send email to myself using Evolution.

Here's what I can tell you:

The server is running DNS and xinetd. mail.myserver.gov is listed in dns, and a 'host mail.myserver.gov' gives me back the correct IP.

I'm logged in as root.

In the GUI, xinetd and imap are checked and RH says they're started. In xterm, a ps -ax | grep xinetd brings me back xinetd running with a PID, but the same search for imap(anything) gives me nothing.

I setup Evolution with an email address of root@mail.myserver.gov, IMAP, server mail.myserver.gov. It *seems* that the server is responding and asking me for a password, but the root password doesn't take.

I have the feeling that IMAP isn't running, but I'm not really sure where to configure/start it. I assume it should have a PID if it is, correct?

If all I need is xinetd running, my question then is how do I configure mail accounts on the server? I have the Sams "RH9 Unleashed" book that I'm pouring over, but it focuses more on client and sendmail configuration than server side. (Actually, it says "Redhat has configured it for you".

I've RTFM'd, I've googled, I've cursed and pouted, but I still can't get this thing to send/recieve email. It doesn't need client connections right now - just to be able to email itself using IMAP within Evolution, preferably logged in as root.

So the questions:

- How do I get IMAP to run if it isn't?
- How do I add/config/set passwords for user accounts if all I need is xinetd?
- Am I missing some packages? (I did a complete apt-get update on the machine already)

I apologise if this is vague, I'm a Windows geek trying to make the switch, so if I'm asking the wrong questions or not giving the right information, that's why.

Thanks very much for any insight you may take the time to give me. I work for the Department of Defense, and this server is for the FBI. So as you can imagine, I'm pretty anxious to get it working and off my desk and into the "completed" list.
 
Old 01-02-2004, 02:56 PM   #2
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Test to see if IMAP is running like this:

telnet localhost 143

OH, for the FBI? I suggest in the future you don't give that type of information out. I doubt your bosses would approve, true or not.

Good luck,
 
Old 01-02-2004, 03:21 PM   #3
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Heh, don't worry about the info, it's just a pilot box at the moment anyways, and not slated to see the light of day for quite some time.

Anyhow - I can telnet to 143, it connects and throws me back an IMAP-esque string.

---
* OK [ CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] localhost.localdomain IMAP4rev1 2001.315rh
----

THanks for the quick response, btw. I swear I'm paying penance for being a GUI-chained Windows guy for so long.
 
Old 01-02-2004, 03:27 PM   #4
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Well now you know it works. Usually Linux Distros have root email forwarded to another user. Look for a file called .forward in root's home directory (/root/.forward). Do this:

cat /root/.forward

and see what it contains. The username listed is who gets root's email. Try making a new mail-account in Evolution with THAT user.

Since its running FROM xinetd, there's not a daemon waiting. When somebody connects IMAP does its magic.

Also, when you want to do a ps aux and grep for something, but not get your grepping FOR this item returned to standard out (the screen) do this:

ps aux | grep [s]omething

...where you put the first letter in brackets. That way you don't get two lines: the one you are grepping for and the grep process itself.

HTH
 
Old 01-02-2004, 03:32 PM   #5
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Ok, I created another user, logged in as him, brought up Evolution.

I don't get any connect errors, nor am I asked to auth at all. (Which is rather odd).

If I send mail to nobody@nonexistantdomain.com, mail goes right out. Same if I send to myself@mymailserver.gov.

Thing is, nothing comes back.

With the new guy logged in, evolution up, a ps -ax |grep xin brings back:

xinetd -stayalive -pidfile (whatever)
/usr/bin/ssh-agent /etc/X11/xinit/Xclients

So it seems that I'm connecting, and since Telnet is able to connect, IMAP is listening.

I guess all I need to figure out now is why my mail that I send to myself doesn't spool through and come back to me.

Again thanks so much for taking the time to help me out.

Edit:

If I do a /tail on maillog, I get a "connection refused by mail.myserverthathatesme.gov". So SMTP is spooling it up, just not liking my user.

Last edited by Seventh; 01-02-2004 at 03:33 PM.
 
Old 01-02-2004, 03:40 PM   #6
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
If in the command line only do ctrl-alt-F2 and go to a new console. Login as root. cd /var/log/ and then cd into the dir that holds your mail logs (I'm not sure on RH).

tail -f /path/to/log

This lets you actively watch the log.

Now, be certain that the user can receive mail locally first.

echo "this is a test" | mail -s "test" nameofuser

Do that above from the command line. Watch the log. The user should receive this mail.

What IMAP server are you running?

You could also tell Evolution to use localhost for the server name and try again with a new user.

Usually when I set up IMAP machines, I like to check from OUTSIDE of the box itself, since I'll rarely be on the machine itself. Just use another box in the office. Heck you might as well test it with Outlook to be certain it will work for end-users.

You may have some utilities to look at the mailspool also. I use the command mailq to do this.
 
Old 01-02-2004, 03:44 PM   #7
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Progress.

Did the command line send, the log appended with a stat=sent line.

Logged back into Evolution, Send/Recieve, and got the message. (hooray)

Am I formatting my email address wrong in Evo perhaps? Or just being a noob and not configging the client correctly?
 
Old 01-02-2004, 03:48 PM   #8
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Yep, I had the hostname configured incorrectly in the client.

Clearly I'm going to tell myself that it's because "I'm an engineer and I overlook the simple things and make problems more complicated".

*The rest of you can just call me a noob.

Thanks so very much guys. Hopefully I'll be able to contribute around here sooner than later, instead of pestering you all with stuff like this.

/Cheers.
 
Old 01-02-2004, 03:54 PM   #9
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
Ok, one last question.

I'm in /root/, and there's no files at all in here. Any particular syntax needed for .forward so that I can get his email sent off to the right place?

Edit:

Did a mail -s from console, sending to root.

I get a "savemail: cannot save rejected mail anywhere" error in /maillog

Last edited by Seventh; 01-02-2004 at 03:57 PM.
 
Old 01-02-2004, 04:02 PM   #10
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
No special format, just one line with the username. You can even redirect to a totally different me@somewhereelse.com address.

Any user can do this also to forward their mail.
 
  


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
Fault tolerant IMAP server setup mikenac Linux - Software 2 02-27-2005 11:52 AM
POP/IMAP Only Mail Server Setup? bardanes Linux - Software 3 10-23-2004 06:05 PM
courier imap setup atomicx Linux - Newbie 0 12-18-2003 12:07 AM
try to setup imap atomicx Linux - General 9 10-30-2003 02:47 PM
email server setup (IMAP/SMTP) xaxol Linux - Networking 25 10-04-2003 03:33 AM


All times are GMT -5. The time now is 09:10 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