Discussion:
Problem with postfix and ssh tunnel
(too old to reply)
William Unruh
2024-04-30 03:36:03 UTC
Permalink
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.

autossh -M0 -nNT -L 1097:CC:25 CC

In postfix transport I have

* smtp:localhost:1097

As I say this has worked not for a long time. Suddenly it stopped
working last week.

I sent a testmail from AA to my account on CC.
I get the following error messages

Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/cleanup[621154]: D963C1054F1: message-id=<444a3cbf-c530-b383-526e-***@physics.ubc.ca>
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: from=<***@physics.ubc.ca>, size=417, nrcpt=1 (queue active)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/smtp[621157]: D963C1054F1: to=<***@physics.ubc.ca>, relay=none, delay=0.12, delays=0.07/0.01/0.04/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=localhost type=A: Host not found)
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed


The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
I sent.
David W. Hodgins
2024-04-30 14:42:19 UTC
Permalink
Post by William Unruh
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.
autossh -M0 -nNT -L 1097:CC:25 CC
In postfix transport I have
* smtp:localhost:1097
As I say this has worked not for a long time. Suddenly it stopped
working last week.
I sent a testmail from AA to my account on CC.
I get the following error messages
Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed
The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
Has /etc/hosts been deleted or lost due to an i/o error?

Regards, Dave Hodgins
William Unruh
2024-04-30 15:36:44 UTC
Permalink
Post by David W. Hodgins
Post by William Unruh
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.
autossh -M0 -nNT -L 1097:CC:25 CC
In postfix transport I have
* smtp:localhost:1097
As I say this has worked not for a long time. Suddenly it stopped
working last week.
I sent a testmail from AA to my account on CC.
I get the following error messages
Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed
The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
Has /etc/hosts been deleted or lost due to an i/o error?
Nope. There is an /etc/hosts and a /var/spool/postfix/etc/hosts files
both the same, both containing 127.0.0.1 localhost entries.
(in fact both identical). and both readable by UGO.

And host.conf contains
order hosts,bind
multi on
in both locations.

I have no idea where that message is coming from, Whether from AA or CC.
But both have good /etc/hosts
Post by David W. Hodgins
Regards, Dave Hodgins
David W. Hodgins
2024-04-30 17:55:49 UTC
Permalink
Post by William Unruh
Post by David W. Hodgins
Post by William Unruh
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.
autossh -M0 -nNT -L 1097:CC:25 CC
In postfix transport I have
* smtp:localhost:1097
As I say this has worked not for a long time. Suddenly it stopped
working last week.
I sent a testmail from AA to my account on CC.
I get the following error messages
Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed
The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
Has /etc/hosts been deleted or lost due to an i/o error?
Nope. There is an /etc/hosts and a /var/spool/postfix/etc/hosts files
both the same, both containing 127.0.0.1 localhost entries.
(in fact both identical). and both readable by UGO.
And host.conf contains
order hosts,bind
multi on
in both locations.
I have no idea where that message is coming from, Whether from AA or CC.
But both have good /etc/hosts
What is the output of "systemctl status resolvconf.service"?

Regards, Dave Hodgins
William Unruh
2024-04-30 19:39:56 UTC
Permalink
Post by David W. Hodgins
Post by William Unruh
Post by David W. Hodgins
Post by William Unruh
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.
autossh -M0 -nNT -L 1097:CC:25 CC
In postfix transport I have
* smtp:localhost:1097
As I say this has worked not for a long time. Suddenly it stopped
working last week.
I sent a testmail from AA to my account on CC.
I get the following error messages
Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed
The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
Has /etc/hosts been deleted or lost due to an i/o error?
Nope. There is an /etc/hosts and a /var/spool/postfix/etc/hosts files
both the same, both containing 127.0.0.1 localhost entries.
(in fact both identical). and both readable by UGO.
And host.conf contains
order hosts,bind
multi on
in both locations.
I have no idea where that message is coming from, Whether from AA or CC.
But both have good /etc/hosts
What is the output of "systemctl status resolvconf.service"?
Regards, Dave Hodgins
tunnel:0[unruh]>systemctl status resolvconf
● resolvconf.service - LSB: Nameserver information manager
Loaded: loaded (/etc/rc.d/init.d/resolvconf; generated)
Active: active (exited) since Sun 2024-04-21 21:44:58 PDT; 1 week 1 day ago
Docs: man:systemd-sysv-generator(8)
Process: 880 ExecStart=/etc/rc.d/init.d/resolvconf start (code=exited, status=0/SUCCES>
CPU: 63ms

Apr 21 21:44:57 CC.physics.ubc.ca systemd[1]: Starting LSB: Nameserver information man>
Apr 21 21:44:58 CC.physics.ubc.ca resolvconf[880]: Starting resolvconf: /etc/init.d/fu>
Apr 21 21:44:58 CC.physics.ubc.ca resolvconf[880]: [ OK ]
Apr 21 21:44:58 CC.physics.ubc.ca systemd[1]: Started LSB: Nameserver information mana



By the way, how do I stop the pager for systemctl and journalctl to stop
truncating instead of folding the lines that it prints out?
William Unruh
2024-05-01 02:26:14 UTC
Permalink
It is getting weirder. I have two machine CC and DD both behind a
wireless router. Both use the same address on an ssh tunnel to get
through to the server.

One of them has the problem with localhost, but the messages now are
geting through to the recipient. The othr one has no problem with
localhost, but gets delivered to a different mail gateway at the
university.
ssh tunnels
AA--1098--\ _______NN
\___________O___25__CC /
~~~~~~~~~~~U \_______EE
BB--1098--/
End of Mail relays
tunnel
Both machines AA an BB have an ssh tunnel which has port localhost:1098 on both
machines and the other end of the tunnels both deliver to port 25 on the server CC. Then CC send the
messages to two different mail-relays, which behave it seems very
differently. The one attached to AA (NN) sends back a message that it
cannot find localhost (at least that is what I assume it is doing)
but then delivers the mail to where it is supposed to go.
the one that BB gets its mail sent to (EE), does not seem to answer at
all, and a error message get sent that the Connection timed out, and it
EE keeps doing that.

And yet, I have made AA and BB as alike as I can. (I may have missed
something, but have no idea what).
Post by William Unruh
Post by David W. Hodgins
Post by William Unruh
Post by David W. Hodgins
Post by William Unruh
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.
autossh -M0 -nNT -L 1097:CC:25 CC
In postfix transport I have
* smtp:localhost:1097
As I say this has worked not for a long time. Suddenly it stopped
working last week.
I sent a testmail from AA to my account on CC.
I get the following error messages
Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed
The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
Has /etc/hosts been deleted or lost due to an i/o error?
Nope. There is an /etc/hosts and a /var/spool/postfix/etc/hosts files
both the same, both containing 127.0.0.1 localhost entries.
(in fact both identical). and both readable by UGO.
And host.conf contains
order hosts,bind
multi on
in both locations.
I have no idea where that message is coming from, Whether from AA or CC.
But both have good /etc/hosts
What is the output of "systemctl status resolvconf.service"?
Regards, Dave Hodgins
tunnel:0[unruh]>systemctl status resolvconf
● resolvconf.service - LSB: Nameserver information manager
Loaded: loaded (/etc/rc.d/init.d/resolvconf; generated)
Active: active (exited) since Sun 2024-04-21 21:44:58 PDT; 1 week 1 day ago
Docs: man:systemd-sysv-generator(8)
Process: 880 ExecStart=/etc/rc.d/init.d/resolvconf start (code=exited, status=0/SUCCES>
CPU: 63ms
Apr 21 21:44:57 CC.physics.ubc.ca systemd[1]: Starting LSB: Nameserver information man>
Apr 21 21:44:58 CC.physics.ubc.ca resolvconf[880]: Starting resolvconf: /etc/init.d/fu>
Apr 21 21:44:58 CC.physics.ubc.ca resolvconf[880]: [ OK ]
Apr 21 21:44:58 CC.physics.ubc.ca systemd[1]: Started LSB: Nameserver information mana
By the way, how do I stop the pager for systemctl and journalctl to stop
truncating instead of folding the lines that it prints out?
David W. Hodgins
2024-05-01 03:47:47 UTC
Permalink
Post by William Unruh
Post by David W. Hodgins
Post by William Unruh
Post by David W. Hodgins
Post by William Unruh
I have a machine AA which is outside a firewall of machine CC. for the
past 10 years I have been running an ssh tunnel to CC, and sending my
mail to CC as a relay.
autossh -M0 -nNT -L 1097:CC:25 CC
In postfix transport I have
* smtp:localhost:1097
As I say this has worked not for a long time. Suddenly it stopped
working last week.
I sent a testmail from AA to my account on CC.
I get the following error messages
Apr 29 16:38:02 AA postfix/pickup[621062]: D963C1054F1: uid=1000 from=<unruh>
Apr 29 16:38:02 AA postfix/discard[621158]: warning: unexpected attribute nrequest from bounce socket (expecting: flags)
Apr 29 16:38:02 AA postfix/discard[621158]: warning: deliver_request_get: error receiving common attributes
Apr 29 16:38:02 AA postfix/qmgr[621063]: D963C1054F1: removed
The line "Host or domain name not found. Name service error for
name=localhost type=A: Host not found)" I find weird. Why and what is
trying to find localhost . localhost is not a part of the email message
Has /etc/hosts been deleted or lost due to an i/o error?
Nope. There is an /etc/hosts and a /var/spool/postfix/etc/hosts files
both the same, both containing 127.0.0.1 localhost entries.
(in fact both identical). and both readable by UGO.
And host.conf contains
order hosts,bind
multi on
in both locations.
I have no idea where that message is coming from, Whether from AA or CC.
But both have good /etc/hosts
What is the output of "systemctl status resolvconf.service"?
Regards, Dave Hodgins
tunnel:0[unruh]>systemctl status resolvconf
● resolvconf.service - LSB: Nameserver information manager
Loaded: loaded (/etc/rc.d/init.d/resolvconf; generated)
Active: active (exited) since Sun 2024-04-21 21:44:58 PDT; 1 week 1 day ago
Docs: man:systemd-sysv-generator(8)
Process: 880 ExecStart=/etc/rc.d/init.d/resolvconf start (code=exited, status=0/SUCCES>
CPU: 63ms
Apr 21 21:44:57 CC.physics.ubc.ca systemd[1]: Starting LSB: Nameserver information man>
Apr 21 21:44:58 CC.physics.ubc.ca resolvconf[880]: Starting resolvconf: /etc/init.d/fu>
Apr 21 21:44:58 CC.physics.ubc.ca resolvconf[880]: [ OK ]
Apr 21 21:44:58 CC.physics.ubc.ca systemd[1]: Started LSB: Nameserver information mana
By the way, how do I stop the pager for systemctl and journalctl to stop
truncating instead of folding the lines that it prints out?
Add the options "-l --no-pager".

Regards, Dave Hodgins

Loading...