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
Depends on:
Reported: 2012-04-16 16:50 UTC by Kevin Kobb
Modified: 2012-04-18 08:40 UTC (History)
0 users

See Also:

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 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 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 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 :) 
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 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 2012-04-18 08:30:31 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 7 dfilter service freebsd_committer 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 
  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
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"