Bug 167000 - [PATCH] mail/mailscanner: Update to correct mktemp options
Summary: [PATCH] mail/mailscanner: Update to correct mktemp options
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: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 16:50 UTC by Kevin Kobb
Modified: 2012-04-18 08:40 UTC (History)
0 users

See Also:


Attachments
file.diff (8.01 KB, patch)
2012-04-16 16:50 UTC, Kevin Kobb
no flags Details | Diff
patch.txt (2.17 KB, text/plain; charset=windows-1252)
2012-04-17 21:51 UTC, Kevin Kobb
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Kobb 2012-04-16 16:50:11 UTC
The recent source update to MailScanner uses the mktemp command without any options. This works OK on linux, but the FreeBSD version needs to be supplied an option, or else you get an error like this when running mailscanner --lint

MailScanner.conf says "Virus Scanners = clamd"
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
/usr/local/libexec/MailScanner/bitdefender-wrapper: Cannot create temporary file
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
/usr/local/libexec/MailScanner/clamav-wrapper: Cannot make name for temporary dir

Note: on my system with postfix, running mailscanner --lint without this fix besides producing the above error, clobbers the permissions on the quarantine directories causing a lot of problems.

Fix: Apply attached patch file.

Patch attached with submission follows:
How-To-Repeat: Run mailscanner --lint and check the output.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-04-16 16:50:27 UTC
Class Changed
From-To: sw-bug->maintainer-update

Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-04-16 16:50:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

crees@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 3 Chris Rees freebsd_committer freebsd_triage 2012-04-16 19:59:45 UTC
State Changed
From-To: open->feedback

Hi Kevin!  How about using sed instead?  Much less space needed than 
patches :) 
http://www.bayofrum.net/~crees/patches/mailscanner-mktempfix.diff
Comment 4 Kevin Kobb 2012-04-17 21:51:39 UTC
OK, a slightly modified version of Chris' patch (I think there was a
misplaced "\")

Seems to work fine in my testing.
Comment 5 Chris Rees freebsd_committer freebsd_triage 2012-04-18 08:21:58 UTC
State Changed
From-To: feedback->open

You're quite correct.... I seem to fail at basic things when hacking 
MailScanner :(
Comment 6 Chris Rees freebsd_committer freebsd_triage 2012-04-18 08:30:31 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2012-04-18 08:30:31 UTC
crees       2012-04-18 07:30:16 UTC

  FreeBSD ports repository

  Modified files:
    mail/mailscanner     Makefile 
    mail/mailscanner/files CHANGES.port 
  Log:
  Fix mktemp use (GNUism optional -t part for directory)
  
  PR:             ports/167000
  Submitted by:   Kevin Kobb <kkobb@skylinecorp.com> (maintainer)
  
  Revision  Changes    Path
  1.102     +10 -2     ports/mail/mailscanner/Makefile
  1.30      +10 -2     ports/mail/mailscanner/files/CHANGES.port
_______________________________________________
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"