0

This looks like a tough one to me: I'm configuring postfix on my local home server running ubuntu server 14.04 LTS I was able to send outgoing mail through my relayhost on port 26, everything worked I'm now trying to send outgoing mail through my relayhost on port 465, and I get postfix error "lost connection with [relayhost] while receiving the initial server greeting" I can openssl and EHLO fine from the command line though, so it must be a postfix configuration issue

my master.cf has

smtps inet n - - - - smtpd

uncommented as required

my main.cf has

...
relayhost = relayhostname.tld:465

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
...

and obviously I configured sasl_passwd etc.

Any ideas?

Thank you p

1 Answer 1

0

Postfix relayhost option doesn't support SMTPS connection.

If you want to enforce the relayhost disabling MX lookup, you should use the hostname between "[" and "]".

If you want to enforce SMTPS connection, you can create a local tunnel with stunnel:

[smtp-tls-wrapper]
accept = 11125
client = yes
connect = mail.example.com:smtps

You can get more info on http://www.postfix.org/TLS_README.html

16
  • Thanks I just figured that out But now I am getting my outbound messages returned with a "host 127.0.0.1[127.0.0.1] said: 554 5.4.0 Error: too many hops (in reply to end of DATA command)" email message...!!
    – phaedo
    Jul 28, 2014 at 18:32
  • Looks like you've got a loop. Change the relayhost to use the accept port defined in stunnel: relayhost = [127.0.0.1]:11125.
    – denisvm
    Jul 28, 2014 at 18:55
  • I have that already so the loop must be elsewhere... given how quickly I'm getting the 554 error I'm guessing the loop is local, is there any way I can track all the connections made?
    – phaedo
    Jul 28, 2014 at 19:25
  • @phaedo You can check in your maillog, probably in /var/log/maillog or /var/log/mail.log.
    – denisvm
    Jul 28, 2014 at 20:32
  • #tail /var/log/mail.log postfix/smtpd[23427]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits) postfix/smtpd[23427]: A001D84215B: client=localhost[127.0.0.1], sasl_method=PLAIN, sasl_username=[user name]@[local host name.tld] postfix/smtp[23420]: 8792D842160: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:12345, delay=0.1, delays=0.06/0/0.04/0, dsn=5.4.0, status=bounced (host 127.0.0.1[127.0.0.1] said: 5545.4.0 Error: too many hops (in reply to end of DATA command)) postfix/smtpd[23427]: disconnect from localhost[127.0.0.1]
    – phaedo
    Jul 28, 2014 at 22:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .