Re: Disable Dovecot LDA

2020-04-02 Thread Remko Lodder
If both postfix’ in your example are the same server, then that’s not possible 
indeed.
Consider it has one brain, so it has to decide: Do I know this domain or do I 
need to
send it upstream (either to the MX of the target domain, or to a configured 
relay).

In case it’s a domain postfix hosts, a delivery attempt will be made directly 
via LMTP/LDA.
It does not go out (since it’s known local). 

In case the domain is not hosted locally, it will be forwarded to a relay, and 
that has to decide
where to send it next. If your machine is the best known option for the target 
domain, then it
will be send there. But if that is the same postfix server, that’s an issue: 
because the domain is
not known locally ,and thus it should be rejected. Message = lost.

In case you have 2 postfix instances, where A is on the top side of your image, 
then it can be configured
to route all email to relay, and that has a configuration that send’s it to 
instance B (the bottom); that can have
configuration that treats the target domain as local, and thus starts an 
delivery attempt to LMTP/LDA.

Does that help a bit?

Cheers
Remko

> On 2 Apr 2020, at 21:29, Adam Raszkiewicz  wrote:
> 
> So there is no way to skip Postfix for incoming messages and go directly to 
> LMTP/LDA but I need two instances of Postfix in that case?
> 
> Regarding your second question - it is required to be complaint with Direct 
> Trust. 
> 
> Thanks,
> Adam
> 
> On 4/2/20, 3:07 PM, "dovecot on behalf of Juri Haberland" 
>  wrote:
> 
>On 02/04/2020 15:18, Adam Raszkiewicz wrote:
>> Desired flow looks like:
>> 
>> Dovecot -> Postfix --> Relay Server -┐
>> Dovecot <-- LMTP/LDA <-- Postfix <-┘
> 
>This mail flow cannot work with one Postfix instance. Either Postfix
>knows that "localdomain.com" is local and should be delivered to the
>LDA, in which case it won't be forwarded to the relay server, or Postfix
>does not know that "localdomain.com" is a local address and therefor
>forwards it the relay server, but than it will do that anytime it sees
>"localdomain.com".
> 
>Only possibility is to run two instances of Postfix.
> 
>The real question is:
>Why do you want this mail flow? Where is the benefit in sending a local
>mail out to a relay server only to get it back and deliver it?
> 
> 
>Cheers,
>  Juri
> 
> 



Re: Disable Dovecot LDA

2020-04-02 Thread Adam Raszkiewicz
So there is no way to skip Postfix for incoming messages and go directly to 
LMTP/LDA but I need two instances of Postfix in that case?

Regarding your second question - it is required to be complaint with Direct 
Trust. 

Thanks,
Adam

On 4/2/20, 3:07 PM, "dovecot on behalf of Juri Haberland" 
 wrote:

On 02/04/2020 15:18, Adam Raszkiewicz wrote:
> Desired flow looks like:
> 
> Dovecot -> Postfix --> Relay Server -┐
> Dovecot <-- LMTP/LDA <-- Postfix <-┘

This mail flow cannot work with one Postfix instance. Either Postfix
knows that "localdomain.com" is local and should be delivered to the
LDA, in which case it won't be forwarded to the relay server, or Postfix
does not know that "localdomain.com" is a local address and therefor
forwards it the relay server, but than it will do that anytime it sees
"localdomain.com".

Only possibility is to run two instances of Postfix.

The real question is:
Why do you want this mail flow? Where is the benefit in sending a local
mail out to a relay server only to get it back and deliver it?


Cheers,
  Juri




Re: Disable Dovecot LDA

2020-04-02 Thread Juri Haberland
On 02/04/2020 15:18, Adam Raszkiewicz wrote:
> Desired flow looks like:
> 
> Dovecot -> Postfix --> Relay Server -┐
> Dovecot <-- LMTP/LDA <-- Postfix <-┘

This mail flow cannot work with one Postfix instance. Either Postfix
knows that "localdomain.com" is local and should be delivered to the
LDA, in which case it won't be forwarded to the relay server, or Postfix
does not know that "localdomain.com" is a local address and therefor
forwards it the relay server, but than it will do that anytime it sees
"localdomain.com".

Only possibility is to run two instances of Postfix.

The real question is:
Why do you want this mail flow? Where is the benefit in sending a local
mail out to a relay server only to get it back and deliver it?


Cheers,
  Juri


Re: Disable Dovecot LDA

2020-04-02 Thread Jerry
On Thu, 2 Apr 2020 13:18:14 +, Adam Raszkiewicz stated:
>Desired flow looks like:
>
>Dovecot -> Postfix --> Relay Server -┐
>Dovecot <-- LMTP/LDA <-- Postfix <-┘
>
>Top part of that flow works fine - a message will get to the relay
>server and it will be send back to the postfix for a local delivery
>but then it will start to loop back to the relay server instead hand
>over to LMTP/LDA. 
>
>For some reason Postfix  doesn't know that a...@localdomain.com is
>located on Dovecot and it will try to send it back to the relay
>server. I have the same problem explained here:
>https://serverfault.com/questions/1010325/postfix-via-relay-server-and-lmtp-configuration-for-incoming-delivery-to-local-m
>
>Thanks for any help!
>~Adam
>
>On 4/1/20, 6:45 PM, "dovecot on behalf of Dauser Martin Johannes"
> wrote:
>
>On Dienstag, 31. März 2020 21:14:26 CEST Adam Raszkiewicz wrote:
>> But then it loops again when get back to the postfix as an
>> incoming message (doesn't know that a...@localdomain.com is
>> located on that Dovecot)  
>+
>> Is there any way to disable Dovecot LDA? I want to always send
>> email via postfix and relay server even it will be a local
>> delivery within the Dovecot server
>>
>>Thanks,
>>Adam  
>
>Why should a disabled LDA or a relayhost help in this matter?
> Honestly, who is sending what to where anyway? 
>
>I mean Dovecot is an IMAP-Server: It receives emails from Postfix
> and mailclients connect to Dovecot to get these mails. When a
> mailclient sends an email it connects to Postfix not to Dovecot, so a
> delivery "within Dovecot" isn't really happening. Dovecot's LDA has
> options to send (bounce) mails back to Postfix. I guess loops occur
> there? 
>WHO doesn't know that a...@localdomain.com is located on Dovecot
> -- Dovecot itself (= unknown recipient or perhaps permission problems
> while saving the mail) or Postfix (= no transport to Dovecot)? 
>
>Martin

This question really belongs on the 'postfix' forum. Have you read
<http://www.postfix.org/DEBUG_README.html> or better still,
<http://www.postfix.org/DEBUG_README.html#mail>. The "postfinger" tool
is the best way.

-- 
Jerry


pgpddSbXQSgBz.pgp
Description: OpenPGP digital signature


Re: Disable Dovecot LDA

2020-04-02 Thread Adam Raszkiewicz
Desired flow looks like:

Dovecot -> Postfix --> Relay Server -┐
Dovecot <-- LMTP/LDA <-- Postfix <-┘

Top part of that flow works fine - a message will get to the relay server and 
it will be send back to the postfix for a local delivery but then
it will start to loop back to the relay server instead hand over to LMTP/LDA. 

For some reason Postfix  doesn't know that a...@localdomain.com is located on 
Dovecot and it will try to send it back to the relay server.
I have the same problem explained here: 
https://serverfault.com/questions/1010325/postfix-via-relay-server-and-lmtp-configuration-for-incoming-delivery-to-local-m

Thanks for any help!
~Adam

On 4/1/20, 6:45 PM, "dovecot on behalf of Dauser Martin Johannes" 
 wrote:

On Dienstag, 31. März 2020 21:14:26 CEST Adam Raszkiewicz wrote:
> But then it loops again when get back to the postfix as an incoming 
message
> (doesn't know that a...@localdomain.com is located on that Dovecot)
    +
    > Is there any way to disable Dovecot LDA? I want to always send email via 
> postfix and relay server even it will be a local delivery within the 
Dovecot
> server
>
>Thanks,
>Adam

Why should a disabled LDA or a relayhost help in this matter? Honestly, who 
is 
sending what to where anyway? 

I mean Dovecot is an IMAP-Server: It receives emails from Postfix and 
mailclients connect to Dovecot to get these mails. When a mailclient sends 
an 
email it connects to Postfix not to Dovecot, so a delivery "within Dovecot" 
isn't really happening. Dovecot's LDA has options to send (bounce) mails 
back 
to Postfix. I guess loops occur there?

WHO doesn't know that a...@localdomain.com is located on Dovecot -- Dovecot 
itself (= unknown recipient or perhaps permission problems while saving the 
mail) or Postfix (= no transport to Dovecot)? 

Martin









Re: Disable Dovecot LDA

2020-04-01 Thread Dauser Martin Johannes
On Dienstag, 31. März 2020 21:14:26 CEST Adam Raszkiewicz wrote:
> But then it loops again when get back to the postfix as an incoming message
> (doesn't know that a...@localdomain.com is located on that Dovecot)
+
> Is there any way to disable Dovecot LDA? I want to always send email via 
> postfix and relay server even it will be a local delivery within the Dovecot
> server
>
>Thanks,
>Adam

Why should a disabled LDA or a relayhost help in this matter? Honestly, who is 
sending what to where anyway? 

I mean Dovecot is an IMAP-Server: It receives emails from Postfix and 
mailclients connect to Dovecot to get these mails. When a mailclient sends an 
email it connects to Postfix not to Dovecot, so a delivery "within Dovecot" 
isn't really happening. Dovecot's LDA has options to send (bounce) mails back 
to Postfix. I guess loops occur there?

WHO doesn't know that a...@localdomain.com is located on Dovecot -- Dovecot 
itself (= unknown recipient or perhaps permission problems while saving the 
mail) or Postfix (= no transport to Dovecot)? 

Martin







Re: Disable Dovecot LDA

2020-03-31 Thread Adam Raszkiewicz
But then it loops again when get back to the postfix as an incoming message 
(doesn't know that a...@localdomain.com is located on that Dovecot)

 <https://img.newoldstamp.com/r/292975/p>
Adam Raszkiewicz
 
 
p: 845.896.0191 
e: araszkiew...@medallies.com 
w: www.medallies.com <http://www.medallies.com/main.html> 
 
 <https://img.newoldstamp.com/r/292975/twitter>
 <https://img.newoldstamp.com/r/292975/linkedin>
 <https://img.newoldstamp.com/r/292975/instagram>
 
 <https://img.newoldstamp.com/r/292975/b>
 
This communication and any files or attachments transmitted with it may contain 
information that is confidential, privileged and exempt from disclosure under 
applicable law. It is intended solely for the use of the individual or the 
entity to which it is addressed. If you are not the intended recipient, you are 
hereby notified that any use, dissemination, or copying of this communication 
is strictly prohibited by federal law. If you have received this communication 
in error, please destroy it and notify the sender.
 

On 3/31/20, 1:45 PM, "dovecot on behalf of Aki Tuomi" 
 wrote:


> On 31/03/2020 19:35 Adam Raszkiewicz  wrote:
> 
> 
>   
    > Hi,
>  
>  
> Is there any way to disable Dovecot LDA? I want to always send email via 
postfix and relay server even it will be a local delivery within the Dovecot 
server
>  

Dovecot LDA is fully optional. Just don't use it in postfix configuration

Aki

>  
> Thanks,
>  
> Adam




Re: Disable Dovecot LDA

2020-03-31 Thread Aki Tuomi


> On 31/03/2020 19:35 Adam Raszkiewicz  wrote:
> 
> 
>   
> Hi,
>  
>  
> Is there any way to disable Dovecot LDA? I want to always send email via 
> postfix and relay server even it will be a local delivery within the Dovecot 
> server
>  

Dovecot LDA is fully optional. Just don't use it in postfix configuration

Aki

>  
> Thanks,
>  
> Adam


Disable Dovecot LDA

2020-03-31 Thread Adam Raszkiewicz
Hi,

Is there any way to disable Dovecot LDA? I want to always send email via 
postfix and relay server even it will be a local delivery within the Dovecot 
server

Thanks,
Adam