Bug 327550

Summary: yast2-mail fetchmail error
Product: [openSUSE] openSUSE 10.3 Reporter: Miquel A. Noguera <ibz>
Component: YaST2Assignee: Peter Varkoly <varkoly>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: mike
Version: RC 1   
Target Milestone: ---   
Hardware: PC   
OS: openSUSE 10.3   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2-mail error
proposed fix
proposed fix, second version
proposed fix, third version

Description Miquel A. Noguera 2007-09-23 09:27:24 UTC
When configuring mail service, yast2 complains about an error in fetchmail configuration.

Since fetchmail is not installed by default, I see two alternatives:

a) select and install fetchmail
b) skip fetchmail configuration
Comment 1 Miquel A. Noguera 2007-09-23 09:28:34 UTC
Created attachment 174050 [details]
yast2-mail error
Comment 2 Michal Kubeček 2007-09-24 08:13:06 UTC
Problem seems to be caused by missing user 'fetchmail'. After creating this user, yast2-mail does not fail even without fetchmail package installed.
Comment 3 Michal Kubeček 2007-09-24 10:48:53 UTC
ProbePackages() in Mail.ycp finds out (correctly) that fetchmail is not needed (there are no accounts configured for it) but then ag_fetchmailrc is called anyway and it fails to change owner of /etc/fetchmailrc to fetchmail (at the end of write_file(), line 224).

Certainly this bug appeared between 10.3 Beta3 and 10.3RC1 and is caused by changes between yast2-mail version 2.15.20-18 and 2.15.22-2.
Comment 4 Michal Kubeček 2007-09-24 11:29:02 UTC
Created attachment 174242 [details]
proposed fix

Call WriteDownloading() only if there is at least one fetchmail account (under the same condition ProbePackages() installs fetchmail if it is not installed yet).
Comment 5 Michal Kubeček 2007-09-24 11:51:29 UTC
Created attachment 174255 [details]
proposed fix, second version

Sorry, first patch was incorrect: it does not recreate /etc/fetchmailrc if there were any fetchmail accounts defined and all of them are removed. This should be OK.
Comment 6 Michal Kubeček 2007-09-24 13:25:20 UTC
There is one more problem: if fetchmail _is_ in the package selection, it can be installed before pwdutils, so that useradd command is not available for pre-install script and yast2-mail fails again. Package fetchmail should probably depend on pwdutils (or /usr/sbin/useradd).
Comment 8 Michal Kubeček 2007-09-24 14:55:43 UTC
Created attachment 174370 [details]
proposed fix, third version

Just a slight modification: if Package::Installed ("fetchmail") is checked, check for size(fetchmail)>0 is useless (if size is positive then fetchmail is installed by ProbePackages()).
Comment 9 Michal Kubeček 2007-11-21 04:53:57 UTC
Current state: bug in yast2-mail is fixed in 10.3 final, fetchmail dependency on pwdutils (useradd) still missing.
Comment 10 Peter Varkoly 2007-11-28 13:55:49 UTC
PreReq fixed in STABLE for the next product.