using isp domain as a virtual address for specific users

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

using isp domain as a virtual address for specific users

Hugh Bragg
I'm treating the email addresses my isp has given me as virtual addresses.

I also have $mydestination $virtual_mailbox_domains.

Eg: Presently, when a local machine wants to send mail [hidden email]
to [hidden email], the mail is sent to the $relayhost.

This scenario is good when [hidden email] is not one of my addresses.

However if [hidden email] is also one of my addresses, I want the mail
to be delivered by the same dovecot lda that is used for my
$virtual_mailbox_domains.

This reduces load on both our systems and stops internal mails leaking
unnecessarily.

If an email address is not in $mydestination or
$virtual_mailbox_domains, I'm trying to get postfix to attempt lookup of
the user from a file or sql and if it's found then it use the lda,
otherwise use $relayhost.


Is there a way to accomplish this setup?


Hugh

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: using isp domain as a virtual address for specific users

Noel Jones-2
On 6/7/2017 6:36 AM, Hugh Bragg wrote:

> I'm treating the email addresses my isp has given me as virtual
> addresses.
>
> I also have $mydestination $virtual_mailbox_domains.
>
> Eg: Presently, when a local machine wants to send mail
> [hidden email] to [hidden email], the mail is sent to the $relayhost.
>
> This scenario is good when [hidden email] is not one of my addresses.
>
> However if [hidden email] is also one of my addresses, I want the
> mail to be delivered by the same dovecot lda that is used for my
> $virtual_mailbox_domains.
>
> This reduces load on both our systems and stops internal mails
> leaking unnecessarily.
>
> If an email address is not in $mydestination or
> $virtual_mailbox_domains, I'm trying to get postfix to attempt
> lookup of the user from a file or sql and if it's found then it use
> the lda, otherwise use $relayhost.
>
>
> Is there a way to accomplish this setup?


Use transport_maps to tell postfix where to deliver a specific
address, or to override the default delivery destination for a
specific address



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: using isp domain as a virtual address for specific users

Hugh Bragg


On 08/06/17 02:23, Noel Jones wrote:

> On 6/7/2017 6:36 AM, Hugh Bragg wrote:
>> I'm treating the email addresses my isp has given me as virtual
>> addresses.
>>
>> I also have $mydestination $virtual_mailbox_domains.
>>
>> Eg: Presently, when a local machine wants to send mail
>> [hidden email] to [hidden email], the mail is sent to the $relayhost.
>>
>> This scenario is good when [hidden email] is not one of my addresses.
>>
>> However if [hidden email] is also one of my addresses, I want the
>> mail to be delivered by the same dovecot lda that is used for my
>> $virtual_mailbox_domains.
>>
>> This reduces load on both our systems and stops internal mails
>> leaking unnecessarily.
>>
>> If an email address is not in $mydestination or
>> $virtual_mailbox_domains, I'm trying to get postfix to attempt
>> lookup of the user from a file or sql and if it's found then it use
>> the lda, otherwise use $relayhost.
>>
>>
>> Is there a way to accomplish this setup?
>
> Use transport_maps to tell postfix where to deliver a specific
> address, or to override the default delivery destination for a
> specific address
>
>
>
Thanks,

I tried adding
[hidden email] lda
to /etc/postfix/transport and running
postmap /etc/postfix/transport
but mail still goes out the relay.
Could you please explain how to configure it? The documentation is
obscure about this and I have no experience.

Hugh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: using isp domain as a virtual address for specific users

Noel Jones-2
On 6/7/2017 11:48 AM, Hugh Bragg wrote:

> I tried adding
> [hidden email] lda
> to /etc/postfix/transport and running
> postmap /etc/postfix/transport
> but mail still goes out the relay.
> Could you please explain how to configure it? The documentation is
> obscure about this and I have no experience.
>
> Hugh

The syntax for a transport_maps entry is

address   transport:nexthop

Where "transport" is an entry in master.cf, and "nexthop" is the
destination if the transport requires it.  The ":" is required.

http://www.postfix.org/transport.5.html

Assuming "lda" is the dovecot delivery program defined in master.cf,
you probably need:
[hidden email] lda:




  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: using isp domain as a virtual address for specific users

Hugh Bragg


On 08/06/17 03:25, Noel Jones wrote:

> On 6/7/2017 11:48 AM, Hugh Bragg wrote:
>
>> I tried adding
>> [hidden email] lda
>> to /etc/postfix/transport and running
>> postmap /etc/postfix/transport
>> but mail still goes out the relay.
>> Could you please explain how to configure it? The documentation is
>> obscure about this and I have no experience.
>>
>> Hugh
> The syntax for a transport_maps entry is
>
> address   transport:nexthop
>
> Where "transport" is an entry in master.cf, and "nexthop" is the
> destination if the transport requires it.  The ":" is required.
>
> http://www.postfix.org/transport.5.html
>
> Assuming "lda" is the dovecot delivery program defined in master.cf,
> you probably need:
> [hidden email] lda:
>
>
>
>
>    -- Noel Jones
>
Nice, thanks again,

I added
transport_maps = hash:/etc/postfix/transport
to main.cf and and used the existing dovecot pipe from master.cf as the
transport then it worked

Hugh
Loading...