Mailing List Archive

override envelope sender?
My outgoing messages have an envelope sender automatically generated by
qmail using what I told qmail is my system's hostname: phoenix.local.
Certain software packages (ezmlm, for instance) rely on the envelope
sender; it would also be nice to get bounce messages when appropriate....

Ideally, the envelope sender for messages sent to local users should be
just what it is now, but the envelope sender on messages which go to the
Internet should be the same as the From: header. Failing that, it would
be acceptable simply to change the envelope sender to match the From:
header on all messages. (I configured my MUA to alter the From: header
to my Internet-reachable address. This isn't ideal for local-to-local
messages, but oh well....)

(How) can I convince qmail to do this? Is this done by using a
command-line option when my MUA calls what it thinks is sendmail?

P.S. -- Thanks, Russel -- I was able to subscribe after following
your advice. :-)

------------ Greg Wooledge -------------
------- <wooledge@kellnet.com> -------
--- <http://kellnet.com/wooledge/main.html> ---
Re: override envelope sender? [ In reply to ]
On Tue, 25 Feb 1997, Greg Wooledge wrote:

> This is what I ended up doing; specifically, I set the QMAILSUSER and
> QMAILSHOST variables to "wooledge" and "kellnet.com", respectively.

You want to set QMAILUSER and QMAILHOST (rather than the versions with
'S' after qmail). Those control the From: header. The 'S' versions
control the envelope sender.

Evan
--
Evan Champion * Director, Network Operations
mailto:evanc@synapse.net * Directeur, Exploitation du reseau
http://www.synapse.net/ * Synapse Internet
Re: override envelope sender? [ In reply to ]
On 25 Feb 1997, Russell Nelson wrote:

> > Failing that, it would be acceptable simply to change the envelope
> > sender to match the From: header on all messages.

> Easiest way is to set .../control/defaulthost. qmail will
> automatically set the From: header and the envelope sender to be the
> username followed by contents of .../control/defaulthost.

Unfortunately, that doesn't produce the result I need. My local username
(greg) is not the same as the user portion of my Internet-reachable
mailing address (wooledge@kellnet.com).

> If your MUA
> is already inserting a From: header, you could either tell it not to,

Actually, I went out of my way to get it to do so. Recompiling pine
isn't the most enjoyable way to spend one's time. :-/

> or else tell qmail-inject (via its environment variables) to discard
> the incoming From: and make up one corresponding to the login to the
> user.

This is what I ended up doing; specifically, I set the QMAILSUSER and
QMAILSHOST variables to "wooledge" and "kellnet.com", respectively.

However, I wish to file a bug report: the man page for qmail-inject
clearly states, "The envelope sender address is normally the same as the
address in the From header field". In my testing, however, the 'From'
header field seems to be ignored. Either qmail-inject has a bug, or
the man page does. :-(

Relevant data:
qmail 0.96
Linux 2.0.28
libc.so.5.4.17
gcc 2.7.2.1

To reproduce the behavior (on my system):
$ unset QMAILSUSER QMAILSHOST
$ /var/qmail/bin/qmail-inject
From: wooledge@kellnet.com
To: greg
Subject: test

test
^D

------------ Greg Wooledge -------------
------- <wooledge@kellnet.com> -------
--- <http://kellnet.com/wooledge/main.html> ---
Re: override envelope sender? [ In reply to ]
On Tue, 25 Feb 1997, Evan Champion wrote:

> > This is what I ended up doing; specifically, I set the QMAILSUSER and
> > QMAILSHOST variables to "wooledge" and "kellnet.com", respectively.
>
> You want to set QMAILUSER and QMAILHOST (rather than the versions with
> 'S' after qmail). Those control the From: header. The 'S' versions
> control the envelope sender.

I *wanted* to control the envelope sender. Note the Subject of this
message. :-)

My envelope sender was not correct for outgoing messages; ezmlm, for
example, uses the envelope sender. Until Russell told me how to fool
ezmlm into accepting my message (djb-qmail-subscribe-wooledge=kellnet-com),
I couldn't even subscribe to this list -- because my envelope sender was
wrong.

------------ Greg Wooledge -------------
------- <wooledge@kellnet.com> -------
--- <http://kellnet.com/wooledge/main.html> ---
Re: override envelope sender? [ In reply to ]
On Tue, 25 Feb 1997, Greg Wooledge wrote:

> I *wanted* to control the envelope sender. Note the Subject of this
> message. :-)

Doh, I feel rather stupid now :-) I saw something about From: and didn't
really read the rest of the message.

I went back and tried to reproduce your test. Here's what I did:

$ /var/qmail/bin/qmail-inject
From: evanc@qlist.synapse.net /* defaulthost = synapse.net, qlist is
separately delivered to handle my
mailing lists */
To: nonexistent@synapse.net /* on my main mail server, user doesn't exist */
Subject: test

It bounced back to evanc@synapse.net, not evanc@qlist.synapse.net. This
backs up your result where the sender wasn't set to the From: as the man
page states.

I'm not sure if I consider it "wrong" (in that sendmail does the same
thing unless you specifically give it a sender via -f), but it should at
least be consistent with the manpage. Since qmail doesn't try to enforce
the sender, it might as well use the From: verbatim unless it is given
other instructions.

Evan
--
Evan Champion * Director, Network Operations
mailto:evanc@synapse.net * Directeur, Exploitation du reseau
http://www.synapse.net/ * Synapse Internet
Re: override envelope sender? [ In reply to ]
> However, I wish to file a bug report: the man page for qmail-inject
> clearly states, "The envelope sender address is normally the same as the
> address in the From header field".

What this means is that the default envelope sender is the same as the
default From address. Either one can be overridden by incoming fields.

---Dan
Let your users manage their own mailing lists. http://pobox.com/~djb/qmail.html