Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#8488 - [courier-mta] webmail - cron job failure
Attached to Project:
Arch Linux
Opened by Gerhard Brauer (GerBra) - Friday, 02 November 2007, 18:07 GMT
Last edited by Tobias Kieslich (tobias) - Monday, 11 February 2008, 22:18 GMT
Opened by Gerhard Brauer (GerBra) - Friday, 02 November 2007, 18:07 GMT
Last edited by Tobias Kieslich (tobias) - Monday, 11 February 2008, 22:18 GMT
|
DetailsDescription:
The courier-webmail job in /etc/cron.hourly should not use su. su -c "/usr/share/sqwebmail/cleancache.pl" bin First i think user(id) bin is not the proberly user for running cleancache.pl. Then - cause bin has /bin/false as shell - the su comand failed an produce a cron mail like this: You are required to change your password immediately (root enforced) (current) UNIX password: Changing password for bin. su: incorrect password My solution ist to let root do this job: /usr/share/sqwebmail/cleancache.pl |
This task depends upon
Closed by Tobias Kieslich (tobias)
Monday, 11 February 2008, 22:18 GMT
Reason for closing: Fixed
Additional comments about closing: removed the cronjob in testing
Monday, 11 February 2008, 22:18 GMT
Reason for closing: Fixed
Additional comments about closing: removed the cronjob in testing
su -c "/usr/share/sqwebmail/cleancache.pl" bin
You a prompted to change your password. This is cause bin in /etc/shadow is created without the password expire fields (and not while the user has /bin/false as shell i mentioned first). It's the missing expire fields. Most other system user (daemon.mail,ftp) which are created during installation have the same behavior.
So we must either change bin user entry. Or took another user. I would prefer courier (uid 72). This user AFAIK
is created during courier installation and has correct shadow entries.
I'm not running the sqwebmail from courier, so i could'nt test it in real. But as i see the cleancache.pl
script would fail in any case, either started as bin or courier. The script does removing files in the dir /var/spool/courier/webmail-logincache. But this dir in my installation has ownership root.root and writeable
rights only for the owner. So neither bin nor courier could remove entires in this dir, even when the files or subdirs are writeable by one of them.
At my point i would say:
We must definitely change the cron job enry - under default Arch installation it couldn't work (shadow).
The only result is a failure mail to root.
I would prefer to run the perl script as courier:
su -c "/usr/share/sqwebmail/cleancache.pl" courier
This would not result in an error mail, but it still does nothing usefull (no write rights in affected dir)
So we should change ownership of /var/spool/courier/webmail-logincache to courier.courier.
If then sqwebmail works? I don't know, I'm not using it.
Some processes of courier-mta run under uid corier, some under root. When login-cache-files in above dir are
owned by root then the script maybe would fail although it started correctly.