Bug 1506803 - (network-online.target) Use network-online.target instead of network.target
Summary: (network-online.target) Use network-online.target instead of network.target
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: mimedefang
Version: 26
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: network-online.target
TreeView+ depends on / blocked
 
Reported: 2017-10-26 19:38 UTC by Philip Prindeville
Modified: 2018-05-29 12:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 12:18:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Philip Prindeville 2017-10-26 19:38:14 UTC
Description of problem:

If your network is slow coming up (say you're using DHCP and the server is unavailable or rebooting after a power outage, etc) then this service might come up before the network is sufficiently configured.

Recommend adding

[Unit]
Wants=network-online.target
After=network-online.target

to .service file.

Version-Release number of selected component (if applicable):

mimedefang-2.82-1.fc26.x86_64

How reproducible:

Bring up host while DHCP server is down.

Steps to Reproduce:
1. Provision host to use DHCP
2. Shutdown DHCP server
3. Reboot host under test

Actual results:

Service requires host's IP address and hostname to properly operate

Expected results:

Service should not be started until network is adequately configured.

Additional info:

Comment 1 Robert Scheck 2017-10-26 23:05:57 UTC
Can you please outline specific errors that you are seeing?

Comment 2 Philip Prindeville 2017-10-26 23:27:31 UTC
(In reply to Robert Scheck from comment #1)
> Can you please outline specific errors that you are seeing?

It's not that simple: a lot depends on the user-defined tests that are done in mimedefang-filter.

One of the things we test for, as an example, is someone saying:

EHLO <my-hostname-here>

or:

EHLO [<my-ip-address-here>]

as a way to try to trick us into believing it's locally originating email.

And I use Net::Interface->interfaces() to detect my interfaces (including loopback) and then ...->address(AF_INET) to get their IPv4 addresses.

Similarly, any host that claims to be in the local domain but isn't on the local subnet gets REJECT'd.

Comment 3 Robert Scheck 2017-10-26 23:40:10 UTC
(In reply to Philip Prindeville from comment #2)
> It's not that simple: a lot depends on the user-defined tests that are done
> in mimedefang-filter.

If it requires user-defined tests, it's the user's responsibility to add a
systemd drop-in for mimedefang, too. The default configuration can not catch
any scenario out there.

Comment 4 Philip Prindeville 2017-10-27 00:03:40 UTC
(In reply to Philip Prindeville from comment #2)

> Similarly, any host that claims to be in the local domain but isn't on the
> local subnet gets REJECT'd.

Well, unless they're using SMTP/TLS and they've authenticated a username, otherwise cell phones and laptops on remote Wifi wouldn't work.

Comment 5 Philip Prindeville 2017-10-27 00:05:06 UTC
(In reply to Robert Scheck from comment #3)

> If it requires user-defined tests, it's the user's responsibility to add a
> systemd drop-in for mimedefang, too. The default configuration can not catch
> any scenario out there.

Knowing your IP, host name, and domain name are not exotic requirements for a mimedefang filter.

And what happens when upstream starts pre-packaging similar tests?

Comment 6 Robert Scheck 2017-10-29 21:33:25 UTC
From personal my point of view, DHCP in a server environment is just
semi-professional. And while you have a non-working DHCP, I personally
would not care about a non-working MIMEDefang, because there is anyway
not really IP connectivity (lack of IP due to no DHCP), right? Based
on DHCP, the dynamic tests anyway need to happen on each e-mail, as,
when using DHCP, there could be a new IP address. Just doing the stuff
once after startup doesn't do the trick (similar for IPv6 SLAAC).

Currently, I am not aware that the standard configuration of MIMEDefang
leads to any problems with network.target rather network-online.target.
In case upstream adds such tests, this might be changed downstream as
well, but I do not see a need to force everybody to network-online.target
while not everybody has dynamic tests.

Comment 7 Philip Prindeville 2017-10-29 22:29:15 UTC
(In reply to Robert Scheck from comment #6)
> From personal my point of view, DHCP in a server environment is just
> semi-professional. And while you have a non-working DHCP, I personally
> would not care about a non-working MIMEDefang, because there is anyway
> not really IP connectivity (lack of IP due to no DHCP), right?

Not quite.  Because when the DHCP server does come up, Sendmail will
start running and messages will start arriving, but MIMEdefang won't
have relearned the correct settings.

> Based
> on DHCP, the dynamic tests anyway need to happen on each e-mail, as,
> when using DHCP, there could be a new IP address. Just doing the stuff
> once after startup doesn't do the trick (similar for IPv6 SLAAC).

No, that's too much overhead.  You only need to restart MIMEdefang
when you detect (via DHCP) that your settings have changed.

> Currently, I am not aware that the standard configuration of MIMEDefang
> leads to any problems with network.target rather network-online.target.
> In case upstream adds such tests, this might be changed downstream as
> well, but I do not see a need to force everybody to network-online.target
> while not everybody has dynamic tests.

What is the negative impact to anyone in using network-online.target instead?

Comment 8 Robert Scheck 2017-10-29 22:38:31 UTC
(In reply to Philip Prindeville from comment #7)
> No, that's too much overhead.  You only need to restart MIMEdefang
> when you detect (via DHCP) that your settings have changed.

This suggestion IMHO only applies for legacy IP, not for IPv6 (SLAAC).

> What is the negative impact to anyone in using network-online.target instead?

Startup is unnecessarily delayed in general, while it only is necessary
in specific cases like yours.

Comment 9 Philip Prindeville 2017-10-29 22:40:55 UTC
(In reply to Robert Scheck from comment #8)
> Startup is unnecessarily delayed in general, while it only is necessary
> in specific cases like yours.

How much delay are we talking about?

Comment 10 Fedora End Of Life 2018-05-03 07:58:44 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2018-05-29 12:18:56 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.