Click to See Complete Forum and Search --> : Exim mail forward to local network?


root.veg
12-11-2003, 07:25 AM
I'm running an Exim mail-server on my network at home, which I'm using to run a mailing list so me and my friends can keep in touch (take that, yahoogroups!). The basics work OK:

I have one firewall/router machine with one static IP, and it port-forwards all smtp requests to the mailserver, which sits on my private network. I've set up a simple entry in /etc/aliases so that any mail to mylist@mydomain.com gets forwarded to all the individual addresses just fine.

Now, all I want to do is to include a local address in that alias (ie forward mail from the mailserver to me@mybox on my local network). I thought I could do this, as my private network is set up simply using static IPs and /etc/hosts files. In other words, all machines on my private network know what the IP address for 'mybox' is despite it not being fully-qualified. But it doesn't work.

Does anyone know what the magic configuration setting is in exim.conf so that I can do this without breaking my wonderful mailing list? I have searched, but don't really know what to look for.

To summarise, I would like to forward mail to

mylist@mydomain.com

to

user1@elsewhere.com
user2@a.n.other.com

on the net, and

me@mybox

on my local network.

Hayl
12-11-2003, 07:55 AM
is mybox the same box that Exim is running on?

Hayl
12-11-2003, 08:23 AM
hmmm... noi answer yet...

ok, well the reason i was asking is that if "mybox" is not the/a mail server, then how do you expect the mail to get to it?

your linux box will have to be running an mta in order to receive mail from your mail server.

or - the better solution is to have a centralized mail server - which is what it sounds like you have already - but you will need a mechanism to download your mail or access it via IMAP this way. at this point, it is likely to be easier to use fetchmail to grab all your mail off of your ISP's server as well and store that on your own mail server.

root.veg
12-11-2003, 09:41 AM
the better solution is to have a centralized mail server - which is what it sounds like you have already - but you will need a mechanism to download your mail or access it via IMAP this way. at this point, it is likely to be easier to use fetchmail to grab all your mail off of your ISP's server as well and store that on your own mail server.

Ah, I see - that makes a great deal of sense.

What I have is three boxes: firewall, mailserver, mybox. All three running Debian and exim. mailserver and mybox have had their exim.conf files changed (after you helped me out - thanks :) ) so that I can send mail out of my network with my domain name attached. Then I set up incoming mail to my domain so it goes to mailserver (as I described above).

For my personal e-mail, I still use fetchmail on mybox, connecting to my ISP's mailserver. As you can tell, I haven't had the confidence to rely on my own centralised mailserver just yet :)

However, the original question still remains, I think, because I need to send mail from mybox to mailserver on the local network, so that mailserver can forward it out. Isn't that right?

Hayl
12-11-2003, 09:54 AM
you can send your mail to any smtp box on your network that will relay mail on your internal network and have that box relay the mail to your isp - who will gladly accept it as long as the sender is one of their accounts :) it will appear to them that you are just sending it normally. all SMTP boxes are just relayers - they accept mail, resolve the destination hosts, and send the mail directly.

i have the following setup here at home:

ISP --- LinkSys Router --- Internal network

On my internal network I have 2 workstations (gentoo and a windows box) and 1 server (debian) box.

the debian server is doing all my mail processing for me, using 2 MTAs. I use 2 Exim (MTA) processes to allow it to scan all my mail for viruses. I have Fetchmail grabbing mail for 2 people through PopFile (PopFile is a SPAM classifier tool) - it then gets delivered via the Exim processes. we use IMAP to view our mail - this way our mail is kept centrally and is backed up to tape weekly when i run the backups. using this set-up it is also really easy to set up SquirrelMail so that when you are not at home, you can access your complete IMAP mailbox and send mail via a web interface.

let me know if you need any detailed help setting anything up if you decide to try to do a full mail server, need exim config files, etc.

root.veg
12-11-2003, 11:04 AM
I love this forum. Thanks, mate :)