Bug 972432 - fetchmail is blocked by selinux
Summary: fetchmail is blocked by selinux
Alias: None
Product: Fedora
Classification: Fedora
Component: fetchmail (Show other bugs)
(Show other bugs)
Version: 19
Hardware: Unspecified Linux
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-09 11:26 UTC by Dietmar Kling
Modified: 2015-09-15 08:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-18 13:55:42 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Dietmar Kling 2013-06-09 11:26:30 UTC
Description of problem:
fetchmail is blocked by selinux with 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Create "fetchmail.service" under /etc/systemd/system/multi-user.target.wants/fetchmail.service and put some account into /etc/fetchmailrc which can be used by fetchmail

# Install
# in directory /lib/systemd/system

Description=fetchmail retrieves and forwards mail
After=local-fs.target network.target

ExecStart=/usr/bin/fetchmail -N -s --fetchmailrc /etc/fetchmailrc


2. Start service

Actual results:
  Blocked by selinux
  --> cannot acces /etc/hosts and several other files.

Expected results:
  Run flawlessly

Additional info:

after several tries with selinux the following "mypol.te" made it work:

module mypol 1.0;

require {
        type net_conf_t;
        type fetchmail_t;
        class netlink_route_socket { bind getattr create };
        class file { read getattr open };

#============= fetchmail_t ==============
allow fetchmail_t net_conf_t:file getattr;

#!!!! This avc is allowed in the current policy
allow fetchmail_t net_conf_t:file { read open };
allow fetchmail_t self:netlink_route_socket getattr;

#!!!! This avc is allowed in the current policy
allow fetchmail_t self:netlink_route_socket { bind create };

Comment 1 Fedora End Of Life 2015-01-09 22:08:45 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-02-18 13:55:42 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Vitezslav Crhonek 2015-09-15 08:25:48 UTC
Just for your information - I added examples of fetchmail.service and very basic fetchmailrc file into the package, starting with fetchmail-6.3.26-7.fc24. I didn't experience any SELinux issues. If you do, please report them against selinux-policy component. Thanks!

Note You need to log in before you can comment on or make changes to this bug.