Multiple interfaces

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple interfaces

Patrik
​​
Ciao!
How are you?

​​
Problem:
I need 2 interfaces, because the fast ISP blocks 25 port, the slower is open.
​​
I can telnet with the required interface:
telnet -b 192.168.81.20 alt2.gmail-smtp-in.l.google.com 25

​The wrong is not working
​​root@server:/etc/postfix# telnet -b 192.168.78.20 alt2.gmail-smtp-in.l.google.com 25 
Trying 74.125.68.27...
telnet: Unable to connect to remote host: Connection refused
root@server:/etc/postfix# 

Correct interface w​
Works:
Trying 74.125.68.27...
Connected to alt2.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP q14si1562820plk.485 - gsmtp

​I got the right settings:
smtp      inet  n       -       y       -       -       smtpd
  -o content_filter=spamassassin
​​
  -o smtp_bind_address=192.168.81.1

submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
​​
  -o smtp_bind_address=192.168.81.1
smtps     inet  n       -       y       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
​​
  -o smtp_bind_address=192.168.81.1

​Still, I get this error:
​Jun 07 13:19:01 server postfix/smtp[10823]: connect to gmail-smtp-in.l.google.com[74.125.133.27]:25: Connection refused
Jun 07 13:19:01 server postfix/smtp[10824]: connect to gmail-smtp-in.l.google.com[74.125.133.27]:25: Connection refused
Jun 07 13:19:01 server postfix/smtp[10824]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1a]:25: Network is unreachable
Jun 07 13:19:01 server postfix/smtp[10824]: connect to alt1.gmail-smtp-in.l.google.com[2a00:1450:4010:c0f::1b]:25: Network is unreachable
Jun 07 13:19:02 server postfix/smtp[10824]: connect to alt1.gmail-smtp-in.l.google.com[108.177.14.27]:25: Connection refused
Jun 07 13:19:03 server postfix/smtp[10824]: connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused
Jun 07 13:19:03 server postfix/smtp[10824]: AF506340194: to=<[hidden email]>, relay=none, delay=591, delays=586/0.01/5.4/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused)
Jun 07 13:19:04 server postfix/smtp[10823]: connect to alt1.gmail-smtp-in.l.google.com[108.177.14.27]:25: Connection refused
Jun 07 13:19:04 server postfix/smtp[10823]: connect to alt1.gmail-smtp-in.l.google.com[2a00:1450:4010:c0f::1b]:25: Network is unreachable
Jun 07 13:19:05 server postfix/smtp[10823]: connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused
Jun 07 13:19:05 server postfix/smtp[10823]: C625334017A: to=<[hidden email]>, relay=none, delay=12983, delays=12976/0.01/7.4/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused)

​The settings are correct, why I get connection refused?
If you know, thanks so much!
Ciao!


Patrik
WWW | GitHub | NPM | Corifeus | +36 20 342 8046



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple interfaces

Noel Jones-2
On 6/7/2017 6:22 AM, Patrik wrote:

> *
> ​I got the right settings:

No, you must set smtp_bind_address on an smtp transport or in
main.cf, not an smtpd listener.


> *
> ​
> smtp      inet  n       -       y       -       -       smtpd
> submission inet n       -       y       -       -       smtpd
> smtps     inet  n       -       y       -       -       smtpd


These are all smtpd listeners for incoming connections, and have
nothing to do with outgoing.  Note the smtpd at the end of the above
lines.   You need to change the line that ends with smtp, or put
smtp_bind_address in main.cf.




  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple interfaces

Patrik
OK, thanks so much for helping with! I will test it out tomorrow!

Ciao!


On 06/07/2017 06:20 PM, Noel Jones wrote:

> On 6/7/2017 6:22 AM, Patrik wrote:
>
>> *
>> ​I got the right settings:
> No, you must set smtp_bind_address on an smtp transport or in
> main.cf, not an smtpd listener.
>
>
>> *
>> ​
>> smtp      inet  n       -       y       -       -       smtpd
>> submission inet n       -       y       -       -       smtpd
>> smtps     inet  n       -       y       -       -       smtpd
>
> These are all smtpd listeners for incoming connections, and have
> nothing to do with outgoing.  Note the smtpd at the end of the above
> lines.   You need to change the line that ends with smtp, or put
> smtp_bind_address in main.cf.
>
>
>
>
>    -- Noel Jones

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple interfaces

Patrik
In reply to this post by Noel Jones-2

Hi!

How are you? So more question!

So just add smtp_bind_address=192.168.81.1 or 192.168.78.20 into main.cf and that's it?

I was totally wrong on the master.cf ?

I got it i was using the incoming instead of outgoing right?

I just use for my home network and I still dont get it which line change exactly?

It is somewhere here in master.cf or somewhere in main.cf?
smtp      inet  n       -       y       -       -       smtpd
  -o content_filter=spamassassin
  -o smtp_bind_address=192.168.81.1

#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o smtp_bind_address=192.168.81.1
smtps     inet  n       -       y       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o smtp_bind_address=192.168.81.1

On 06/07/2017 06:20 PM, Noel Jones wrote:
On 6/7/2017 6:22 AM, Patrik wrote:

*
​I got the right settings:
No, you must set smtp_bind_address on an smtp transport or in
main.cf, not an smtpd listener.


*
​
smtp      inet  n       -       y       -       -       smtpd
submission inet n       -       y       -       -       smtpd
smtps     inet  n       -       y       -       -       smtpd

These are all smtpd listeners for incoming connections, and have
nothing to do with outgoing.  Note the smtpd at the end of the above
lines.   You need to change the line that ends with smtp, or put
smtp_bind_address in main.cf.




  -- Noel Jones

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple interfaces

Noel Jones-2
On 6/7/2017 11:34 AM, Patrik Laszlo wrote:
> *Hi!*
>
> *How are you? So more question! **
> *
>
> *So just add smtp_bind_address=192.168.81.1 or 192.168.78.20 into
> main.cf and that's it?*

Yes, just put it in main.cf



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple interfaces

Patrik
You are a SUPER GOD!!!!

THANKS SO MUCH!


On 06/07/2017 06:41 PM, Noel Jones wrote:

> On 6/7/2017 11:34 AM, Patrik Laszlo wrote:
>> *Hi!*
>>
>> *How are you? So more question! **
>> *
>>
>> *So just add smtp_bind_address=192.168.81.1 or 192.168.78.20 into
>> main.cf and that's it?*
> Yes, just put it in main.cf
>
>
>
>    -- Noel Jones

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple interfaces

Noel Jones-2
On 6/7/2017 12:04 PM, Patrik Laszlo wrote:
> You are a SUPER GOD!!!!

Nah, some clever guy wrote a man page I was fortunate enough to have
time to read several times.  Check it out:
http://www.postfix.org/documentation.html


>
> THANKS SO MUCH!

You're welcome. Pass it on.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Multiple interfaces

Arthur E. Johnston
In reply to this post by Patrik

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Patrik
Sent: Wednesday, June 07, 2017 4:23 AM
To: [hidden email]
Subject: Multiple interfaces

 

​​

Ciao!
How are you?

​​

Problem:
I need 2 interfaces, because the fast ISP blocks 25 port, the slower is open.

​​

I can telnet with the required interface:
telnet -b 192.168.81.20 alt2.gmail-smtp-in.l.google.com 25

The wrong is not working

​​root@server:/etc/postfix# telnet -b 192.168.78.20 alt2.gmail-smtp-in.l.google.com 25 

Trying 74.125.68.27...

telnet: Unable to connect to remote host: Connection refused

root@server:/etc/postfix# 

 

Correct interface w

Works:
Trying 74.125.68.27...
Connected to alt2.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP q14si1562820plk.485 - gsmtp

 

I got the right settings:

smtp      inet  n       -       y       -       -       smtpd

  -o content_filter=spamassassin

​​

  -o smtp_bind_address=192.168.81.1

 

submission inet n       -       y       -       -       smtpd

  -o syslog_name=postfix/submission

  -o smtpd_tls_security_level=encrypt

  -o smtpd_sasl_auth_enable=yes

  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

​​

  -o smtp_bind_address=192.168.81.1

smtps     inet  n       -       y       -       -       smtpd

  -o syslog_name=postfix/smtps

  -o smtpd_tls_wrappermode=yes

  -o smtpd_sasl_auth_enable=yes

  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

​​

  -o smtp_bind_address=192.168.81.1

 

Still, I get this error:

Jun 07 13:19:01 server postfix/smtp[10823]: connect to gmail-smtp-in.l.google.com[74.125.133.27]:25: Connection refused

Jun 07 13:19:01 server postfix/smtp[10824]: connect to gmail-smtp-in.l.google.com[74.125.133.27]:25: Connection refused

Jun 07 13:19:01 server postfix/smtp[10824]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c07::1a]:25: Network is unreachable

Jun 07 13:19:01 server postfix/smtp[10824]: connect to alt1.gmail-smtp-in.l.google.com[2a00:1450:4010:c0f::1b]:25: Network is unreachable

Jun 07 13:19:02 server postfix/smtp[10824]: connect to alt1.gmail-smtp-in.l.google.com[108.177.14.27]:25: Connection refused

Jun 07 13:19:03 server postfix/smtp[10824]: connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused

Jun 07 13:19:03 server postfix/smtp[10824]: AF506340194: to=<[hidden email]>, relay=none, delay=591, delays=586/0.01/5.4/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused)

Jun 07 13:19:04 server postfix/smtp[10823]: connect to alt1.gmail-smtp-in.l.google.com[108.177.14.27]:25: Connection refused

Jun 07 13:19:04 server postfix/smtp[10823]: connect to alt1.gmail-smtp-in.l.google.com[2a00:1450:4010:c0f::1b]:25: Network is unreachable

Jun 07 13:19:05 server postfix/smtp[10823]: connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused

Jun 07 13:19:05 server postfix/smtp[10823]: C625334017A: to=<[hidden email]>, relay=none, delay=12983, delays=12976/0.01/7.4/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.68.27]:25: Connection refused)

 

The settings are correct, why I get connection refused?

If you know, thanks so much!

Ciao!

 

 

Patrik

WWW | GitHub | NPM | Corifeus | +36 20 342 8046

 

 

 

Have not tried it myself.  But try using port 587 and TLS. 

All of my research suggests this is the resolution and that Gmail has blocked port 25, and requires TLS.

 

Arthur Johnston

 



Loading...