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 07-14-2009, 01:42 AM   #1
softstag
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Rep: Reputation: 0
Mail Forwarding


Hi guys

First off, I'm a n00b when it comes to Linux, so please bear with me!

I have a Debian 5 (Lenny) system set up and working, so no problems there at the moment.

I own numerous domain names, and want to be able to capture the email that is sent to them and forward it to an external email address. Initially, I don't really care what email address the mail is sent to as long as the MX record is pointing to my server, I just want it to accept it and fire it our to an external email address. It shouldn't store the mail or anything, simply relay it. It might be nice in the future to set up some rules for different addresses to go to different email addresses, but I'm not really concerned with that at the moment.

Sorry if this is a stupidly simple thing that I should be able to do without help, but Mr Google isn't helping me with this one.

Thanks in advance.
 
Old 07-14-2009, 01:12 PM   #2
softstag
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Bump!

Any help would be appreciated!
 
Old 07-14-2009, 01:15 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at
procmail
 
Old 07-14-2009, 02:20 PM   #4
elfoozo
Member
 
Registered: Feb 2004
Distribution: Debian Jessie
Posts: 257

Rep: Reputation: 32
Is the final destination your Debian 5 (Lenny) system?

If so you could change the external MX records to deliver to its (static?) IP and use the alias file to map the other names to a single account.
 
Old 07-14-2009, 10:42 PM   #5
softstag
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Original Poster
Rep: Reputation: 0
@repo:
Procmail looks like an option, I'll have a dig through the documentation. It looks quite complex at a first glance!

@elfoozo
No the final destination is not the Debian system. I want the MX records to point to it, then the Debian system will take the mail and forward it out to another email address that is completely external to this. Effectively what I'm trying to do, is do a catch-all for numerous domains and send all this mail to an external email address.
 
Old 07-15-2009, 01:01 PM   #6
elfoozo
Member
 
Registered: Feb 2004
Distribution: Debian Jessie
Posts: 257

Rep: Reputation: 32
Don't know if it's 'the best way' but you still should be able do what it sounds like you're trying to do with aliases.

Have the MX record for the domains point to your Debian system and configure Debian to accept mail for those other domains.

Edit Debian's /etc/aliases and use the user part [before @] of the email address.
remoteUser: localUser

And have a .forward in localUser's $home pointing to remoteUser@remoteSystem.com.

Last edited by elfoozo; 07-15-2009 at 01:05 PM.
 
Old 07-16-2009, 01:20 AM   #7
softstag
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by elfoozo View Post
Don't know if it's 'the best way' but you still should be able do what it sounds like you're trying to do with aliases.

Have the MX record for the domains point to your Debian system and configure Debian to accept mail for those other domains.

Edit Debian's /etc/aliases and use the user part [before @] of the email address.
remoteUser: localUser

And have a .forward in localUser's $home pointing to remoteUser@remoteSystem.com.
Thanks elfoozo. I'll give that a try, it sounds like a solution.
 
Old 07-16-2009, 07:14 AM   #8
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
It's basically the same as if you were a backup server for a domain. You might find this section of the Postfix mail server documentation useful:

http://www.postfix.org/STANDARD_CONF...ME.html#backup

Basically, you put all the domains into relay_domains and route the e-mail to the final server with transport_maps.

Robert
 
  


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
Procmail: forwarding mail to remote mail account Cadmium Linux - Software 2 01-14-2010 01:05 PM
Mail forwarding using Proc Mail swamprat Linux - Software 1 01-24-2008 04:25 PM
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 12:10 PM
mail forwarding Mig21 Linux - Server 1 12-09-2006 08:54 AM
Forwarding Mail shipon_97 Linux - Newbie 1 12-04-2006 10:41 AM


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