Hello Jason,

if I remeber correctly from an older topic, it's possible to use more than one port per service. In <james>/conf/smtpserver.xml you normal have this layout:

<smtpservers>
    <smtpserver>
        <bind>0.0.0.0:25</bind>
    </smtpserver>
</smtpservers>

This is the required one on TCP/25 for receiving e-mails from the outside world. Why? SMTP uses TCP/25 for inter-server communication: each MTA that want to talk to another MTA has to do this on TCP/25 - if TCP/25 isn't open or there is no SMTP server on this port mails can't be delievered.

If you want additional ports for TCP/465 (socketTLS) or TCP/587 (startTLS) you just have to add another <smtpserver>-block. You can just copy the existing block. But you have to change the jmxName, or delete it, as there can't multiple jmx entries with the same name.

So you can do this:

<smtpservers>
    <smtpserver>
        <bind>0.0.0.0:25</bind>
        <tls socketTLS="false" startTLS="true">
            <!-- stuff -->
        </tls>
    </smtpserver>
    <smtpserver>
        <bind>0.0.0.0:465</bind>
        <tls socketTLS="true" startTLS="false">
            <!-- stuff -->
        </tls>
    </smtpserver>
    <smtpserver>
        <bind>0.0.0.0:587</bind>
        <tls socketTLS="false" startTLS="true">
            <!-- stuff -->
        </tls>
    </smtpserver>
</smtpservers>

This way you open your james on ports 25, 465 and 587. The startTLS on 25 is so other MTA can drop mails over encrypted channel, but you can set it to false. Make sure to set authRequired to announce to enforce SMTP AUTH or set authroizedAddress correctly (also check mailetcontainer.xml !).

About TCP/25 is marked as spam - I guess you're either in a larger network or use an ISP with strict policies, as it shouldn't be blocked allthough it's a good anti-spam mechanic. Try contact the admin/support about policies about TCP/25.

Matt

Am 27.06.2019 um 05:09 schrieb Jason Tjankilisan:
Halo,
After doing some research about my problem, I found this 
https://www.mail-archive.com/server-user@james.apache.org/msg15590.html and 
from what im understanding that if my SMTP use port other than 25, I cannot get 
any email from outside world? (Gmail, Yahoo I pressume)

I might be wrong since im new but, to send email to outside world, I need port 
465 with SSL/TLS Socket on so it wont be recognized as spam. In addition, it 
seems using port 25 as SMTP port to send email using thunderbird always create 
a connection time out error.

For the IMAP server, I can use port 993 with socketTLS and port 143 with no 
problem to get new email, as long as the SMTP port stay on 25. (Additional Info 
: keystore was created using Letsencrypt)

(When I change SMTP port to 465, I got this error from gmail)
The recipient server did not accept our requests to connect. Learn more at 
https://support.google.com/mail/answer/7720 [jason.107.jp. 5.189.160.138: 
generic::failed_precondition: connect error (111): Connection refused]
So is there any way for my SMTP to use port 465 and still get email from 
outside my server?
Sincerely, Jason
Sorry for any wrong word, and thank you for the help

Sent from Mail for Windows 10



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to