Re: Relay and TLS

2013-07-29 Thread Gilles Chehade
On Mon, Jul 29, 2013 at 02:49:47AM +0300, Ossi Salmi wrote:
 Hi,
 
 Is there a way to tell smtpd to use TLS when relaying without specifying
 a relay host, i.e.
 
 accept from local for any relay
 
 I'm running v5.3.3 and it's using plaintext smtp even though the remote host
 supports STARTTLS.
 
 Thanks,
 

Can you apply the following and confirm that it fixes your issue ?

diff --git a/smtpd/mta.c b/smtpd/mta.c
index 7dd9c64..9f53083 100644
--- a/smtpd/mta.c
+++ b/smtpd/mta.c
@@ -1481,9 +1481,10 @@ mta_relay(struct envelope *e)
key.flags |= RELAY_MX;
} else {
key.domain = mta_domain(e-dest.domain, 0);
+   key.flags |= RELAY_TLS_OPTIONAL;
}
 
-   key.flags = e-agent.mta.relay.flags;
+   key.flags |= e-agent.mta.relay.flags;
key.port = e-agent.mta.relay.port;
key.cert = e-agent.mta.relay.cert;
if (!key.cert[0])
diff --git a/smtpd/to.c b/smtpd/to.c
index 811753d..bb89d0a 100644
--- a/smtpd/to.c
+++ b/smtpd/to.c
@@ -356,7 +356,7 @@ text_to_relayhost(struct relayhost *relay, const char *s)
return 0;
 
/* no schema, default to smtp+tls:// */
-   i = 1;
+   i = 2;
p = buffer;
}
else



-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg

-- 
You received this email because you are subscribed to the misc@opensmtpd.org 
list
To unsubscribe, send mail with subject: [misc@opensmtpd.org] unregister


Re: Relay and TLS

2013-07-28 Thread Gilles Chehade
On Mon, Jul 29, 2013 at 02:49:47AM +0300, Ossi Salmi wrote:
 Hi,
 

Hi,


 Is there a way to tell smtpd to use TLS when relaying without specifying
 a relay host, i.e.
 
 accept from local for any relay
 
 I'm running v5.3.3 and it's using plaintext smtp even though the remote host
 supports STARTTLS.
 

Hi, there's no way to tell it to use TLS when relaying because it should
use it whenever it's available.

It currently does not because some of the recent reworks in MTA seems to
have introduced a regression.

It'll be fixed

-- 
Gilles Chehade

https://www.poolp.org  @poolpOrg

-- 
You received this email because you are subscribed to the misc@opensmtpd.org 
list
To unsubscribe, send mail with subject: [misc@opensmtpd.org] unregister