Re: Unit for getmail (was: daemontools)
Volker Wysk <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <1862580.DoWK8ygBBZ@desktop> |
Am Mittwoch, 31. Januar 2018, 17:20:20 CET schrieb Volker Wysk: > Am Mittwoch, 31. Januar 2018, 17:06:00 CET schrieb Volker Wysk: > > This is the unit file for daemontools, in /lib/systemd/system/daemontools.service : > > (...) > > Doesn't look complicated. Perhaps I will try this, when Deamontools couldn't be made to work. > > I have to correct myself. I'ts quite complicated. See https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files for what seems like a good introduction into systemd and its unit files. I correct myself again. The "IMAPS gateway with getmail and dovecot" article at https://joel.porquet.org/wiki/hacking/getmail_dovecot/ shows how it's done. It's simple. And there is the UbuntuUsers article about Systemd service units, at https://wiki.ubuntuusers.de/systemd/Service_Units/. It's in German, I couldn't find an English version. This is the unit file. It's all that's needed: ----snip---- [Unit] Description=Getmail für [email protected] Wants=dovecot.service After=dovecot.service [Service] ExecStart=/usr/bin/getmail --getmaildir=/etc/getmail --rcfile=verteilerrc --idle INBOX Restart=always [Install] WantedBy=multi-user.target ----snip---- This goes to /etc/systemd/system/getmail-verteiler.service. Then, it needs to be activated: systemctl enable verteilerrc.service systemctl start verteilerrc.service That's it. Bye Volker