Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I set "Return-Path" header parameter when I use "mail" command line ?

2,220 views
Skip to first unread message

KLEIN Stéphane

unread,
Oct 18, 2007, 4:33:47 AM10/18/07
to
Hello,

How can I set "Return-Path" header parameter when I use "mail" command
line ? I tried "mail -a "Return-Path: foo...@example.com" but it
doesn't work. Are you a tips.

Background detail : I use postfix mail server on this box.

Thanks for your help,
Stephane

Ralf Hildebrandt

unread,
Oct 18, 2007, 4:39:23 AM10/18/07
to
* KLEIN Stéphane <klein.s...@gmail.com>:

> Hello,
>
> How can I set "Return-Path" header parameter when I use "mail" command
> line ? I tried "mail -a "Return-Path: foo...@example.com" but it
> doesn't work. Are you a tips.

man mail

mail -s subject recipient@domain -- -f foo...@example.com

--
Ralf Hildebrandt (Ralf.Hil...@charite.de) pl...@charite.de
Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
Executive summary: Never flush a blocked toilet, the mess only gets
worse, clear the blockage, *then* flush. -- Victor Duchovni

Bill Cole

unread,
Oct 18, 2007, 11:04:31 AM10/18/07
to
At 10:39 AM +0200 10/18/07, Ralf Hildebrandt wrote:
>* KLEIN Stéphane <klein.s...@gmail.com>:
>> Hello,
>>
>> How can I set "Return-Path" header parameter when I use "mail" command
>> line ? I tried "mail -a "Return-Path: foo...@example.com" but it
>> doesn't work. Are you a tips.
>
>man mail

On the two systems (MacOS and Solaris) I happen
to have terminal sessions open to, `man mail`
does not describe any way to set the SMTP sender
address and hence the Return-Path header.

Of course, this CAN be done using sendmail instead of mail.

>mail -s subject recipient@domain -- -f foo...@example.com

MacOS /usr/bin/mail (which seems to be close to
the BSD version, as the binary is riddled with
FreeBSD version control strings) does not do
that. Is it reasonable to deduce that you can
terminate the mail options with a '--' and then
add any sendmail args? What implementation of
mail is that?
--
Bill Cole
bi...@scconsult.com


Ralf Hildebrandt

unread,
Oct 18, 2007, 2:01:22 PM10/18/07
to
* Bill Cole <postfixli...@billmail.scconsult.com>:

>> mail -s subject recipient@domain -- -f foo...@example.com
>
> MacOS /usr/bin/mail (which seems to be close to the BSD version, as the
> binary is riddled with FreeBSD version control strings) does not do that. Is
> it reasonable to deduce that you can terminate the mail options with a '--'
> and then add any sendmail args? What implementation of mail is that?

$ dpkg -S /usr/bin/mail
mailx: /usr/bin/mail

http://packages.debian.org/sid/mailx

--
Ralf Hildebrandt (Ralf.Hil...@charite.de) pl...@charite.de
Postfix - Einrichtung, Betrieb und Wartung Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de

"I've not lost my mind. It's backed up on tape somewhere." - Unknown

mouss

unread,
Oct 18, 2007, 4:38:40 PM10/18/07
to

Is there any reason not to use the sendmail command?

Bill Cole

unread,
Oct 18, 2007, 6:57:32 PM10/18/07
to

I don't think there's any really good one, but
the most popular answer I've heard to that
question is some variation on "with sendmail I
have to actually provide my own headers, and I
cannot be troubled and/or trusted to do that
correctly"

--
Bill Cole
bi...@scconsult.com


0 new messages