Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1019549: fetchmail: can't accept options while a background fetchmail is running.

114 views
Skip to first unread message

Helge Kreutzmann

unread,
Sep 11, 2022, 3:50:04 PM9/11/22
to
Package: fetchmail
Version: 6.4.33-1
Severity: important

I call fetchmal every 10 minutes in my crontab as "fetchmail -a -s".
This used to work until the latest upgrade without problems (for
decades).

Since upgrading I get the error message:
fetchmail: can't accept options while a background fetchmail is running.
argc = 3, arg list:
arg 1 = "-a"
arg 2 = "-s"

This also happens when called on the command line.

However, fetchmail is not intended to run in the background, expecially:

# cat /etc/default/fetchmail

# Declare here if we want to start fetchmail. 'yes' or 'no'
START_DAEMON=no

But somehow it is in the background:

helge 2994 0.0 0.0 13984 8216 ? Ss 20:07 0:00 fetchmail --nodetach --daemon 300

In the system logs (from boot until now) I get lots of errors:

Sep 11 20:06:57 twentytwo fetchmail[2055]: fetchmail: no mailservers have been specified.
Sep 11 20:06:57 twentytwo systemd[2018]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:06:57 twentytwo systemd[2018]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Scheduled restart job, restart counter is at 1.
Sep 11 20:06:58 twentytwo fetchmail[2118]: fetchmail: no mailservers have been specified.
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Scheduled restart job, restart counter is at 2.
Sep 11 20:06:58 twentytwo fetchmail[2149]: fetchmail: no mailservers have been specified.
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Scheduled restart job, restart counter is at 3.
Sep 11 20:06:58 twentytwo fetchmail[2154]: fetchmail: no mailservers have been specified.
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:06:58 twentytwo systemd[2018]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:06:59 twentytwo systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon...
Sep 11 20:06:59 twentytwo fetchmail[2454]: Not starting fetchmail daemon, disabled via /etc/default/fetchmail.
Sep 11 20:06:59 twentytwo systemd[1]: Started LSB: init-Script for system wide fetchmail daemon.
Sep 11 20:06:59 twentytwo systemd[2018]: fetchmail.service: Scheduled restart job, restart counter is at 4.
Sep 11 20:06:59 twentytwo fetchmail[2459]: fetchmail: no mailservers have been specified.
Sep 11 20:06:59 twentytwo systemd[2018]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:06:59 twentytwo systemd[2018]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:06:59 twentytwo systemd[2018]: fetchmail.service: Scheduled restart job, restart counter is at 5.
Sep 11 20:06:59 twentytwo systemd[2018]: fetchmail.service: Start request repeated too quickly.
Sep 11 20:06:59 twentytwo systemd[2018]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:07:26 twentytwo fetchmail[2994]: fetchmail: starting fetchmail 6.4.33 daemon
Sep 11 20:08:46 twentytwo fetchmail[3284]: fetchmail: WARNING: Running as root is discouraged.
Sep 11 20:08:46 twentytwo fetchmail[3284]: fetchmail: no mailservers have been specified.
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Scheduled restart job, restart counter is at 1.
Sep 11 20:08:46 twentytwo fetchmail[3291]: fetchmail: WARNING: Running as root is discouraged.
Sep 11 20:08:46 twentytwo fetchmail[3291]: fetchmail: no mailservers have been specified.
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Scheduled restart job, restart counter is at 2.
Sep 11 20:08:46 twentytwo fetchmail[3292]: fetchmail: WARNING: Running as root is discouraged.
Sep 11 20:08:46 twentytwo fetchmail[3292]: fetchmail: no mailservers have been specified.
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:08:46 twentytwo systemd[3268]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Scheduled restart job, restart counter is at 3.
Sep 11 20:08:47 twentytwo fetchmail[3293]: fetchmail: WARNING: Running as root is discouraged.
Sep 11 20:08:47 twentytwo fetchmail[3293]: fetchmail: no mailservers have been specified.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Scheduled restart job, restart counter is at 4.
Sep 11 20:08:47 twentytwo fetchmail[3294]: fetchmail: WARNING: Running as root is discouraged.
Sep 11 20:08:47 twentytwo fetchmail[3294]: fetchmail: no mailservers have been specified.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Scheduled restart job, restart counter is at 5.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Start request repeated too quickly.
Sep 11 20:08:47 twentytwo systemd[3268]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:10:01 twentytwo CRON[3702]: (helge) CMD (fetchmail -a -s)
Sep 11 20:12:27 twentytwo fetchmail[4016]: fetchmail: no mailservers have been specified.
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Scheduled restart job, restart counter is at 1.
Sep 11 20:12:27 twentytwo fetchmail[4039]: fetchmail: no mailservers have been specified.
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Scheduled restart job, restart counter is at 2.
Sep 11 20:12:27 twentytwo fetchmail[4040]: fetchmail: no mailservers have been specified.
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:12:27 twentytwo systemd[4000]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Scheduled restart job, restart counter is at 3.
Sep 11 20:12:28 twentytwo fetchmail[4041]: fetchmail: no mailservers have been specified.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Scheduled restart job, restart counter is at 4.
Sep 11 20:12:28 twentytwo fetchmail[4042]: fetchmail: no mailservers have been specified.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Main process exited, code=exited, status=5/NOTINSTALLED
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Scheduled restart job, restart counter is at 5.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Start request repeated too quickly.
Sep 11 20:12:28 twentytwo systemd[4000]: fetchmail.service: Failed with result 'exit-code'.
Sep 11 20:20:01 twentytwo CRON[7306]: (helge) CMD (fetchmail -a -s)
Sep 11 20:30:01 twentytwo CRON[25336]: (helge) CMD (fetchmail -a -s)
Sep 11 20:40:01 twentytwo CRON[39508]: (helge) CMD (fetchmail -a -s)
Sep 11 20:50:01 twentytwo CRON[40534]: (helge) CMD (fetchmail -a -s)
Sep 11 21:00:01 twentytwo CRON[40631]: (helge) CMD (fetchmail -a -s)
Sep 11 21:10:01 twentytwo CRON[42112]: (helge) CMD (fetchmail -a -s)
Sep 11 21:20:01 twentytwo CRON[42218]: (helge) CMD (fetchmail -a -s)
Sep 11 21:30:01 twentytwo CRON[42538]: (helge) CMD (fetchmail -a -s)


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.19.6 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages fetchmail depends on:
ii adduser 3.128
ii debianutils 5.7-0.3
ii init-system-helpers 1.64
ii libc6 2.34-7
ii libcom-err2 1.46.5-2
ii libgssapi-krb5-2 1.20-1
ii libkrb5-3 1.20-1
ii libssl3 3.0.5-2
ii lsb-base 11.2

Versions of packages fetchmail recommends:
ii ca-certificates 20211016

Versions of packages fetchmail suggests:
ii exim4-daemon-light [mail-transport-agent] 4.96-3
pn fetchmailconf <none>
pn resolvconf <none>

-- Configuration Files:
/etc/logcheck/ignore.d.server/fetchmail [Errno 13] Keine Berechtigung: '/etc/logcheck/ignore.d.server/fetchmail'
/etc/logcheck/ignore.d.workstation/fetchmail [Errno 13] Keine Berechtigung: '/etc/logcheck/ignore.d.workstation/fetchmail'

-- no debconf information

--
Dr. Helge Kreutzmann deb...@helgefjell.de
Dipl.-Phys. http://www.helgefjell.de/debian.php
64bit GNU powered gpg signed mail preferred
Help keep free software "libre": http://www.ffii.de/
signature.asc

László Böszörményi

unread,
Sep 13, 2022, 2:10:05 PM9/13/22
to
Control: tags -1 +moreinfo

Hi,

On Sun, Sep 11, 2022 at 9:42 PM Helge Kreutzmann <deb...@helgefjell.de> wrote:
> Since upgrading I get the error message:
> fetchmail: can't accept options while a background fetchmail is running.
> argc = 3, arg list:
> arg 1 = "-a"
> arg 2 = "-s"
>
> This also happens when called on the command line.
>
> However, fetchmail is not intended to run in the background, expecially:
>
> # cat /etc/default/fetchmail
> …
> # Declare here if we want to start fetchmail. 'yes' or 'no'
> START_DAEMON=no
Yes, this is for the initscripts.

> But somehow it is in the background:
> helge 2994 0.0 0.0 13984 8216 ? Ss 20:07 0:00 fetchmail --nodetach --daemon 300
I think it is started by systemd. What do you get when issuing the
following commands?
$ systemctl --user status fetchmail.service
$ systemctl --user disable fetchmail.service
$ systemctl --user stop fetchmail.service
# systemctl --global disable fetchmail

(Please be aware the last command is run as root.)

> In the system logs (from boot until now) I get lots of errors:
This means the service is indeed installed and is in use.
After executing the commands above, run your "fetchmail -a -s" again
and see how it goes now.

Sorry for the inconvenience,
Laszlo/GCS

Helge Kreutzmann

unread,
Sep 14, 2022, 4:10:04 PM9/14/22
to
Hello László,
On Tue, Sep 13, 2022 at 08:05:50PM +0200, László Böszörményi (GCS) wrote:
> Control: tags -1 +moreinfo
>
> Hi,
>
> On Sun, Sep 11, 2022 at 9:42 PM Helge Kreutzmann <deb...@helgefjell.de> wrote:
> > Since upgrading I get the error message:
> > fetchmail: can't accept options while a background fetchmail is running.
> > argc = 3, arg list:
> > arg 1 = "-a"
> > arg 2 = "-s"
> >
> > This also happens when called on the command line.
> >
> > However, fetchmail is not intended to run in the background, expecially:
> >
> > # cat /etc/default/fetchmail
> > …
> > # Declare here if we want to start fetchmail. 'yes' or 'no'
> > START_DAEMON=no
> Yes, this is for the initscripts.

Ok, but this is not clear and it used to work until very recently.

> > But somehow it is in the background:
> > helge 2994 0.0 0.0 13984 8216 ? Ss 20:07 0:00 fetchmail --nodetach --daemon 300
> I think it is started by systemd. What do you get when issuing the
> following commands?
> $ systemctl --user status fetchmail.service

• fetchmail.service - Fetchmail Daemon
Loaded: loaded (/usr/lib/systemd/user/fetchmail.service; enabled; preset: enabled)
Active: active (running) since Wed 2022-09-14 21:46:46 CEST; 15min ago
Docs: man:fetchmail(1)
Main PID: 2926 (fetchmail)
Tasks: 1 (limit: 37643)
Memory: 1.6M
CPU: 24ms
CGroup: /user.slice/user-1000.slice/us...@1000.service/app.slice/fetchmail.service
└─2926 fetchmail --nodetach --daemon 300

Sep 14 21:46:46 twentytwo fetchmail[2926]: fetchmail: starting fetchmail 6.4.33 daemon
Sep 14 21:46:46 twentytwo systemd[2910]: Started Fetchmail Daemon.


> $ systemctl --user disable fetchmail.service

// No response

> $ systemctl --user stop fetchmail.service

// No response

> # systemctl --global disable fetchmail

Removed "/etc/systemd/user/default.target.wants/fetchmail.service".

> (Please be aware the last command is run as root.)
>
> > In the system logs (from boot until now) I get lots of errors:
> This means the service is indeed installed and is in use.

I checked it and mail was still received.

> After executing the commands above, run your "fetchmail -a -s" again
> and see how it goes now.

Now this works as expected, i.e. no error output.

> Sorry for the inconvenience,

No problem, this is what testing is for, to find the bugs before
stable users encounter them.

So I suppose when "START_DAEMON=no" then the above commands need to
be issued in the postinst?

Greetings

Helge
signature.asc

László Böszörményi

unread,
Sep 15, 2022, 2:40:03 PM9/15/22
to
Control: tags -1 -moreinfo

Hi Helge,

On Wed, Sep 14, 2022 at 10:09 PM Helge Kreutzmann <deb...@helgefjell.de> wrote:
> On Tue, Sep 13, 2022 at 08:05:50PM +0200, László Böszörményi (GCS) wrote:
> > Yes, this is for the initscripts.
>
> Ok, but this is not clear and it used to work until very recently.
Yup, with 6.4.33-1 the systemd user retrieval service accidentally
enabled. It's a parallel system next to initscripts.

> > # systemctl --global disable fetchmail
> Removed "/etc/systemd/user/default.target.wants/fetchmail.service".
This fixes it and I'm going to upload a package which fixes this issue.

> So I suppose when "START_DAEMON=no" then the above commands need to
> be issued in the postinst?
Nope, it's for fetchmail itself only.

Fixed package which no longer enables systemd service for users is on its way.
Thanks for the feedback,
Laszlo/GCS

Helge Kreutzmann

unread,
Sep 16, 2022, 10:00:04 AM9/16/22
to
Hello László,
On Thu, Sep 15, 2022 at 08:32:29PM +0200, László Böszörményi (GCS) wrote:
> Fixed package which no longer enables systemd service for users is on its way.
> Thanks for the feedback,

Thank you very much for your professional and swift handling of this
issue.

Greetings

Helge
signature.asc
0 new messages