Bug 192229 - [patch] mail/milter-regex:Postfix cannot connect to Milter service
Summary: [patch] mail/milter-regex:Postfix cannot connect to Milter service
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-29 01:15 UTC by Mel Muth
Modified: 2014-08-03 10:21 UTC (History)
0 users

See Also:


Attachments
Make /var/run/milter-regex/sock readable by postfix (1.15 KB, text/plain)
2014-07-29 01:15 UTC, Mel Muth
dinoex: maintainer-approval-
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mel Muth 2014-07-29 01:15:47 UTC
Created attachment 145110 [details]
Make /var/run/milter-regex/sock readable by postfix

On 10.0-STABLE with postfix 2.11.1_2,1, postfix logs "postfix/smtpd[24120]: warning: connect to Milter service unix:/var/run/milter-regex/sock: Permission denied"

Postfix runs as the user postfix, in the groups postfix and mail. So its smtpd process is unable to read the sock file for milter-regex:

        % sudo ls -l /var/run/milter-regex/
        total 8
        -rw-rw----  1 mailnull  daemon  5 Jul 26 12:40 milter-regex.pid
        srw-------  1 mailnull  daemon  0 Jul 26 12:40 sock

The directory permissions (700) also prevent postfix from accessing the sock file.

See attached patch for suggested fix (with thanks to neirbowj).

The patch has been tested and addresses the sock permission denied issue with postfix. Since sendmail runs as mailnull, this patch only modifies group ownership and permissions to add access for postfix, and should not prevent sendmail from accessing sock. It is also consistent with guidance from postfix that a milter not run as the postfix user.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-29 08:00:43 UTC
over to maintainer
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-08-03 05:35:34 UTC
A commit references this bug:

Author: dinoex
Date: Sun Aug  3 05:34:44 UTC 2014
New revision: 363850
URL: http://svnweb.freebsd.org/changeset/ports/363850

Log:
  - allow group access for postfix
  PR:		192229
  Submitted by:	Mel Muth

Changes:
  head/mail/milter-regex/Makefile
  head/mail/milter-regex/files/milterregex.in
  head/mail/milter-regex/files/patch-milter-regex.c