DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th January 2016
sag sag is offline
New User
 
Join Date: Jan 2016
Posts: 2
Default smtpd relay doesn't use my configured port

Code:
uname -mrsv
OpenBSD 5.8 GENERIC.MP#1236 amd64
I don't actually want to relay through port 25, but this is just to show how my ISP blocks it:

Code:
telnet mail.messagingengine.com 25
Trying 66.111.4.51...
telnet: connect to address 66.111.4.51: Connection timed out
Trying 66.111.4.52...
telnet: connect to address 66.111.4.52: Connection timed out
Port 465 is fine:

Code:
telnet mail.messagingengine.com 465
Trying 66.111.4.51...
Connected to mail.messagingengine.com.
Escape character is '^]'.
Here is my configuration from /etc/mail/smtpd.conf

Code:
listen on lo0
table aliases db:/etc/mail/aliases.db
table secrets db:/etc/mail/secrets.db
accept for local alias <aliases> deliver to mbox
accept for any relay via smtps+auth://label@mail.messagingengine.com:465 auth <secrets>
Although I want to use port 465, it is instead using port 25 and the connections are timing out:

Code:
# smtpd -n
configuration OK
# smtpd -d
info: OpenSMTPD 5.4.4 starting
info: startup
smtp-out: Connecting to smtp+tls://66.111.4.73:25 (mx4.messagingengine.com) on session 9e123be67ad426f7...
smtp-out: Connecting to smtp+tls://66.111.4.75:25 (mx6.messagingengine.com) on session 9e123be88ba0d955...
smtp-out: Connecting to smtp+tls://66.111.4.74:25 (mx5.messagingengine.com) on session 9e123be71eec91c0...
smtp-out: Error on session 9e123be67ad426f7: Connection timeout
smtp-out: Disabling route [] <-> 66.111.4.73 (mx4.messagingengine.com) for 800s
smtp-out: Connecting to smtp+tls://66.111.4.70:25 (mx1.messagingengine.com) on session 9e123be9b7e5eb52...
smtp-out: Error on session 9e123be88ba0d955: Connection timeout
smtp-out: Disabling route [] <-> 66.111.4.75 (mx6.messagingengine.com) for 800s
smtp-out: Error on session 9e123be71eec91c0: Connection timeout
smtp-out: Disabling route [] <-> 66.111.4.74 (mx5.messagingengine.com) for 800s
smtp-out: Connecting to smtp+tls://66.111.4.72:25 (mx3.messagingengine.com) on session 9e123bea3a9916c4...
smtp-out: Connecting to smtp+tls://66.111.4.71:25 (mx2.messagingengine.com) on session 9e123beb88018fb6...
smtp-out: Error on session 9e123be9b7e5eb52: Connection timeout
smtp-out: Disabling route [] <-> 66.111.4.70 (mx1.messagingengine.com) for 800s
smtp-out: Error on session 9e123bea3a9916c4: Connection timeout
smtp-out: Disabling route [] <-> 66.111.4.72 (mx3.messagingengine.com) for 800s
smtp-out: Error on session 9e123beb88018fb6: Connection timeout
smtp-out: Disabling route [] <-> 66.111.4.71 (mx2.messagingengine.com) for 800s
smtp-out: Connecting to smtp+tls://185.68.180.20:25 (smx1.messagingengine.com) on session 9e123bec1ccc1ff7...
smtp-out: Connecting to smtp+tls://185.68.180.24:25 (smx2.messagingengine.com) on session 9e123bed3eb5fc9e...
How can I whisper sweet nothings into smtpd's ear to get it to stop relaying on port 25 and use port 465 instead?
Reply With Quote
  #2   (View Single Post)  
Old 27th January 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,055
Default

Hello, and welcome!

According to the smtpd.conf(5) man page, you can use listen on interface port <number>.

I do the port translation with PF rdr-to, as my mail server gets redirected traffic anyway.
Reply With Quote
  #3   (View Single Post)  
Old 27th January 2016
TronDD TronDD is offline
Shell Scout
 
Join Date: Sep 2014
Posts: 87
Default

I think what he's trying to do is send to port 465, not listen on 465.

Somehow smtps+auth is becoming smtp+tls
Reply With Quote
  #4   (View Single Post)  
Old 28th January 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,055
Default

Ah, thank you, I misunderstood the question. There was a discussion in November on the OpenSMTPd mailing list that discussed port 465 relay. The OP managed to provision it, though there were still open issues for his use case.

http://marc.info/?t=144845636000006&r=1&w=2
Reply With Quote
  #5   (View Single Post)  
Old 30th January 2016
sag sag is offline
New User
 
Join Date: Jan 2016
Posts: 2
Default

After my previous test mails had their envelopes expire after 4 days, I then sent new test mail which succeeded. In the discussion jggimi linked, I now see that envelopes have mta-relay parameters attached to them. Therefore any updates on my configuration had no effect on delivery of the older messages. This behavior wasn't what I expected, so it seemed like a bug. The moral of the story is: when tweaking smtpd configuration, if test messages fail you must remove the envelopes, edit smtpd.conf, restart smtpd and send new test messages. Thanks again for your help.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
smtpd as a relay bceverly OpenBSD General 13 7th October 2015 04:52 PM
Help with smtpd as a relay rjdelacr OpenBSD General 5 6th October 2015 08:48 PM
Switched over from sendmail(8) to smtpd(8) by default. gpatrick OpenBSD General 0 5th October 2014 03:56 PM
transparent relay schmurfy OpenBSD General 5 20th April 2012 11:21 AM
OpenSMTPD as a GMail relay backrow OpenBSD General 1 25th December 2011 07:22 PM


All times are GMT. The time now is 01:47 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick