Fetchmail server does not work with systemd

Bug #1683142 reported by Tim Ritberg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fetchmail (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Daemon not started.
Ubuntu 16.04
Fetchmail 6.3.26-2
No error log.

Revision history for this message
Matthias Andree (matthias-andree) wrote : Re: [Bug 1683142] [NEW] Fetchmail server does not work with systemd

Am 16. April 2017 15:23:45 MESZ schrieb Tim Ritberg <email address hidden>:
>Public bug reported:
>
>Daemon not started.
>Ubuntu 16.04
>Fetchmail 6.3.26-2
>No error log.
>
>** Affects: fetchmail (Ubuntu)
> Importance: Undecided
> Status: New
>
>--
>You received this bug notification because you are subscribed to
>fetchmail in Ubuntu.
>https://bugs.launchpad.net/bugs/1683142
>
>Title:
> Fetchmail server does not work with systemd
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/ubuntu/+source/fetchmail/+bug/1683142/+subscriptions

This is a distribution specific bug,
please report this to Ubuntu.

Revision history for this message
Matthias Andree (matthias-andree) wrote :

Whoops. I had misread this BR, on a smartphone, as though it had been filed through sourceforge, but of course it's right here on launchpad.

Be sure to check if you've enabled START_DAEMON in the corresponding /etc/default/fetchmail file, and if that was already set, be sure to check the relevant logs for errors. Common causes of errors are permissions on the fetchmailrc file (these are required to be very restrictive), misconfiguration (syntax errors) and, of course, run-time errors.

To figure out the details, see https://wiki.ubuntu.com/SystemdForUpstartUsers#Commands to view the logs (check the systemd column).

Revision history for this message
Tim Ritberg (xpert-reactos) wrote :

/etc/default/fetchmail is correct.
fetchmailrc has -rw-------

Revision history for this message
Joshua Powers (powersj) wrote :

Thank you for taking the time to file a bug report.

As Matthias has already laid out can you please give some more details.
Getting any details from syslog or systemctl status fetchmail would at
least provide more information as to why you think the daemon is not
started. Also getting some information on your configuration would
potentially reproduce the issue.

Since there is not enough information in your report to begin triage or
to differentiate between a local configuration problem and a bug in
Ubuntu, I am marking this bug as "Incomplete". We would be grateful if
you would: provide a more complete description of the problem, explain
why you believe this is a bug in Ubuntu rather than a problem specific
to your system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in fetchmail (Ubuntu):
status: New → Incomplete
Revision history for this message
Tim Ritberg (xpert-reactos) wrote :

Fetchmail is working after reboot. Then later fetchmail stops working. Service command to restart it print success but binary was not loaded.

Revision history for this message
Matthias Andree (matthias-andree) wrote : Re: [Bug 1683142] Re: Fetchmail server does not work with systemd

Tim, provide logs. If you don't, nobody can help you and you've wasted
everybody's time, including yours.

Again, show logs!

Revision history for this message
Tim Ritberg (xpert-reactos) wrote :

You want Log?

daemon.log:Apr 16 15:07:02 alfred systemd[1]: Started LSB: init-Script for system wide fetchmail daemon.

There is no logged error!

Revision history for this message
Matthias Andree (matthias-andree) wrote :

Check /var/log/mail.log, too.

Revision history for this message
Tim Ritberg (xpert-reactos) wrote :

No error in this log so far.
I guess, its not a bug in fetchmail but in systemd.
Systemd pretended to start the service, but it failed silently.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

As outlined before while it might be the case that it is failing silently for you this renders all help in vain as everybody is down to guessing out of the blue now.

I quickly checked a sample fetchmail in comparison:

1. I have created a fake /etc/fetchmailrc as:
set daemon 300 # Pool every 5 minutes
set syslog # log through syslog facility
set postmaster root
set no bouncemail

##########################################################################
# Hosts to pool
##########################################################################

# Defaults ===============================================================
# Set antispam to -1, since it is far safer to use that together with
# no bouncemail
defaults:
timeout 300
antispam -1
batchlimit 100

poll pop.ubuntu.com protocol POP3 user "<email address hidden>" there with password "secret" is foobar here

2. with that minimum I restarted the service and get it working (correctly matching the silly config I gave it)
systemctl restart fetchmail
root@xenial-test:~# systemctl status fetchmail.service
● fetchmail.service - LSB: init-Script for system wide fetchmail daemon
   Loaded: loaded (/etc/init.d/fetchmail; bad; vendor preset: enabled)
   Active: active (running) since Mon 2017-04-24 11:44:30 UTC; 2s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25065 ExecStop=/etc/init.d/fetchmail stop (code=exited, status=0/SUCCESS)
  Process: 25074 ExecStart=/etc/init.d/fetchmail start (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 600.0K
      CPU: 15ms
   CGroup: /system.slice/fetchmail.service
           └─25083 /usr/bin/fetchmail -f /etc/fetchmailrc --pidfile /var/run/fetchmail/fetchmail.pid --syslog

Apr 24 11:44:30 xenial-test systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon...
Apr 24 11:44:30 xenial-test fetchmail[25074]: * Starting mail retriever agent:
Apr 24 11:44:30 xenial-test fetchmail[25074]: ...done.
Apr 24 11:44:30 xenial-test systemd[1]: Started LSB: init-Script for system wide fetchmail daemon.
Apr 24 11:44:30 xenial-test fetchmail[25083]: starting fetchmail 6.3.26 daemon
Apr 24 11:44:30 xenial-test fetchmail[25083]: couldn't find canonical DNS name of pop.ubuntu.com (pop.ubuntu.com): Name or ser
Apr 24 11:44:30 xenial-test fetchmail[25083]: Query status=11 (DNS)

Now could you share your config file (sans passwords please).
Then if you restart fetchmail what does a "systemctl status fetchmail.service" give you afterwards (Full output please).

Revision history for this message
Tim Ritberg (xpert-reactos) wrote :

The problem did not occur the last days. Maybe it will occur after monthly log rotate.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for fetchmail (Ubuntu) because there has been no activity for 60 days.]

Changed in fetchmail (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.