• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Plesk SMTP authentication Error through Python script

happycoding.ai

New Pleskian
Server operating system version
Centos 7
Plesk version and microupdate number
18.0.43
I have one VPS with a Plesk server configuration. On the same VPS Plesk-Mail server is running. I am able to send mail through webmail.

But whenever using a script and using the below values to send mail through SMTP, it gives an authentication error.
MAIL_SERVER ='smtp.<domain>'
MAIL_PORT = 587/465
USER=
PASS=
MAIL_USE_TLS = False
MAIL_USE_SSL = True
How to solve this problem?

Note: Same above config working with sSMTP tool
 
hello @happycoding.ai ,
please check to which IP resolves smtp.<domain> when you doing ping or telnet from the same server where SMTP daemon is running.
probably you need to use an IP address or even an localhost as MAIL_SERVER
 
hello @happycoding.ai ,
please check to which IP resolves smtp.<domain> when you doing ping or telnet from the same server where SMTP daemon is running.
probably you need to use an IP address or even an localhost as MAIL_SERVER

Thanks @Nik G

ping -a smtp.<domain>
Pinging us2.smtp.mailhostbox.com [208.91.198.38] with 32 bytes of data:
Reply from 208.91.198.38: bytes=32 time=341ms TTL=43
Reply from 208.91.198.38: bytes=32 time=307ms TTL=43
Reply from 208.91.198.38: bytes=32 time=371ms TTL=43
Reply from 208.91.198.38: bytes=32 time=310ms TTL=43
(Not sure why it is pointing to this)

Now the next question is if I point to localhost or VPS IP, what would be the SMTP port?
 
it depends from your settings, but usually it is 465.

you can check what port listen with command like
Code:
ss -nptl|grep -i master
also command
Code:
grep '<domain>' /etc/postfix/*
should help to understand at what IP address MTA listen for this domain.
 
Back
Top