Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

udp high ports, d-link extract firmware dsl-2750u, wwwwxxxxx.2G, yxxxcom, WWWXXX, ftp://192.168.100.100, wwwxxx 100, www.xxxcon, wwwxxx, oom killer misbehaves postgresql

Links

XODOX
Impressum

#1: How do I specify alternate sender address(From) when sending with

Posted on 2008-04-19 11:17:10 by vikimun

How do I specify alternate sender address(From) when sending with /bin/
mailx ?

Thanks
Viki

Report this message

#2: Re: How do I specify alternate sender address(From) when sending with /bin/mailx ?

Posted on 2008-04-19 18:05:44 by Bill Cole

In article
<d0550dfd-882a-4c36-91f7-58d355b5f531@s50g2000hsb.googlegroups.com>,
viki <vikimun@gmail.com> wrote:

> How do I specify alternate sender address(From) when sending with /bin/
> mailx ?
>
> Thanks
> Viki

Assuming that your /bin/mailx is not significantly different from the
traditional BSD version, you can't.

--
Now where did I hide that website...

Report this message

#3: Re: How do I specify alternate sender address(From) when sending with /bin/mailx ?

Posted on 2008-04-19 18:05:44 by Bill Cole

In article
<d0550dfd-882a-4c36-91f7-58d355b5f531@s50g2000hsb.googlegroups.com>,
viki <vikimun@gmail.com> wrote:

> How do I specify alternate sender address(From) when sending with /bin/
> mailx ?
>
> Thanks
> Viki

Assuming that your /bin/mailx is not significantly different from the
traditional BSD version, you can't.

--
Now where did I hide that website...

Report this message

#4: Re: How do I specify alternate sender address(From) when sendingwith /bin/mailx ?

Posted on 2008-04-20 05:21:21 by Dennis Peterson

viki wrote:
> How do I specify alternate sender address(From) when sending with /bin/
> mailx ?
>
> Thanks
> Viki

Please don't cross-post. It creates food fights between the various
factions.

The Solaris 9 man page for mailx offers this environment variable
description:

returnaddr=string
The default sender address is that of the current
user. This variable can be used to set the sender
address to any arbitrary value. Set with caution.

No reason to think it is found in all mailx versions, and may not
accomplish what you wish.

dp

Report this message

#5: Re: How do I specify alternate sender address(From) when sending with /bin/mailx ?

Posted on 2008-04-20 12:38:30 by Frank Slootweg

viki <vikimun@gmail.com> wrote:
> How do I specify alternate sender address(From) when sending with /bin/
> mailx ?

If it's a *fixed* From:, i.e. always the same, then perhaps this old
trick might work. Note: I haven't used it for years and can't test it
a the moment, so proceed at your own risk:

In .mailrc:
===========
set sendmail=/home/user/local/bin/mymail

Script /home/user/local/bin/mymail:
===================================
#! /usr/bin/sh

{
echo "From: Your Name <user@host.domain>"
cat
} | /usr/sbin/sendmail $*

Note: In my script I still have a few commented-out debug statements.
Perhaps they come in handy if you can't get thing to work right-away:

Before the '{ ... }' construct:
===============================
# echo '$0:' $0 >>/home/franks/mymail.log
# echo '$*:' $* >>/home/franks/mymail.log
# DOLLAR_STAR="$*"
# echo '$DOLLAR_STAR:' X${DOLLAR_STAR}X >>/home/franks/mymail.log

After the '{ ... }' construct, i.e. *instead* of the current '} ...' line:
============================================================ ==============
# } | tee -a /home/franks/mymail.log | /usr/sbin/sendmail $*
# } | tee -a /tmp/mm$$ | /usr/sbin/sendmail $DOLLAR_STAR
# } | tee -a /tmp/mm$$ | /usr/sbin/sendmail -t

I hope this helps.

Report this message

#6: Re: How do I specify alternate sender address(From) when sending with /bin/mailx ?

Posted on 2008-04-20 12:38:30 by Frank Slootweg

viki <vikimun@gmail.com> wrote:
> How do I specify alternate sender address(From) when sending with /bin/
> mailx ?

If it's a *fixed* From:, i.e. always the same, then perhaps this old
trick might work. Note: I haven't used it for years and can't test it
a the moment, so proceed at your own risk:

In .mailrc:
===========
set sendmail=/home/user/local/bin/mymail

Script /home/user/local/bin/mymail:
===================================
#! /usr/bin/sh

{
echo "From: Your Name <user@host.domain>"
cat
} | /usr/sbin/sendmail $*

Note: In my script I still have a few commented-out debug statements.
Perhaps they come in handy if you can't get thing to work right-away:

Before the '{ ... }' construct:
===============================
# echo '$0:' $0 >>/home/franks/mymail.log
# echo '$*:' $* >>/home/franks/mymail.log
# DOLLAR_STAR="$*"
# echo '$DOLLAR_STAR:' X${DOLLAR_STAR}X >>/home/franks/mymail.log

After the '{ ... }' construct, i.e. *instead* of the current '} ...' line:
============================================================ ==============
# } | tee -a /home/franks/mymail.log | /usr/sbin/sendmail $*
# } | tee -a /tmp/mm$$ | /usr/sbin/sendmail $DOLLAR_STAR
# } | tee -a /tmp/mm$$ | /usr/sbin/sendmail -t

I hope this helps.

Report this message