Results 1 to 6 of 6

Thread: fetchmail ignores settings in /etc/sysconfig/fetchmail

  1. #1
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,129

    Default fetchmail ignores settings in /etc/sysconfig/fetchmail

    With openSUSE 13.1 fetchmail read the variables defined in /etc/sysconfig/fetchmail:
    Code:
    FETCHMAIL_POLLING_INTERVAL="60"
    FETCHMAIL_FETCHALL="yes"
    FETCHMAIL_SILENT="no"
    FETCHMAIL_USER="fetchmail"
    FETCHMAIL_EXPERT_OPTIONS=""
    FETCHMAIL_RC_PATH="/etc/fetchmailrc"
    With version 13.2 these values are no longer used. Any idea?
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,012

    Default Re: fetchmail ignores settings in /etc/sysconfig/fetchmail

    Quote Originally Posted by karlmistelberger View Post
    with version 13.2 these values are no longer used. Any idea?
    Fetchmail used to have a SysV script in /etc/init.d/ which was modified to read /etc/sysconfig/fetchmail, now it's a systemd service file which does not - it only reads /etc/fetchmailrc

    If you want to add parameters, you could either do it in the rc or modify the systemd file ( /usr/lib/systemd/system/fetchmail.service ) but that might get overwritten by an update.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,129

    Default Re: fetchmail ignores settings in /etc/sysconfig/fetchmail

    Quote Originally Posted by Miuku View Post
    Fetchmail used to have a SysV script in /etc/init.d/ which was modified to read /etc/sysconfig/fetchmail, now it's a systemd service file which does not - it only reads /etc/fetchmailrc

    If you want to add parameters, you could either do it in the rc or modify the systemd file ( /usr/lib/systemd/system/fetchmail.service ) but that might get overwritten by an update.
    As a quick fix I modified the latter. Being unsure about the first option I had a look at /etc/init.d/postfix and would have some minimal solution for fetchmail. Would sourcing /etc/sysconfig/fetchmail, invoking fetchmail in file /etc/init.d/fetchmail and adding a link in /etc/init.d/rc3.d/ work? Which command will take precedence, /usr/lib/systemd/system/fetchmail.service or /etc/init.d/fetchmail?
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  4. #4
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,012

    Default Re: fetchmail ignores settings in /etc/sysconfig/fetchmail

    SysV scripts are going the way of the dodo in the future so it's a safe bet to use a systemd file.

    You could prevent the systemd file from being overwritten with chattr +i ( http://en.wikipedia.org/wiki/Chattr, +i being immutable ie. cannot be overwritten ) in case you want to make changes to it. Remember to systemctl daemon-reload so the changes to the systemd service file will take effect.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  5. #5
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,129

    Default Re: fetchmail ignores settings in /etc/sysconfig/fetchmail

    Quote Originally Posted by Miuku View Post
    SysV scripts are going the way of the dodo in the future so it's a safe bet to use a systemd file.

    You could prevent the systemd file from being overwritten with chattr +i ( http://en.wikipedia.org/wiki/Chattr, +i being immutable ie. cannot be overwritten ) in case you want to make changes to it. Remember to systemctl daemon-reload so the changes to the systemd service file will take effect.
    Set immutable attribute and got an error when refreshing fetchmail-6.3.26-6.1.4.x86_64. The file is now safe from being overwritten without being noticed.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  6. #6
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,129

    Default Modifying Existing Unit Files

    When upgrading to openSUSE Leap 42.1 again some of the services needed a change to work as desired. Some decent description how to do this in a more canonical way is given here: https://access.redhat.com/documentat...ng_Unit_Config Changes applied are displayed:
    Code:
    erlangen:~ # systemd-delta|head -33
    [OVERRIDDEN] /etc/systemd/system/minidlna.service → /usr/lib/systemd/system/minidlna.service
    
    --- /usr/lib/systemd/system/minidlna.service    2016-03-23 22:36:05.000000000 +0100
    +++ /etc/systemd/system/minidlna.service        2016-04-14 06:45:17.165277325 +0200
    @@ -7,7 +7,7 @@
     PIDFile=/var/run/minidlnad.pid
     ExecStartPre=/usr/sbin/minidlnaconfig
     EnvironmentFile=-/var/lib/minidlna/rescan.conf
    -ExecStart=/usr/sbin/minidlnad $RESCAN -P /var/run/minidlnad.pid -f /var/lib/minidlna/minidlna.conf
    +ExecStart=/usr/sbin/minidlnad $RESCAN -P /var/run/minidlnad.pid
     
     [Install]
     WantedBy=multi-user.target
    
    [EQUIVALENT] /etc/systemd/system/default.target → /usr/lib/systemd/system/default.target
    [OVERRIDDEN] /etc/systemd/system/fetchmail.service → /usr/lib/systemd/system/fetchmail.service
    
    --- /usr/lib/systemd/system/fetchmail.service   2015-09-11 12:16:48.000000000 +0200
    +++ /etc/systemd/system/fetchmail.service       2016-04-14 06:51:23.571706205 +0200
    @@ -4,7 +4,7 @@
     
     [Service]
     User=fetchmail
    -ExecStart=/usr/bin/fetchmail -d 900 -f /etc/fetchmailrc
    +ExecStart=/usr/bin/fetchmail -a -d 60 -f /etc/fetchmailrc
     RestartSec=1
     
     [Install]
    
    [EXTENDED]   /run/systemd/system/session-250.scope → /run/systemd/system/session-250.scope.d/90-SendSIGHUP.conf
    [EXTENDED]   /run/systemd/system/session-250.scope → /run/systemd/system/session-250.scope.d/90-KillMode.conf
    [EXTENDED]   /run/systemd/system/session-250.scope → /run/systemd/system/session-250.scope.d/90-After-systemd-user-sessions\x2eservice.conf
    [EXTENDED]   /run/systemd/system/session-250.scope → /run/systemd/system/session-250.scope.d/90-After-systemd-logind\x2eservice.conf
    erlangen:~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •