You are not logged in.
Pages: 1
I'm using SOGo in combination with fetchmail on one of my servers. fetchmail requires the directory /var/lock/fetchmail.
I can create this directory manually, but after a reboot the directory is not available. What's the preferred way to persist such a directory?
Offline
Are you using your own build of fetchmail, or your own variant of the service files? Fetchmail from the repos uses /var/run/ for the pid file as a default and the packaged service file overrides this to use /run/fetchmail/ which is created (via systemd-tmpfiles). Why is your implementation trying to use /var/lock/?
Last edited by Trilby (2022-11-03 23:35:29)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
but after a reboot the directory is not available
And why is /var a tmpfs?
Online
The fetchmail.pl is provided by the postfixadmin community package.
# file: /usr/share/doc/postfixadmin/ADDITIONS/fetchmail.pl
# Where to create a lockfile; please ensure path exists.
our $run_dir="/var/lock/fetchmail";
I just had a look in the /run directory and there is already a fetchmail directory but I don't know where it comes from. But if I understand you correctly the /run/fetchmail directory would be the correct place to put lockfiles into.
Offline
You left out the line of that file directing you to change those values as needed. There is no objectively "correct" place to put the lockfile - the location just needs to exist. So rather than trying to create a location on every boot, just use one of the several existing and perfectly suitable locations (i.e., the ones fetchmail itself would use).
However, seth's question about why your /var seems to be a tmpfs is still relevant.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
My /var is no tmpfs that's why I'm so confused that the directory is gone after a reboot
df -h
Filesystem Size Used Avail Use% Mounted on
dev 2.0G 0 2.0G 0% /dev
run 2.0G 804K 2.0G 1% /run
/dev/sda1 18G 12G 4.9G 71% /
tmpfs 2.0G 232K 2.0G 1% /dev/shm
tmpfs 2.0G 28K 2.0G 1% /tmp
/dev/sdb 30G 3.2G 25G 12% /home
tmpfs 393M 4.0K 393M 1% /run/user/1000
Offline
Is it more after a reboot or more after terminating postfixadmin ?
Do you run any nonsense like bleachbit?
You could shut down the system and boot a live distro to see whether it's actually removed during the shutdown or the system boot.
Online
/run is tmpfs and /var/lock is symlinked to /run/lock.
Offline
Ah ok, now I see. Thank you for the hint. This makes things clear.
ls -lha /var/lock
lrwxrwxrwx 1 root root 11 Oct 18 23:01 /var/lock -> ../run/lock
Offline
Pages: 1