-   Linux - Software (
-   -   Postfix - relay mail to internet for specified users (

FatOldSun 03-18-2005 06:26 AM

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?

Berhanie 03-19-2005 12:57 AM

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

FatOldSun 03-21-2005 03:32 AM

Yes that's exactly what I want to do. I'll test this out. Thanks for your help.

All times are GMT -5. The time now is 02:08 PM.