> -----Original Message-----
> From: owner-postfix-us...@postfix.org [mailto:owner-postfix-
> us...@postfix.org] On Behalf Of Victor Duchovni
> Sent: 24 March 2010 20:02
> To: postfix-users@postfix.org
> Subject: Re: Forward local mailbox to relayhost
> 
> On Wed, Mar 24, 2010 at 04:51:33PM +0200, Isak Badenhorst wrote:
> 
> > I have asked before with no sucess and want ask again because I have
> spent
> > quite a few days now searching for the answer with no luck.  Maybe I
> am just
> > not reading well enough but I cannot find my answer.
> >
> > I have just moved from sendmail and have this one problem.  I have a
> local
> > server in the office with mail to anyu...@domain.com delivered
> locally using
> > mysql virtual mailboxes.  I also use fetchmail to get mail from my
> ISP for
> > these mailboxes and everything just works perfect.  My problem is
> that I
> > have two users, us...@domain.com and us...@domain.com that I do not
> want to
> > deliver local but use the relayhost to deliver to the ISP because
> this users
> > use laptops and need to download their mail directly from the ISP
> server.
> > These users does not have a virtual local account.  I have tried
> transport
> > maps but it seems that is not the correct way to do it.  Can anyone
> please
> > point me in the right direction or is this not possible?
> 
> Your description of the environment is too sketchy for a precise
> response
> that tells you exactly what to do. All the relevant tools are described
> in http://www.postfix.org/ADDRESS_REWRITING_README.html
> 
> The key mechanisms (in the order in which are processed) are:
> 
>     virtual_alias_maps        - recursively rewrites recipient addresses
(in
> any
>                         domain) that have an entry in the specified
tables.
> 
>     transport_maps    - selects a transport:next for a domain or
> recipient
> 
>     smtp_generic_maps - rewrites envelope and header addresses of
> mail
>                         that is delivered via the smtp(8) transport
>                         during delivery, so the transport and nexthop
>                         are not changed by this rewriting
> 
> You can combine virtual rewriting, transport selection and generic
> rewriting in many ways to support a large variety of mail routing
> scenarios.
> 
> --
>       Viktor.
> 
> P.S. Morgan Stanley is looking for a New York City based, Senior Unix
> system/email administrator to architect and sustain our perimeter email
> environment.  If you are interested, please drop me a note.

Ok, let me try to be more clear.  I have a small office with about 10
workstations.  We use a DSL connection with a router. Our domain, domain.com
is hosted by our ISP.  We use the smtp server of the DSL provider as
relayhost.  I have setup a server with postfix, dovecot and mysql, the
server will retrieve all external mail from our ISP for domain.com by using
fetchmail.  When one of the users in the office sent mail to another user in
the office the mail get delivered directly to the virtual mailbox.  Any mail
sent from outside the office first go to the ISP because that is where the
MX points for domain.com and fetchmail will then retreive this mail and
deliver to the local server.  The workstation in the office will then
retrieve their mail from the local server.  The purpose is to save on
bandwidth and prevent mail that is sent between the users in the office to
go out over the DSL line.  Now we have added two persons who uses laptops
and is in other cities using other forms of internet connection and need to
download their mail from the ISP.  Now the first part for external mail sent
to these two users from other addresses is easy because I just left their
details of fetchmail and their mail stays on the ISP server abd they get it
from there.  The problem lies with the persons in the office, if they sent
to us...@domain.com or us...@domain.com which is the two external users the
local server tries to deliver that mail locally en do not forward it to the
relayhost.  What I try to achieve is to forward all addresses not in the
virtual aliases or virtual mailbox maps to the relayhost or either specify
the addresses to forward to the relayhost.  The problem is that the domain,
domain.com is the same for those two addresses to deliver external and the
addresses to deliver internal.

Hopefully this a bit clearer on what I would like to achieve.

Thanks

Reply via email to