LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-18-2005, 06:26 AM   #1
FatOldSun
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 example.co.uk, and that one of the remote users has an address remoteuser1@example.co.uk. 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
Berhanie
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 remoteuser1@example.co.uk 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 main.cf, set transport_maps:
Code:
 transport_maps = hash:/etc/postfix/transport
Add this line to /etc/postfix/transport:
Code:
 remoteuser1@example.co.uk       smtp:smtp.isp.com
where smtp.isp.com is the name of your ISP's smtp server.

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

Last edited by Berhanie; 03-19-2005 at 09:22 AM.
 
Old 03-21-2005, 03:32 AM   #3
FatOldSun
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.
 
  


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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