mail command option for return address on linux

mail command option for return address on linux

am 01.08.2007 01:00:31 von Prakash

Hello All,

I am migrating/porting Solaris scripts to Linux Platform.
One of script uses mailx command on Solaris and we don't have mailx on
Linux.
Company policy is not to install mailx rpm on production server for
some security reason.
Instead we are using mail command.

Here is the prob:
mailx has -r option for return address. equivalent option for mail
command is not available on linux platform. How to specify return
address using mail command?.

Please let me know if you have any solution for this.

Thanks & Regards,
Prakash

Re: mail command option for return address on linux

am 01.08.2007 02:02:08 von Sam

This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_mimegpg-commodore.email-scan.com-12540-1185926528-0005
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Prakash writes:

> Hello All,
>
> I am migrating/porting Solaris scripts to Linux Platform.
> One of script uses mailx command on Solaris and we don't have mailx on
> Linux.
> Company policy is not to install mailx rpm on production server for
> some security reason.

Your company should also have a policy of firing whoever sets such a policy,
for incompetence. Really, there is no such security reason, at all.

> Instead we are using mail command.
>
> Here is the prob:
> mailx has -r option for return address. equivalent option for mail
> command is not available on linux platform. How to specify return
> address using mail command?.
>
> Please let me know if you have any solution for this.

Forget the mail command. Use the sendmail command, and provide whatever you
want to provide, in your From: header, and the -f option.

And there ain't no way your rocket scientists are going to remove the
sendmail command, since a lot of stuff is going to break if they do.

Really, I have to laugh at morons like that, who think there's something
wrong with "security" of mailx. Those idiots have no idea what "security"
means, in the first place.

Besides, there is absolutely /nothing/ that stops you from downloading a
copy of the mailx command, for your Linux distribution, and just running it
yourself, from your home directory!

Some security you got there.



--=_mimegpg-commodore.email-scan.com-12540-1185926528-0005
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBGr82Ax9p3GYHlUOIRArU2AJ0f9AkVdfr1v96cNvc5qjS6v7gQVwCe PfDr
fzp4MGE2uTmEeWCvwThtypE=
=rxW0
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-12540-1185926528-0005--

Re: mail command option for return address on linux

am 01.08.2007 12:13:48 von Frank Slootweg

Sam wrote:
[deleted]
> Prakash writes:
>
> > Hello All,
> >
> > I am migrating/porting Solaris scripts to Linux Platform.
> > One of script uses mailx command on Solaris and we don't have mailx on
> > Linux.
> > Company policy is not to install mailx rpm on production server for
> > some security reason.
>
> Your company should also have a policy of firing whoever sets such a policy,
> for incompetence. Really, there is no such security reason, at all.

Perhaps someone heard of the very ancient mailx (Berkeley Mail) bug by
which you could get it to execute commands embedded in mail messages?

At the time that was, amongst others, (ab)used in News control
messages in order to try to get info from News systems for later breakin
attempts. (News admin accounts often used Berkeley Mail to mail News
control messages to the News admin.) Of course all of this is over a
decade ago.

[deleted]

> Forget the mail command. Use the sendmail command, and provide whatever you
> want to provide, in your From: header, and the -f option.
>
> And there ain't no way your rocket scientists are going to remove the
> sendmail command, since a lot of stuff is going to break if they do.

Does 'Linux' have the ssmtp (send-only sendmail look-alike) command by
default? If so, that might be another option.

But I agree with you, sendmail is the best option, i.e. make it a UNIX
solution instead of a Linux one. I.e. better a de facto standard than no
standard.

[deleted]

Re: mail command option for return address on linux

am 02.08.2007 00:30:58 von Sam

This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_mimegpg-commodore.email-scan.com-21583-1186007457-0010
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Frank Slootweg writes:

> Sam wrote:
> [deleted]
>> Prakash writes:
>>
>> > Hello All,
>> >
>> > I am migrating/porting Solaris scripts to Linux Platform.
>> > One of script uses mailx command on Solaris and we don't have mailx on
>> > Linux.
>> > Company policy is not to install mailx rpm on production server for
>> > some security reason.
>>
>> Your company should also have a policy of firing whoever sets such a policy,
>> for incompetence. Really, there is no such security reason, at all.
>
> Perhaps someone heard of the very ancient mailx (Berkeley Mail) bug by
> which you could get it to execute commands embedded in mail messages?

That may very well be true, but at the same time I have no doubt whatsoever
that those rocket scientists have never heard of it.

> At the time that was, amongst others, (ab)used in News control
> messages in order to try to get info from News systems for later breakin
> attempts. (News admin accounts often used Berkeley Mail to mail News
> control messages to the News admin.) Of course all of this is over a
> decade ago.

Right. But, I am fully confident that all these brainiacs are concerned
about is forging the From: header, and that's how these whiz kids think they
can stop it.

> [deleted]
>
>> Forget the mail command. Use the sendmail command, and provide whatever you
>> want to provide, in your From: header, and the -f option.
>>
>> And there ain't no way your rocket scientists are going to remove the
>> sendmail command, since a lot of stuff is going to break if they do.
>
> Does 'Linux' have the ssmtp (send-only sendmail look-alike) command by
> default? If so, that might be another option.

And even if not, telnet localhost 25 will do the trick.

Really, this is a joke.


--=_mimegpg-commodore.email-scan.com-21583-1186007457-0010
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBGsQmhx9p3GYHlUOIRAtSkAJ9l7ySTepWRwgns+DLeazbQhdk2OQCf Y/R2
n54CgweuQbFqIr6qtpmI0vo=
=XDcY
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-21583-1186007457-0010--