1 (edited by joelgm 2013-06-12 15:25:24)

Topic: What port is used for sending mail?

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

First, let me start off by apologizing for being a beginner in managing a mail server. Because iredmail is too simple to set up, I managed to use it to install a mail server on a VPS. Webmail via Roundcube works very well, both sending an receiving works fine. However I was trying to send and receive mails via Bat, an email app for Windows. Receiving works fine. I just set up my server FQDN in the program, chose TLS and port 993.

However I'm unable to send mail via the program, via my server.

netstat showed that ports used by dovecot were: 4190, 993, 995, 110 and 143. I used "Regular Authentication". None of them allowed me to send mail.  I'm sure I'm missing something fundamental here.

Port 25, TLS:
!12/06/2013, 12:41:23: SEND  - TLS protocol error: Unexpected message SessionUnknownContentType ct (50).

A telnet to port 25 (hostname replaced by gnu.org):
#telnet apo.gnu.org 25
Trying 172.215.13.173...
Connected to apollo.gnu.org.
Escape character is '^]'.
220 apollo.gnu.org ESMTP Postfix (Debian/GNU)
421 4.4.2 apollo.gnu.org Error: timeout exceeded
Connection closed by foreign host.

Manual trying to send mail by telnet:
#telnet  apo.gnu.org 25
Trying 172.245.33.173...
Connected to  apo.gnu.org.
Escape character is '^]'.
220  apo.gnu.org ESMTP Postfix (Debian/GNU)
helo  apo.gnu.org
250  apo.gnu.org
mail from:<kamel@drkamel.info>
250 2.1.0 Ok
rcpt to:<kamel@who.in>
553 5.7.1 <kamel@who.in>: Sender address rejected: not logged in

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: What port is used for sending mail?

Please use port 587 (submission) to send email. Reference:
http://iredmail.org/wiki/index.php?titl … l_via_SMTP

3 (edited by joelgm 2013-06-12 20:55:44)

Re: What port is used for sending mail?

Is it normal for the server to allow sending email via port 25 with no security? It seems for me STARTTLS works on port 587, and Regular email without security works on port 25

Also note the following:
[root@apollo] / #grep -in disable_plaintext_auth ./etc/dovecot/dovecot.conf
39:# With disable_plaintext_auth=yes AND ssl=required, STARTTLS is mandatory.
40:# Set disable_plaintext_auth=no AND ssl=yes to allow plain password transmitted
42:disable_plaintext_auth = yes
45:#   disable_plaintext_auth = no

4

Re: What port is used for sending mail?

joelgm wrote:

Is it normal for the server to allow sending email via port 25 with no security?

It's normal, BUT NOT RECOMMENDED. Please protect with mail service with secure connections (HTTPS, POP3S, IMAPS, SMTPS, etc).

joelgm wrote:

Also note the following:
[root@apollo] / #grep -in disable_plaintext_auth ./etc/dovecot/dovecot.conf
39:# With disable_plaintext_auth=yes AND ssl=required, STARTTLS is mandatory.
40:# Set disable_plaintext_auth=no AND ssl=yes to allow plain password transmitted
42:disable_plaintext_auth = yes
45:#   disable_plaintext_auth = no

Excuse me, what's your point? This is iRedMail default setting, "STARTTLS" is mandatory.

5 (edited by joelgm 2013-06-12 21:11:54)

Re: What port is used for sending mail?

ZhangHuangbin wrote:
joelgm wrote:

Is it normal for the server to allow sending email via port 25 with no security?

It's normal, BUT NOT RECOMMENDED. Please protect with mail service with secure connections (HTTPS, POP3S, IMAPS, SMTPS, etc).

joelgm wrote:

Also note the following:
[root@apollo] / #grep -in disable_plaintext_auth ./etc/dovecot/dovecot.conf
39:# With disable_plaintext_auth=yes AND ssl=required, STARTTLS is mandatory.
40:# Set disable_plaintext_auth=no AND ssl=yes to allow plain password transmitted
42:disable_plaintext_auth = yes
45:#   disable_plaintext_auth = no

Excuse me, what's your point? This is iRedMail default setting, "STARTTLS" is mandatory.

Yes if STARTTLS is mandatory, why I am I able to send email without STARTTLS when this setting is on? Or am I talking about something totally different?

I'm able to do this:
#telnet apollo.who.org 25
Trying 17.24.33.171...
Connected to apollo.who.org.
Escape character is '^]'.
220 apollo.who.org ESMTP Postfix (Debian/GNU)
HELO apollo.who.org
250 apollo.who.org
auth login
334 VXNlcm5hbWU6
am9lbEBkcmpvZWwuaW5mbw==
334 UGFzc3dvcmQ6
UTI3cG0zNU4yYg==
235 2.7.0 Authentication successful
MAIL FROM:<joel@who.org>
250 2.1.0 Ok
RCPT TO:<timothy@somewhere.com>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject:Test

Check success.
.
250 2.0.0 Ok: queued as 5E150C2FF2

6

Re: What port is used for sending mail?

With iRedMail default setting, STARTTLS is mandatory for POP3 and IMAP services, not SMTP.