Bug 187101 - Feature request: security/amavisd-milter should use a different location for socket file
Summary: Feature request: security/amavisd-milter should use a different location for ...
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: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-26 22:50 UTC by Xin LI
Modified: 2014-06-27 14:46 UTC (History)
2 users (show)

See Also:


Attachments
Move state dir to /var/run/amavis and support STAGEDIR (4.03 KB, patch)
2014-06-15 22:37 UTC, Petr Rehor
rx: maintainer-approval+
Details | Diff
amavisd-milter-1.6.0_2.patch (395 bytes, patch)
2014-06-27 14:40 UTC, Petr Rehor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer freebsd_triage 2014-02-26 22:50:00 UTC
	The default installation of security/amavisd-milter would use
AMAVISDIR as the place for its socket files.

	The problem with this is that security/amavisd-new would change
the permission to vscan:vscan 0750, so an unprivileged MTA process would
not be able to access the milter.

Fix: 

The problem is that socket files and PID files does not belong
to /var/amavis but /var/run/amavis.  A directory should be created owned
by AMAVISUSER:AMAVISUSER and have permission 0755, and change the rc.d
scripts to use /var/run/amavis instead.
How-To-Repeat: 	Install security/amavisd-milter with stock options and try to set
up milter without changing the directory permission, or re-install
security/amavisd-new.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-26 22:50:07 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-26 22:50:07 UTC
Maintainer of security/amavisd-milter,

Please note that PR ports/187101 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/187101

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Petr Rehor 2014-06-15 22:37:07 UTC
Created attachment 143820 [details]
Move state dir to /var/run/amavis and support STAGEDIR

Move state dir to /var/run/amavis and support STAGEDIR.

Please note in UPDATING that users must adjust path to milter socket in sendmail or postfix configuration.
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-06-27 01:32:17 UTC
A commit references this bug:

Author: delphij
Date: Fri Jun 27 01:31:53 UTC 2014
New revision: 359429
URL: http://svnweb.freebsd.org/changeset/ports/359429

Log:
  Stageify and move state directory to /var/run/amavis.

  PR:		187101
  Submitted by:	maintainer (with changes)

Changes:
  head/security/amavisd-milter/Makefile
  head/security/amavisd-milter/files/amavisd-milter.in
  head/security/amavisd-milter/files/pkg-message.in
  head/security/amavisd-milter/pkg-message
  head/security/amavisd-milter/pkg-plist
Comment 5 Xin LI freebsd_committer freebsd_triage 2014-06-27 01:33:35 UTC
A slightly different patchset was committed as of r359429, thanks for your submission!
Comment 6 Petr Rehor 2014-06-27 14:40:02 UTC
Created attachment 144193 [details]
amavisd-milter-1.6.0_2.patch

I forgot to create working wonder (previously created by amavisd-new) and set permissions :-(

P.
Comment 7 Petr Rehor 2014-06-27 14:46:17 UTC
s/wonder/folder/

Please note in UPDATING that users must adjust path to milter socket in sendmail or postfix configuration.

P.