Qmail
[Top] [All Lists]

Re: qmail-dk not signing mail sent from system application

To: qmail List <qmail@list.cr.yp.to>
Subject: Re: qmail-dk not signing mail sent from system application
From: Kyle Wheeler <kyle-qmail@memoryhole.net>
Date: Wed, 6 Jun 2007 12:30:16 -0600
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
Dkim-signature: v=0.5; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=received:comment:domainkey-signature:received:received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; q=dns/txt; s=default; bh=xQbMmDC+s5peVEECHfMqd0kX5qE=; b=A29YZz7LPQi1bXMH6t5Zbs2cr4uw1JroSjHE4k58jTlABmpIwC7cNKsU3GKYdNILhbCgvwKIlFQORfglsn3bAuRYooETAr1tiGABKeSSIwURkMn9aLSaEMESs/bRrf3HUnqFZmMr/fWWhMnf75mxjvPnRoi+qhqG0KdAuPihm5g=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=ePmbJ/JVyb8FqBbl6vmoAFyQpZlUHnEExMC/vtw/dfBGD0Gcjlci5S533Hi1fLbPbMwe3pjRE+QWpFe6tThv2id3Z21IWIPF53Z3xAklSFAg2bD5JwmqpwBo8b7Gv3soiKiKuGGcqUbOxEuLwFAV2HqsT/0l3TSPyGkd4a5aplI= ;
Domainkey-status: good
In-reply-to: <4666F97C.5060209@dotcomholdingsofbuffalo.com>
Mail-followup-to: qmail List <qmail@list.cr.yp.to>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <4666F97C.5060209@dotcomholdingsofbuffalo.com>
User-agent: Mutt/1.5.15cvs (2007-05-20)
On Wednesday, June  6 at 02:14 PM, quoth Phil Breskey:
qmail is signing messages fine when I compose and send an email from my client, but it is not signing when I envoke a script or from the command line (using the mail command).

When you use the mail command (or sendmail or qmail-inject), it does not use the network or contact tcpserver, so your tcp.smtp file rules are not used.

Which from my reading should do the trick, but I guess I'm missing something. qmail itself was originally set up on the server using netqmail-1.05. Any help or directions to some extra documentation would be greatly appreciated.

Indeed. The way to do this is to either export QMAILQUEUE and DKSIGN in your script's environment OR put a shell-script wrapper around both qmail-inject and sendmail that does that.

Here's an example of such a script (which wraps the sendmail binary):

    #!/bin/sh
    export QMAILQUEUE=/var/qmail/bin/qmail-dk
    export DKSIGN=/etc/domainkeys/dotcomholdingsofbuffalo.com/default"
    exec /var/qmail/bin/sendmail "$@"

To use it, you'd make it executable (and readable) and save it as /usr/sbin/sendmail (and possibly /usr/lib/sendmail), while leaving the original sendmail binary (/var/qmail/bin/sendmail) undisturbed.

You can modify that to wrap around qmail-inject too, if you like.

~Kyle
--
The future is here. It's just not widely distributed yet.
                                                     -- William Gibson

Attachment: pgpviAlwGNqeX.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>