SMTP ERROR: Failed to connect to server: Connection timed out (110)

hello

im unable to send email from my website, using a php url shortner script,

but if im try to send or received direct from Roundcube webmail panel its worked,

please help me to fix it

by website script im getting this error

We sent the email commands to your SMTP, but we have received the following errors: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out

and here is /var/log/exim4/rejectlog

2025-06-14 08:23:08 SMTP call from azpdcsyi9p1a.stretchoid.com [135.233.112.24] dropped: too many syntax or protocol errors (last command was "\001??4?\005?\005\001?????", NULL)
2025-06-14 08:23:31 dovecot_login authenticator failed for (localhost) [81.30.107.24]: 535 Incorrect authentication data (set_id=backlinks)
2025-06-14 08:24:06 dovecot_login authenticator failed for (localhost) [81.30.107.174]: 535 Incorrect authentication data (set_id=ulrike)
2025-06-14 08:24:23 dovecot_login authenticator failed for (localhost) [81.30.107.205]: 535 Incorrect authentication data (set_id=venda)
2025-06-14 08:24:24 dovecot_login authenticator failed for (localhost) [81.30.107.159]: 535 Incorrect authentication data (set_id=labs)
2025-06-14 08:24:37 dovecot_login authenticator failed for (localhost) [81.30.107.160]: 535 Incorrect authentication data (set_id=block)
2025-06-14 08:26:09 dovecot_login authenticator failed for (localhost) [81.30.107.125]: 535 Incorrect authentication data (set_id=toyohiko)
2025-06-14 08:26:16 dovecot_login authenticator failed for (localhost) [81.30.107.136]: 535 Incorrect authentication data (set_id=qwert40)
2025-06-14 08:26:19 dovecot_login authenticator failed for (localhost) [81.30.107.64]: 535 Incorrect authentication data (set_id=yoshi)
2025-06-14 08:26:44 dovecot_login authenticator failed for (localhost) [81.30.107.89]: 535 Incorrect authentication data (set_id=lyon)
2025-06-14 08:26:59 dovecot_login authenticator failed for (localhost) [81.30.107.104]: 535 Incorrect authentication data (set_id=naonao)
2025-06-14 08:27:09 dovecot_login authenticator failed for (localhost) [81.30.107.195]: 535 Incorrect authentication data (set_id=country)
2025-06-14 08:27:28 dovecot_login authenticator failed for (localhost) [81.30.107.153]: 535 Incorrect authentication data (set_id=itworks)
2025-06-14 08:28:22 dovecot_login authenticator failed for (localhost) [81.30.107.38]: 535 Incorrect authentication data (set_id=ota)
2025-06-14 08:29:11 dovecot_login authenticator failed for (localhost) [81.30.107.149]: 535 Incorrect authentication data (set_id=membres)
2025-06-14 08:29:16 dovecot_login authenticator failed for (localhost) [81.30.107.194]: 535 Incorrect authentication data (set_id=sogo)
2025-06-14 08:30:15 dovecot_login authenticator failed for (localhost) [81.30.107.94]: 535 Incorrect authentication data (set_id=chornaya)
2025-06-14 08:30:39 dovecot_login authenticator failed for (localhost) [81.30.107.109]: 535 Incorrect authentication data (set_id=ito)
2025-06-14 08:30:52 dovecot_login authenticator failed for (WIN-GG8OTOFJUE1) [45.95.146.57]: 535 Incorrect authentication data (set_id=administrator)
2025-06-14 08:31:11 dovecot_login authenticator failed for (localhost) [81.30.107.121]: 535 Incorrect authentication data (set_id=developers)
2025-06-14 08:31:28 dovecot_login authenticator failed for (localhost) [81.30.107.173]: 535 Incorrect authentication data (set_id=chenjie)
2025-06-14 08:32:06 dovecot_login authenticator failed for (localhost) [81.30.107.201]: 535 Incorrect authentication data (set_id=borje)
2025-06-14 08:32:10 dovecot_login authenticator failed for (localhost) [81.30.107.185]: 535 Incorrect authentication data (set_id=true)
2025-06-14 08:32:48 dovecot_login authenticator failed for (localhost) [81.30.107.70]: 535 Incorrect authentication data (set_id=ns)
2025-06-14 08:32:50 dovecot_login authenticator failed for (localhost) [81.30.107.146]: 535 Incorrect authentication data (set_id=watch)
2025-06-14 08:33:10 dovecot_login authenticator failed for (localhost) [81.30.107.119]: 535 Incorrect authentication data (set_id=gutenberg)
2025-06-14 08:35:36 dovecot_login authenticator failed for (localhost) [81.30.107.145]: 535 Incorrect authentication data (set_id=margit)
2025-06-14 08:35:39 dovecot_login authenticator failed for (localhost) [81.30.107.29]: 535 Incorrect authentication data (set_id=lion)
2025-06-14 08:36:00 dovecot_login authenticator failed for (localhost) [81.30.107.33]: 535 Incorrect authentication data (set_id=cup)
2025-06-14 08:36:05 dovecot_login authenticator failed for (localhost) [81.30.107.21]: 535 Incorrect authentication data (set_id=lupus)
2025-06-14 08:36:09 dovecot_login authenticator failed for (localhost) [81.30.107.49]: 535 Incorrect authentication data (set_id=mmn)
2025-06-14 08:37:20 dovecot_login authenticator failed for (localhost) [81.30.107.115]: 535 Incorrect authentication data (set_id=survey)
2025-06-14 08:37:53 dovecot_login authenticator failed for (localhost) [81.30.107.177]: 535 Incorrect authentication data (set_id=kanya)
2025-06-14 08:38:11 dovecot_login authenticator failed for (localhost) [81.30.107.43]: 535 Incorrect authentication data (set_id=rush2112)
2025-06-14 08:38:35 dovecot_login authenticator failed for (localhost) [81.30.107.174]: 535 Incorrect authentication data (set_id=shocker)
2025-06-14 08:38:52 dovecot_login authenticator failed for (localhost) [81.30.107.159]: 535 Incorrect authentication data (set_id=ivyl)
2025-06-14 08:39:01 dovecot_login authenticator failed for (localhost) [81.30.107.205]: 535 Incorrect authentication data (set_id=jonas)
2025-06-14 08:39:15 dovecot_login authenticator failed for (localhost) [81.30.107.130]: 535 Incorrect authentication data (set_id=rmc)
2025-06-14 08:40:34 dovecot_login authenticator failed for (localhost) [81.30.107.136]: 535 Incorrect authentication data (set_id=a123456789)
2025-06-14 08:41:19 dovecot_login authenticator failed for (localhost) [81.30.107.89]: 535 Incorrect authentication data (set_id=fml)
2025-06-14 08:41:31 dovecot_login authenticator failed for (localhost) [81.30.107.24]: 535 Incorrect authentication data (set_id=crc)
2025-06-14 08:41:42 dovecot_login authenticator failed for (localhost) [81.30.107.168]: 535 Incorrect authentication data (set_id=bogdan)
2025-06-14 08:42:11 dovecot_login authenticator failed for (localhost) [81.30.107.160]: 535 Incorrect authentication data (set_id=mailbox2)
2025-06-14 08:42:12 dovecot_login authenticator failed for (localhost) [81.30.107.153]: 535 Incorrect authentication data (set_id=planeta)
2025-06-14 08:42:50 dovecot_login authenticator failed for (localhost) [81.30.107.125]: 535 Incorrect authentication data (set_id=edy)
2025-06-14 08:43:00 dovecot_login authenticator failed for (localhost) [81.30.107.195]: 535 Incorrect authentication data (set_id=pmc)
2025-06-14 08:43:42 dovecot_login authenticator failed for (localhost) [81.30.107.90]: 535 Incorrect authentication data (set_id=preston)
2025-06-14 08:44:26 dovecot_login authenticator failed for (localhost) [81.30.107.149]: 535 Incorrect authentication data (set_id=vps6)
2025-06-14 08:44:44 dovecot_login authenticator failed for (localhost) [81.30.107.67]: 535 Incorrect authentication data (set_id=marta)
2025-06-14 08:44:52 dovecot_login authenticator failed for (localhost) [81.30.107.94]: 535 Incorrect authentication data (set_id=sjkim)
2025-06-14 08:45:05 dovecot_login authenticator failed for (localhost) [81.30.107.194]: 535 Incorrect authentication data (set_id=feuerwehr)
2025-06-14 08:45:35 dovecot_login authenticator failed for (localhost) [81.30.107.38]: 535 Incorrect authentication data (set_id=blog2)
2025-06-14 08:46:22 dovecot_login authenticator failed for (localhost) [81.30.107.121]: 535 Incorrect authentication data (set_id=mon)
2025-06-14 08:46:46 dovecot_login authenticator failed for (localhost) [81.30.107.40]: 535 Incorrect authentication data (set_id=ganesh)
2025-06-14 08:47:17 dovecot_login authenticator failed for (localhost) [81.30.107.104]: 535 Incorrect authentication data (set_id=sneek)
2025-06-14 08:48:11 dovecot_login authenticator failed for (localhost) [81.30.107.142]: 535 Incorrect authentication data (set_id=quarantine)
2025-06-14 08:48:37 dovecot_login authenticator failed for (localhost) [81.30.107.173]: 535 Incorrect authentication data (set_id=empresa)
2025-06-14 08:48:42 dovecot_login authenticator failed for (localhost) [81.30.107.70]: 535 Incorrect authentication data (set_id=britt)
2025-06-14 08:49:07 dovecot_login authenticator failed for (localhost) [81.30.107.201]: 535 Incorrect authentication data (set_id=bamboo)
2025-06-14 08:49:48 dovecot_login authenticator failed for (localhost) [81.30.107.185]: 535 Incorrect authentication data (set_id=snap)
2025-06-14 08:50:00 dovecot_login authenticator failed for (localhost) [81.30.107.29]: 535 Incorrect authentication data (set_id=room)
2025-06-14 08:50:03 dovecot_login authenticator failed for (localhost) [81.30.107.109]: 535 Incorrect authentication data (set_id=pers)
2025-06-14 08:51:46 dovecot_login authenticator failed for (localhost) [81.30.107.49]: 535 Incorrect authentication data (set_id=cache2)
2025-06-14 08:52:04 dovecot_login authenticator failed for (localhost) [81.30.107.145]: 535 Incorrect authentication data (set_id=alimentacion)
2025-06-14 08:52:37 dovecot_login authenticator failed for (localhost) [81.30.107.33]: 535 Incorrect authentication data (set_id=jerbeau)
2025-06-14 08:52:41 dovecot_login authenticator failed for (localhost) [81.30.107.177]: 535 Incorrect authentication data (set_id=moh'd)
2025-06-14 08:52:50 dovecot_login authenticator failed for (WIN-GG8OTOFJUE1) [45.95.146.57]: 535 Incorrect authentication data (set_id=administrator)
2025-06-14 08:53:08 dovecot_login authenticator failed for (localhost) [81.30.107.189]: 535 Incorrect authentication data (set_id=root)
2025-06-14 08:54:08 dovecot_login authenticator failed for (localhost) [81.30.107.205]: 535 Incorrect authentication data (set_id=strikeou)
2025-06-14 08:54:28 dovecot_login authenticator failed for (localhost) [81.30.107.146]: 535 Incorrect authentication data (set_id=b1)
2025-06-14 08:54:49 dovecot_login authenticator failed for (localhost) [81.30.107.159]: 535 Incorrect authentication data (set_id=arzt)
2025-06-14 08:55:03 dovecot_login authenticator failed for (localhost) [81.30.107.174]: 535 Incorrect authentication data (set_id=bobbie)
2025-06-14 08:56:27 dovecot_login authenticator failed for (localhost) [81.30.107.24]: 535 Incorrect authentication data (set_id=mx)
2025-06-14 08:56:48 dovecot_login authenticator failed for (localhost) [81.30.107.21]: 535 Incorrect authentication data (set_id=amedina)
2025-06-14 08:57:02 dovecot_login authenticator failed for (localhost) [81.30.107.64]: 535 Incorrect authentication data (set_id=ex2)
2025-06-14 08:57:09 dovecot_login authenticator failed for (localhost) [81.30.107.89]: 535 Incorrect authentication data (set_id=eco)
2025-06-14 08:57:14 dovecot_login authenticator failed for (localhost) [81.30.107.43]: 535 Incorrect authentication data (set_id=bender)
2025-06-14 08:57:17 dovecot_login authenticator failed for (localhost) [81.30.107.130]: 535 Incorrect authentication data (set_id=eis)
2025-06-14 08:58:26 dovecot_login authenticator failed for (localhost) [81.30.107.149]: 535 Incorrect authentication data (set_id=gollum)
2025-06-14 08:58:29 dovecot_login authenticator failed for (localhost) [81.30.107.90]: 535 Incorrect authentication data (set_id=vpn1)
2025-06-14 08:59:33 dovecot_login authenticator failed for (localhost) [81.30.107.153]: 535 Incorrect authentication data (set_id=gollum)
2025-06-14 08:59:45 dovecot_login authenticator failed for (localhost) [81.30.107.115]: 535 Incorrect authentication data (set_id=jk)
2025-06-14 08:59:58 dovecot_login authenticator failed for (localhost) [81.30.107.160]: 535 Incorrect authentication data (set_id=w7)
2025-06-14 09:00:38 dovecot_login authenticator failed for (localhost) [81.30.107.121]: 535 Incorrect authentication data (set_id=lab2)
2025-06-14 09:00:47 dovecot_login authenticator failed for (localhost) [81.30.107.194]: 535 Incorrect authentication data (set_id=warehouse)
2025-06-14 09:01:26 dovecot_login authenticator failed for (localhost) [81.30.107.67]: 535 Incorrect authentication data (set_id=lele)
2025-06-14 09:03:25 dovecot_login authenticator failed for (localhost) [81.30.107.38]: 535 Incorrect authentication data (set_id=fixit)
2025-06-14 09:03:28 dovecot_login authenticator failed for (localhost) [81.30.107.142]: 535 Incorrect authentication data (set_id=phorum)
2025-06-14 09:03:34 dovecot_login authenticator failed for (localhost) [81.30.107.70]: 535 Incorrect authentication data (set_id=sysman)
2025-06-14 09:04:09 dovecot_login authenticator failed for (localhost) [81.30.107.168]: 535 Incorrect authentication data (set_id=lifeline)
2025-06-14 09:04:39 dovecot_login authenticator failed for (localhost) [81.30.107.29]: 535 Incorrect authentication data (set_id=clothing)
2025-06-14 09:06:11 dovecot_login authenticator failed for (localhost) [81.30.107.173]: 535 Incorrect authentication data (set_id=theresa)
2025-06-14 09:06:16 dovecot_login authenticator failed for (localhost) [81.30.107.201]: 535 Incorrect authentication data (set_id=cpanel.api)
2025-06-14 09:06:39 dovecot_login authenticator failed for (localhost) [81.30.107.189]: 535 Incorrect authentication data (set_id=rsd)
2025-06-14 09:06:52 dovecot_login authenticator failed for (localhost) [81.30.107.185]: 535 Incorrect authentication data (set_id=sauve)
2025-06-14 09:07:33 dovecot_login authenticator failed for (localhost) [81.30.107.40]: 535 Incorrect authentication data (set_id=olga1234)
2025-06-14 09:07:47 dovecot_login authenticator failed for (localhost) [81.30.107.145]: 535 Incorrect authentication data (set_id=ecard)
2025-06-14 09:08:50 dovecot_login authenticator failed for (localhost) [81.30.107.104]: 535 Incorrect authentication data (set_id=agenda)
2025-06-14 09:09:08 dovecot_login authenticator failed for (localhost) [81.30.107.49]: 535 Incorrect authentication data (set_id=alumno)
2025-06-14 09:09:53 dovecot_login authenticator failed for (localhost) [81.30.107.177]: 535 Incorrect authentication data (set_id=kindle)
2025-06-14 09:10:31 dovecot_login authenticator failed for (localhost) [81.30.107.64]: 535 Incorrect authentication data (set_id=seas)
2025-06-14 09:10:32 dovecot_login authenticator failed for (localhost) [81.30.107.159]: 535 Incorrect authentication data (set_id=subs)
2025-06-14 09:10:32 dovecot_login authenticator failed for (localhost) [81.30.107.174]: 535 Incorrect authentication data (set_id=moviegalls1)
2025-06-14 09:10:38 dovecot_login authenticator failed for (localhost) [81.30.107.33]: 535 Incorrect authentication data (set_id=range)
2025-06-14 09:10:44 dovecot_login authenticator failed for (localhost) [81.30.107.109]: 535 Incorrect authentication data (set_id=florida)
2025-06-14 09:11:33 dovecot_login authenticator failed for (localhost) [81.30.107.136]: 535 Incorrect authentication data (set_id=agusia)
2025-06-14 09:12:22 dovecot_login authenticator failed for (localhost) [81.30.107.89]: 535 Incorrect authentication data (set_id=oes)
2025-06-14 09:12:39 dovecot_login authenticator failed for (localhost) [81.30.107.24]: 535 Incorrect authentication data (set_id=cpc)
2025-06-14 09:13:17 dovecot_login authenticator failed for (localhost) [81.30.107.90]: 535 Incorrect authentication data (set_id=cristi)
2025-06-14 09:13:40 dovecot_login authenticator failed for (localhost) [81.30.107.195]: 535 Incorrect authentication data (set_id=money)
2025-06-14 09:13:53 dovecot_login authenticator failed for (localhost) [81.30.107.94]: 535 Incorrect authentication data (set_id=querytype)
2025-06-14 09:14:29 dovecot_login authenticator failed for (localhost) [81.30.107.149]: 535 Incorrect authentication data (set_id=praise)
2025-06-14 09:14:42 dovecot_login authenticator failed for (localhost) [81.30.107.130]: 535 Incorrect authentication data (set_id=edwin)
2025-06-14 09:15:08 dovecot_login authenticator failed for (WIN-GG8OTOFJUE1) [45.95.146.57]: 535 Incorrect authentication data (set_id=administrator)
2025-06-14 09:15:35 dovecot_login authenticator failed for (localhost) [81.30.107.146]: 535 Incorrect authentication data (set_id=dvd)
2025-06-14 09:15:40 dovecot_login authenticator failed for (localhost) [81.30.107.121]: 535 Incorrect authentication data (set_id=success1)
2025-06-14 09:15:56 dovecot_login authenticator failed for (localhost) [81.30.107.153]: 535 Incorrect authentication data (set_id=srvc33)
2025-06-14 09:15:57 dovecot_login authenticator failed for (localhost) [81.30.107.119]: 535 Incorrect authentication data (set_id=mig)
2025-06-14 09:16:34 dovecot_login authenticator failed for (localhost) [81.30.107.125]: 535 Incorrect authentication data (set_id=avaya)
2025-06-14 09:16:52 dovecot_login authenticator failed for (localhost) [81.30.107.194]: 535 Incorrect authentication data (set_id=pc4)
2025-06-14 09:17:25 dovecot_login authenticator failed for (localhost) [81.30.107.21]: 535 Incorrect authentication data (set_id=nani)
2025-06-14 09:17:39 dovecot_login authenticator failed for (localhost) [81.30.107.43]: 535 Incorrect authentication data (set_id=s200c319)
2025-06-14 09:18:25 dovecot_login authenticator failed for (localhost) [81.30.107.142]: 535 Incorrect authentication data (set_id=venezuela)
2025-06-14 09:18:30 dovecot_login authenticator failed for (localhost) [81.30.107.160]: 535 Incorrect authentication data (set_id=annalisa)
2025-06-14 09:18:45 dovecot_login authenticator failed for (localhost) [81.30.107.67]: 535 Incorrect authentication data (set_id=oj)

please somebody help me , im unable to send any email from any domain, even im try on wordpress site and testing SMTP getting gateway error. [504 Gateway Time-out.]

Hi @pashaali

How are you configuring it (what data are you using)?

Try to send a new mail and show the relevant lines in your web log and in Exim’s mainlog.

2 Likes
  • Check with your hosting provider if SMTP ports (especially Port 25, 465, or 587) are being blocked. Many hosting providers block port 25 to prevent spam and abuse. Port 587 is commonly used for secure email sending, so you might want to confirm that it’s open.
  • Double-check the SMTP server settings in your PHP script. Ensure you’re using the correct SMTP server address, port, and encryption method (TLS or SSL). Also, verify the username and password if authentication is required.

Verify that the SMTP server (e.g., smtp.yourdomain.com) is properly configured and accepting external connections. You can test the connection using tools like Telnet or OpenSSL:

telnet smtp.yourdomain.com 587