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 "[email protected]" 
list
To unsubscribe, send mail with subject: [[email protected]] unregister

Reply via email to