Haraka icon indicating copy to clipboard operation
Haraka copied to clipboard

Changing host in hook in multi domain setup

Open denispodkopaev opened this issue 3 years ago • 2 comments

=== Trying localhost:25...
=== Connected to localhost.
<-  220 localhost ESMTP Haraka/2.8.27 ready
 -> EHLO localhost.localdomain
<-  250-localhost Hello localhost [127.0.0.1]Haraka is at your service.
<-  250-PIPELINING
<-  250-8BITMIME
<-  250-SMTPUTF8
<-  250-SIZE 0
<-  250-STARTTLS
<-  250 AUTH LOGIN CRAM-MD5
 -> AUTH CRAM-MD5
<-  334 PGUzNjQ5LiAxNzg3MDgxZjkxMEBsb2NhbGhvc3Q+
 -> aGFyYWthIGViZWI0ODdkZjIyYzdkZjY0NmY2ODVhYWE5YTZhNGEw
<-  235 2.7.0 Authentication successful
 -> MAIL FROM:<[email protected]>
<-  250 sender <[email protected]> OK
 -> RCPT TO:<[email protected]>
<-  250 recipient <[email protected]> OK
 -> DATA
<-  354 go ahead, make my day
 -> Date: Fri, 26 Mar 2021 21:47:49 +0000
 -> To: [email protected]
 -> From: [email protected]
 -> Subject: test Fri, 26 Mar 2021 21:47:49 +0000
 -> Message-Id: <[email protected]>
 -> X-Mailer: swaks v20190914.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> 
 -> .
<-  250 Message Queued (519984F7-3880-4732-B72E-A36453045250.1)
 -> QUIT
<-  221 localhost closing connection
=== Connection closed with remote host.

I'm looking for a way of changing localhost, localhost.localdomain in a hook.

Sending to Gmail the result is the following:

Received: (Haraka outbound); Fri, 26 Mar 2021 18:23:02 +0000
Authentication-Results: localhost; auth=pass (cram-md5)
Received: from xxx.de (localhost [127.0.0.1]) by localhost (Haraka/2.8.27) with ESMTPA id AE6AD2D8-6BA9-4C7C-BD28-41B3CE075231.1 envelope-from <[email protected]> (authenticated bits=0); Fri, 26 Mar 2021 18:23:02 +0000
Date: Fri, 26 Mar 2021 18:23:02 +0000

denispodkopaev avatar Mar 26 '21 21:03 denispodkopaev

I think you can do a plugin that does connection.set('local.host', VALUE_HERE)

On Fri, Mar 26, 2021 at 5:57 PM Denis Podkopaev @.***> wrote:

=== Trying localhost:25... === Connected to localhost. <- 220 localhost ESMTP Haraka/2.8.27 ready -> EHLO localhost.localdomain <- 250-localhost Hello localhost [127.0.0.1]Haraka is at your service. <- 250-PIPELINING <- 250-8BITMIME <- 250-SMTPUTF8 <- 250-SIZE 0 <- 250-STARTTLS <- 250 AUTH LOGIN CRAM-MD5 -> AUTH CRAM-MD5 <- 334 PGUzNjQ5LiAxNzg3MDgxZjkxMEBsb2NhbGhvc3Q+ -> aGFyYWthIGViZWI0ODdkZjIyYzdkZjY0NmY2ODVhYWE5YTZhNGEw <- 235 2.7.0 Authentication successful -> MAIL @.> <- 250 sender < @.> OK -> RCPT @.> <- 250 recipient < @.> OK -> DATA <- 354 go ahead, make my day -> Date: Fri, 26 Mar 2021 21:47:49 +0000 -> To: @.*** -> From: @.*** -> Subject: test Fri, 26 Mar 2021 21:47:49 +0000 -> Message-Id: @.***> -> X-Mailer: swaks v20190914.0 jetmore.org/john/code/swaks/ -> -> This is a test mailing -> -> -> . <- 250 Message Queued (519984F7-3880-4732-B72E-A36453045250.1) -> QUIT <- 221 localhost closing connection === Connection closed with remote host.

I'm looking for a way of changing localhost, localhost.localdomain in a hook.

Sending to Gmail the result is the following:

Received: (Haraka outbound); Fri, 26 Mar 2021 18:23:02 +0000 Authentication-Results: localhost; auth=pass (cram-md5) Received: from xxx.de (localhost [127.0.0.1]) by localhost (Haraka/2.8.27) with ESMTPA id AE6AD2D8-6BA9-4C7C-BD28-41B3CE075231.1 envelope-from @.***> (authenticated bits=0); Fri, 26 Mar 2021 18:23:02 +0000 Date: Fri, 26 Mar 2021 18:23:02 +0000

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/haraka/Haraka/issues/2941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFBWYZ5PS4QJUQXH652NKTTFT7NLANCNFSM4Z4E7FIA .

baudehlo avatar Mar 27 '21 18:03 baudehlo

I think you can do a plugin that does connection.set('local.host', VALUE_HERE)

I will try the solution. Which hook would be the most suitable here?

Thanks for your answer

denispodkopaev avatar Mar 27 '21 19:03 denispodkopaev