Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-04-2006, 10:00 PM   #1
LQ Newbie
Registered: Apr 2005
Distribution: Debian Sarge
Posts: 16

Rep: Reputation: 0
Postfix: Need to deliver all local mail to 1 account, then forward

Hey All,

I have a 3rd party mail server installed on my system, but unfortunately at this point it does not handle local mail properly. It has it's own sendmail binary, but in it's current state it does not accept regular sendmail options, and therefore local mail, such as cron output is not delivered correctly.

I currently have postfix installed, but disabled. What I'd like to do is have all local forwarded to the other mail server that is installed. Any idea how I can accomplish this?

If any postfix guru's are around and can solve this problem, can you provide what configurations I would need to make to postfix in order to accomplis this?

Old 01-04-2006, 10:30 PM   #2
LQ Newbie
Registered: Jul 2001
Posts: 19

Rep: Reputation: 0
postfix has an option called a luser_relay. You should be able to find this description in the /etc/postfix/

# The luser_relay parameter specifies an optional destination address
# for unknown recipients.  By default, mail for unknown local recipients
# is bounced.
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
# luser_relay works only for the default Postfix local delivery agent.
#luser_relay = $
#luser_relay = $
#luser_relay = admin+$local

luser_relay =

This means that ALL mail that would have bounced now forwards to

If you have any local accounts dont forget to use the /etc/aliases file to forward local mail (such as root) on to that email address as well. I'm not exactly sure if this is what your asking but I hope it helps.

example /etc/aliases:

root: localuser


Old 01-05-2006, 08:24 AM   #3
LQ Newbie
Registered: Apr 2005
Distribution: Debian Sarge
Posts: 16

Original Poster
Rep: Reputation: 0
OK cool, yeah that looks like it will take care of collecting all of the mail. Now how do I have it delivered to my other mail server application that is running on the same server? I assume I need to send it through SMTP? I've read a few post that mentions something about forwarding to a "smart host"?

Or if I setup the luser_relay variable to an external email address that exists on the other mail server, it will automatically deliver to that mail server?
Old 01-05-2006, 04:49 PM   #4
LQ Newbie
Registered: Apr 2005
Distribution: Debian Sarge
Posts: 16

Original Poster
Rep: Reputation: 0
Nevermind, I answered my own question by testing this. Thank you very much for the reply, now I get my cron output again, yeah


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
Postfix forward all inbound mail to another server bourbon_beast Linux - Software 2 06-28-2005 04:48 AM
Forward All Postfix messages and deliver them dlublink Linux - Networking 1 12-27-2004 10:34 PM
POSTFIX holding mail in qeue, won't deliver, connection refused bentman78 Linux - Software 2 10-27-2004 07:11 AM
mail to local user using Postfix hct224 Linux - Newbie 0 03-16-2004 08:08 PM
Postfix - Don't masquerade Local only Outgoing mail... Help please... Vince0000 Linux - General 2 11-27-2003 09:08 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration