Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Postfix port 465 /TLS problem

55 views
Skip to first unread message

whostheJBoss

unread,
Jan 3, 2010, 9:30:31 AM1/3/10
to
I have been wrestling with Postfix for a couple of days now and am
having some minor issues with TLS and secure ports.

First, here is what IS working....

I can use: mail em...@somedomain.com and email gets sent, so Postfix
is up and running, I receive the mail.

If I telnet into:

telnet mail.mydomain.com 25

I get:

220 mail.mydomain.com ESMTP Postfix

When I run: EHLO mydomain.com I get:

250-mail.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

So, that works fine.

However, if I telnet into mail.mydomain.com 465 I get:

Connected to mail.mydomain.com (127.0.0.1)
Escape character is '^]'.

Nothing else. No commands (including EHLO) work.

I don't believe this is a firewall issue since I can get connected, so
I'm not sure.

I encountered this problem because I was researching an issue I was
having trying to use TLS and my client certificate wasn't being
accepted.

My client returned:

"ERROR","web-0","01/03/2010","06:27","mail spooler","Exception reading
response;
nested exception is:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target"

So, I tested openssl using:

openssl s_client -crlf -connect mail.mydomain.com:465

And I see my certificate and can run EHLO. When I run EHLO this way on
465 I see:

501 Syntax: EHLO hostname
EHLO mail.mydomain.com
250-mail.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Noticeably missing is the line:

250-STARTTLS

Which was present when running EHLO on port 25 via telnet.

So, to sum up...

On telnet port 25 I can connect and run EHLO, but on telnet port 465 I
cannot get past connecting.

If I use openssl to check my cert on 465, I can then EHLO, but the
STARTTLS line is missing, does this matter?

Will telnet to 465 when it is expecting a cert work?

openssl on port 25 also returns the same cert...

I'm very confused... not sure what I need to do.

Thanks!!!!!!

Oh, and here is the bottom of my main.cf:

smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

smtpd_tls_security_level = may
smtpd_tls_key_file = /etc/pki/tls/private/mail.mydomain.com.key
smtpd_tls_cert_file = /etc/pki/tls/certs/mail.mydomain.com.cert
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_session_cache_database = btree:/var/spool/postfix/
smtpd_tls_cache
tls_random_source = dev:/dev/urandom

Here is my master.cf:

#
# Postfix master process configuration file. For details on the
format
# of the file, see the master(5) manual page (command: "man 5
master").
#
#
==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
==========================================================================
smtp inet n - n - - smtpd
submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-
rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX
loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m $
{extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m $
{extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop
($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient

whostheJBoss

unread,
Jan 3, 2010, 9:57:32 AM1/3/10
to
I should also add, that when trying to send over port 25 with TLS, I
get the following from my client:

"ERROR","web-0","01/03/2010","06:55","mail spooler","Exception reading
response;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
connection?"

whostheJBoss

unread,
Jan 3, 2010, 10:15:55 AM1/3/10
to
I am also seeing:

"No client certificate CA names sent"

In my openssl to port 465

Sorry for the little details, I'm new :)

whostheJBoss

unread,
Jan 3, 2010, 10:19:35 AM1/3/10
to
And of course, there's also this port 587 option, but I really don't
know which is better or worse to use in my case :\

On Jan 3, 6:57 am, whostheJBoss <dotfus...@changethings.org> wrote:

0 new messages