Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Specify "mail from:" in postfix + relayhost (http://www.linux-archive.org/debian-user/655203-specify-mail-postfix-relayhost.html)

Mathieu Malaterre 04-12-2012 09:37 AM

Specify "mail from:" in postfix + relayhost
 
Hi there,

I've just finish setting up a postfix + relayhost conf thanks to :

http://wiki.debian.org/Postfix#Installing_and_Configuring_Postfix_on_Debi an

This works great. However using the `mail` command line interface I
can only send email from my main gmail adress. I did a small test
using `telnet localhost 25`, I can then specify any of my
pre-configured gmail adress (eg @free.fr).
However using telnet is pretty tedious. Does anyone knows what is the
command line option to specify the 'mail from:' information ?

Thanks much,
--
Mathieu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CA+7wUswQ23nF_tJ1y4aL8y7vZUxKwp8yTMRBHaH78gkpra3Uu g@mail.gmail.com">http://lists.debian.org/CA+7wUswQ23nF_tJ1y4aL8y7vZUxKwp8yTMRBHaH78gkpra3Uu g@mail.gmail.com

Andrei POPESCU 04-12-2012 11:15 AM

Specify "mail from:" in postfix + relayhost
 
On Jo, 12 apr 12, 11:37:46, Mathieu Malaterre wrote:
> Hi there,
>
> I've just finish setting up a postfix + relayhost conf thanks to :
>
> http://wiki.debian.org/Postfix#Installing_and_Configuring_Postfix_on_Debi an
>
> This works great. However using the `mail` command line interface I
> can only send email from my main gmail adress. I did a small test
> using `telnet localhost 25`, I can then specify any of my
> pre-configured gmail adress (eg @free.fr).
> However using telnet is pretty tedious. Does anyone knows what is the
> command line option to specify the 'mail from:' information ?

From a (very) quick reading of 'man mail' it appears that at least
bsd-mailx does not support this, but I didn't check the other
implementations[1].

What are you trying to achieve? If you want to send mail from scripts
maybe you should use postfix' version of /usr/sbin/sendmail. If you need
a more capable command-line mailer mutt is a very good choice.

[1] 'apt-cache search mailx' finds bsd-mailx, heirloom-mailx and
mailutils

Kind regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic

Daniel Landau 04-12-2012 11:20 AM

Specify "mail from:" in postfix + relayhost
 
On Apr 12, 2012 12:53 PM, "Mathieu Malaterre" <mathieu.malaterre@gmail.com> wrote:

> *This works great. However using the `mail` command line interface I

> can only send email from my main gmail adress. I did a small test

> using `telnet localhost 25`, I can then specify any of my

> pre-configured gmail adress (eg @free.fr).

> *However using telnet is pretty tedious. Does anyone knows what is the

> command line option to specify the 'mail from:' information ?


You can specify any headers with -a, e.g.


$ mail -a 'From: "My Name" <me@example.org>' da


Daniel Landau

Mathieu Malaterre 04-13-2012 11:40 AM

Specify "mail from:" in postfix + relayhost
 
On Thu, Apr 12, 2012 at 1:20 PM, Daniel Landau
<daniel.landau@helsinki.fi> wrote:
> On Apr 12, 2012 12:53 PM, "Mathieu Malaterre" <mathieu.malaterre@gmail.com>
> wrote:
>> *This works great. However using the `mail` command line interface I
>> can only send email from my main gmail adress. I did a small test
>> using `telnet localhost 25`, I can then specify any of my
>> pre-configured gmail adress (eg @free.fr).
>> *However using telnet is pretty tedious. Does anyone knows what is the
>> command line option to specify the 'mail from:' information ?
>
> You can specify any headers with -a, e.g.
>
> $ mail -a 'From: "My Name" <me@example.org>' da
>

Not pretty but that works just like I wished ! Thanks much.


--
Mathieu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CA+7wUszN9q+DX1g+fKOdwOCWVMBSQSKL25pVjqg7eeUK7Ys_0 A@mail.gmail.com">http://lists.debian.org/CA+7wUszN9q+DX1g+fKOdwOCWVMBSQSKL25pVjqg7eeUK7Ys_0 A@mail.gmail.com


All times are GMT. The time now is 10:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.