Bug 252293 - mail/qmail: qmailsend boot script delivery failure with procmail
Summary: mail/qmail: qmailsend boot script delivery failure with procmail
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: Dmitry Marakasov
URL:
Keywords:
Depends on: 252457
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-30 21:37 UTC by Callum Gibson
Modified: 2021-02-18 21:25 UTC (History)
1 user (show)

See Also:
erdgeist: maintainer-feedback+
koobs: merge-quarterly?


Attachments
Fix qmail rc script: Add LOCALBASE and correct quotes (2.03 KB, patch)
2021-01-07 16:50 UTC, erdgeist
erdgeist: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Callum Gibson 2020-12-30 21:37:18 UTC
When qmailsend runs in procmail delivery mode it invokes "|preline procmail" however as procmail is a port, it resides in /usr/local/bin which is neither added to the path, nor explicitly invoked.

Secondly, the quoting in the command invocation is incorrect, with too many levels of quoting to allow command_args to run as a pipeline.

Mail will bounce with an error such as:
<'|preline procmail'@mail.example.com>:
Sorry, no mailbox here by that name. (#5.1.1)

I've been patching /var/qmail/boot/qmailsend with:

-  exec env - PATH="/var/qmail/bin:$PATH" ${command} \'"${command_args}"\' splogger qmail&
+  exec env - PATH="/var/qmail/bin:/usr/local/bin:$PATH" ${command} "${command_args}" splogger qmail&
Comment 1 erdgeist 2020-12-30 23:46:54 UTC
Funny, this happened to me exactly at this moment. Will fix this and bundle a new port.

Thanks

  erdgeist
Comment 2 erdgeist 2021-01-07 16:50:41 UTC
Created attachment 221355 [details]
Fix qmail rc script: Add LOCALBASE and correct quotes
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-02-16 01:01:20 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Feb 16 01:00:58 UTC 2021
New revision: 565379
URL: https://svnweb.freebsd.org/changeset/ports/565379

Log:
  Fix qmail's qmailsend wrapper script by using correct PATH and removing bad quoting

  PR:		252457, 252293
  Submitted by:	erdgeist@erdgeist.org (maintainer)
  Reported by:	callumgibson@optusnet.com.au
  MFH:		2021Q1

Changes:
  head/mail/qmail/Makefile
  head/mail/qmail/files/qmailsend.in
  head/mail/qmail-mysql/Makefile
  head/mail/qmail-spamcontrol/Makefile
  head/mail/qmail-tls/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-02-18 21:19:31 UTC
A commit references this bug:

Author: amdmi3
Date: Thu Feb 18 21:19:14 UTC 2021
New revision: 565989
URL: https://svnweb.freebsd.org/changeset/ports/565989

Log:
  MFH: r565379

  Fix qmail's qmailsend wrapper script by using correct PATH and removing bad quoting

  PR:		252457, 252293
  Submitted by:	erdgeist@erdgeist.org (maintainer)
  Reported by:	callumgibson@optusnet.com.au

Changes:
_U  branches/2021Q1/
  branches/2021Q1/mail/qmail/Makefile
  branches/2021Q1/mail/qmail/files/qmailsend.in
  branches/2021Q1/mail/qmail-mysql/Makefile
  branches/2021Q1/mail/qmail-spamcontrol/Makefile
  branches/2021Q1/mail/qmail-tls/Makefile