Share your knowledge at the LQ Wiki.
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 03-18-2005, 06:26 AM   #1
LQ Newbie
Registered: Feb 2004
Posts: 19

Rep: Reputation: 0
Postfix - relay mail to internet for specified users

A company network has one catch-all mailbox at their ISP, and 3-4 more mailboxes for users who work remotely. The catch-all mailbox is being collected by fetchmail and delivered by Postfix to the correct user from the /etc/mail/aliases file. Let's say for this example that the domain is, and that one of the remote users has an address However this remote user has been set up as a user on the server as he sometimes visits the office and needs to access files on the server.

At the moment this is a problem, as any mail sent to him from within the company network is being sent via the server, which then recognises it as a local domain and doesn't relay it to the ISP's SMTP server, it just puts it into his server mailbox. Is there a way, using Postfix, that you can specify that mail for given users is to be treated as non-local and sent to the ISP rather than the local mailbox?
Old 03-19-2005, 12:57 AM   #2
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
So, if I understand you correctly:

Mail originating outside the company network and addressed to gets stored on the ISP's server, while mail originating within the company network addressed to the same gets stored on the local (company) server.

If so, then something like this should work (I think):

In, set transport_maps:
 transport_maps = hash:/etc/postfix/transport
Add this line to /etc/postfix/transport:
where is the name of your ISP's smtp server.

Make the transport database:
 # postmap /etc/postfix/transport

Last edited by Berhanie; 03-19-2005 at 09:22 AM.
Old 03-21-2005, 03:32 AM   #3
LQ Newbie
Registered: Feb 2004
Posts: 19

Original Poster
Rep: Reputation: 0
Yes that's exactly what I want to do. I'll test this out. Thanks for your help.


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 - disallow some users to send internet mail dtournas Linux - Software 2 08-21-2009 08:10 PM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
Postfix, Bugzilla, and mail relay llamaindustries Linux - Software 0 02-07-2005 06:49 PM
mail relay/proxy with postfix waskelton4 Linux - Software 2 09-07-2004 11:33 AM
PostFix Mail Relay... CRCool75 Linux - Networking 4 08-20-2004 04:07 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:10 PM.

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