LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-25-2020, 02:03 PM   #1
InvalidUserName
LQ Newbie
 
Registered: Mar 2020
Posts: 2

Rep: Reputation: Disabled
Postfix: Connection refused when sending to smart host


Hello!

I am currently setting up my new mail server at home using postfix and dovecot. The server is connected to the Internet via DSL, i.e. with a dynamic IP. Therefore I got postfix up and running using several smart hosts with the sender dependent auth to forward e-mails to two different mail providers.

However, I just cannot get postfix to send out the e-mails. All mails are just piling up in mailq with status deferred. Unfortunately, mail.log is rather uninformative showing not more than "Connection refused".

Here is the terribly unhelpful mail.log:

Code:
607FC1FF8A: from=<user2@example2>, size=599, nrcpt=1 (queue active)
connect to mailgateway.provider[xx.xx.xx.xx]:25: Connection refused
607FC1FF8A: to=<xyz@gmail.com>, relay=none, delay=1174, delays=1174/0.02/0.49/0, dsn=4.4.1, status=deferred (connect to mailgateway.provider[xx.xx.xx.xx]:25: Connection refused)
My provider offers (S)SMTP via port 465 or TLS via 25. Going to port 465 I got back the following

Code:
SMTPS wrappermode (TCP port 465) requires setting "smtp_tls_wrappermode = yes", and "smtp_tls_security_level = encrypt" (or stronger)
connect to mailgateway.provider[xx.xx.xx.xx]:465: Connection refused
Setting smtp_tls_wrappermode and smtp_tls_security accordingly at main.cf of postfix and I am back to
Code:
connect to mailgateway.provider[xx.xx.xx.xx]:465: Connection refused
Doing a openssl s_client -crlf -connect provider:465 runs through without any issues, doing openssl s_client -crlf -connect provider:25 returns
Code:
139950738130048:error:0200206F:system library:connect:Connection refused:../crypto/bio/b_sock2.c:110:
139950738130048:error:2008A067:BIO routines:BIO_connect:connect error:../crypto/bio/b_sock2.c:111:connect:errno=111
I first thought I had some issues with postfix, but then I found a post suggesting to remove "noplaintext" from smtp_sasl_security_options in main.cf of postfix. That did the trick for the other mail provider but does not turn things with the (main) provider above.

At the same time, I can send e-mails from my computer to the very same mail provider directly via Thunderbird using port 465. At the server, I did not (yet) set up any iptables and there should be nothing else blocking access. Adresses are being mapped from local to the real ones by postfix.

I wish I could provide more log files or at least some with more info, but that is all I got myself.

Appreciate any bit of advice because I really do not know what to do now.
Thank you all in advance.
 
Old 03-26-2020, 05:59 AM   #2
InvalidUserName
LQ Newbie
 
Registered: Mar 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Solved it. There was an issue with the VPN.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Postfix/smtp] 25 connection refused / connection timed out wewanwang Linux - Server 2 12-22-2014 01:14 AM
udevadm(13611) error sending message:connection refused pixo Mandriva 1 05-01-2011 03:46 PM
IOException in sending Request :: Connection refused IN oracle crahuldba@gmail.com Linux - Software 1 10-19-2010 07:36 AM
Sending mails thru Sendmail - Deferred: Connection refused by [any_host] branislav.zvarik Linux - Software 9 05-21-2009 03:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration