Bug 114701 - mail/fetchmail - fetchmail_user ignored
Summary: mail/fetchmail - fetchmail_user ignored
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Simon Barner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 16:10 UTC by graham
Modified: 2007-07-22 12:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description graham 2007-07-18 16:10:01 UTC
The startup script for the fetchmail port describes the use of a variable fetchmail_user (when running as a system-wide daemon). However, the value that is assigned to that variable in /etc/rc.conf is never used.

How-To-Repeat: In /etc/rc.conf:
  fetchmail_enable="YES"
  fetchmail_user=someuser

Then run
  /usr/local/etc/rc.d/fetchmail start

Using "ps axu", observe that the fetchmail process is owned by user fetcmail rather than someuser.
Comment 1 Björn König 2007-07-18 18:38:43 UTC
The fetchmail_user variable is intended for a multiuser setup where all
users that are listed in fetchmail_users can start fetchmail with their
own configuration file (default: /home/<username>/.fetchmailrc).

If you use a single global configuration file (e.g.
/usr/local/etc/fetchmailrc) then the hardcoded daemon user "fetchmail"
will be used the rc script. fetchmail_user won't change it.
Comment 2 graham 2007-07-18 22:46:04 UTC
That may be the intention, but the comments at the top of the startup
script say that it's used in the system-wide daemon case and not the one
with multiple users.

And surely in the per-user case, each user's instance of fetchmail
should run as that particular user. Hang on..., I've just checked. If
fetchmail_users is set to "aaa bbb", and fetchmail_user set to "ccc",
then the two instances of fetchmail are run as "aaa" and "bbb"
respectively. So it's not used in that case either!

Graham
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2007-07-18 22:58:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->barner

Over to maintainer
Comment 4 Simon Barner freebsd_committer freebsd_triage 2007-07-20 15:44:36 UTC
>  That may be the intention, but the comments at the top of the startup
>  script say that it's used in the system-wide daemon case and not the one
>  with multiple users.

Yes, that is the intendet behaviour. In the system-wide daemon case the
fetchmail_user variable should be used (with default value 'fetchmail').
>  
>  And surely in the per-user case, each user's instance of fetchmail
>  should run as that particular user. Hang on..., I've just checked. If
>  fetchmail_users is set to "aaa bbb", and fetchmail_user set to "ccc",
>  then the two instances of fetchmail are run as "aaa" and "bbb"
>  respectively. So it's not used in that case either!

This is exspected. The fetchmail_user variable is ignored in the per-user
configuration.

I'll fix the single-daemon case to actually use the custom user and improve
the documentation in that the fetchmail_user variable is ignored in the
per-user case.
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-07-22 12:20:26 UTC
barner      2007-07-22 11:20:19 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile 
    mail/fetchmail/files fetchmail.in 
  Log:
  - Actually respect the `fetchmail_user' variable in single daemon
    mode
  - Document that above variable is ignored in the per-user daemon mode
  - Bump port revision
  
  Requested by:   Graham Menhennitt <graham@menhennitt.com.au>
  PR:             ports/114701
  
  Revision  Changes    Path
  1.187     +1 -1      ports/mail/fetchmail/Makefile
  1.8       +6 -2      ports/mail/fetchmail/files/fetchmail.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Simon Barner freebsd_committer freebsd_triage 2007-07-22 12:25:57 UTC
State Changed
From-To: open->closed

Fixed in fetchmail-6.3.8_3. Thanks for the report.