LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-25-2007, 11:30 AM   #1
spot101
LQ Newbie
 
Registered: Feb 2004
Distribution: Kubuntu 7.04 Debian Etch
Posts: 5

Rep: Reputation: 0
Question root system mail to imap server


How can I get email from the system (log messages etc) or other software that might generate email to my IMAP server?

I would like to consider this in a small LAN with 2 servers and a few work stations. One server running the IMAP server (BOB) the other file and print services (TOM) for example. How would I get mail for root etc on BOB into the IMAP server? How would I get mail for root etc on TOM into the IMAP server on BOB?

Any pointers on where I should start looking into this much appreciated.

Thanks,
Spot101.
 
Old 10-25-2007, 02:15 PM   #2
bjagee
Member
 
Registered: Jan 2007
Location: Portland, OR
Distribution: Ubuntu Jaunty / Fedora
Posts: 39

Rep: Reputation: 15
Two questions:

1) Which MTA are you using?
2) Do you have a personal account that you check on the imap server?

Common practice is to alias root to a human account on the same machine; that will just forward it into your mailbox with everything else.
 
Old 10-25-2007, 02:27 PM   #3
gerben12
LQ Newbie
 
Registered: Oct 2007
Distribution: SuSE, Redhat, Debian
Posts: 25

Rep: Reputation: 15
Hello,

It's indeed depening on your MTA,

but try a
.forward

in your root's homedir.
In .forward you put the mail address you want to send it to.

Or edit /etc/aliases and edit the line that says:

root: me@tom.local.com
Of course change the address to the one you want.

After that run
newaliases
to make the change effective.
Then also the root mail will be sent to TOM-server
 
Old 10-26-2007, 12:20 PM   #4
spot101
LQ Newbie
 
Registered: Feb 2004
Distribution: Kubuntu 7.04 Debian Etch
Posts: 5

Original Poster
Rep: Reputation: 0
mbox to maildir?

Thank you both for you prompt replies.

This is my first time setting up anything like this and I obviously have a lot to learn.

A quick look at /etc/aliases showed that root was aliased to my user account on BOB the imap server. I sent root a quick message using:
Code:
$ mail root
from the CL. Typing "mail" again confirmed a new message to root from my user account. Quiting this the message,
Code:
Saved 1 message in /home/myuser/mbox
appaeared. Cool! I though but how did it get there?
Looking at the mbox file showed that Exim was installed and was doing it's thing. The Debian installer must have installed Exim as part of the server install. So my MTA is Exim!
The IMAP server is Dovecot and is using maildir. /home/myuser/maildir/

How can I set up Exim to send mail there rather than the mbox file?

Up until now I haven't needed an MTA. I have done this:
Receive- getmail > dovecot > client on work station.
Send- client on work station > ISP's SMTP server.

There isn't an exim.conf file in /etc/exim4/ There are loads of config files in /etc/exim4/conf.d/ Where should I look to make the needed changes?

Thanks,
Spot101.
 
Old 10-26-2007, 01:29 PM   #5
spot101
LQ Newbie
 
Registered: Feb 2004
Distribution: Kubuntu 7.04 Debian Etch
Posts: 5

Original Poster
Rep: Reputation: 0
Making Progress

I found this page that helped solve the mbox to maildir problem.
http://edseek.com/~jasonb/articles/e...ier/exim4.html
I needed to make a change in /etc/exim4/update-exim4.conf.conf
I changed: dc_localdelivery=`mail_spool` to dc_localdelivery=`maildir_home`

The next question is how to get mail for root etc on TOM the file & printer server into the IMAP server on BOB?

Would I have an MTA on TOM point to the MTA on BOB?

Much Thanks,
Spot101.
 
Old 10-27-2007, 06:01 AM   #6
gerben12
LQ Newbie
 
Registered: Oct 2007
Distribution: SuSE, Redhat, Debian
Posts: 25

Rep: Reputation: 15
Have you edited /etc/aliases ans run newaliases?
That's the easiestt way to forward root's mail.
If you dont redirect the address, all mail will only be recieved on the local box.

I personally dont have that much experience with exim, but it should work the same.

try as a test: mail -s "test" root@imapserver < /etc/hosts

From what I remeber of exim, it wants to have an outgoing/relaying mail server. It is "somewhere" in exim.conf, but I cant remeber where
 
Old 10-28-2007, 11:06 AM   #7
spot101
LQ Newbie
 
Registered: Feb 2004
Distribution: Kubuntu 7.04 Debian Etch
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you very much for your help. I think I understand how it works a little better now.
I remember something about relaying mail in the exim FAQ but their WIKI seems to be down at the moment.

Getting a little busy right now it might be a week or so before I can set the rest of this up.

Cheers,
Spot101.

This would be a good place to look for anyone setting up a new system.
http://www.exim-new-users.co.uk

Last edited by spot101; 10-28-2007 at 11:10 AM. Reason: Addition
 
  


Reply



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
IMAP Server (Mail Deletion) steve007 Linux - Newbie 1 08-03-2005 09:12 PM
Virtually moving IMAP Folders from mail/ to root level fishsponge Linux - Software 0 06-21-2005 04:53 AM
Mail, POP, IMAP server !! bpandey Linux - Networking 1 09-06-2004 01:09 PM
Which Imap mail-server? dnla Linux - Software 0 11-16-2003 10:39 AM
Imap Mail Server taggedd Linux - Networking 1 10-28-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:04 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
Open Source Consulting | Domain Registration