- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Blocking Reverse Address in Mailx
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2007 08:24 PM
10-28-2007 08:24 PM
We all are aware of reverse address functionality of the mailx but its proving a security threat for me. As i understand, anyone can send a mail from anyone by specifying the mailx -r (fake Address) to anyone. The mails received at Exchange -->Outlook has the spoofed from address.
While i understand the legalities and that it can be tracked well at exchange level, is there any way i can block this feature. I wish users to send mail(from Address) with their username@domain.com only. (DM is Masqueraded already)... No allow of Mail From Field.
Thanks a ton for help.
Cheers!
Anshu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 03:55 AM
10-29-2007 03:55 AM
Re: Blocking Reverse Address in Mailx
i.e. if any arg = -r then echo sorry and exit.
You will have to put the wrapper back anytime you apply patches relevant to the mailx command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 12:41 PM
10-29-2007 12:41 PM
Re: Blocking Reverse Address in Mailx
SMTP is not a secure protocol. If you block mailx -r there is nothing stoping the user from using another method to spoof the sender. If the user really wanted to they could simply telnet to your exchange server on TCP/25 and interactively send an email.
I wouldn't waste any time trying to lockdown mailx.
Regards,
Philip.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 12:42 PM
10-29-2007 12:42 PM
Re: Blocking Reverse Address in Mailx
SMTP is not a secure protocol. If you block mailx -r there is nothing stopping the user from using another method to spoof the sender. If the user really wanted to they could simply telnet to your exchange server on TCP/25 and interactively send an email.
I wouldn't waste any time trying to lockdown mailx.
Regards,
Philip.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 05:27 PM
10-29-2007 05:27 PM
Re: Blocking Reverse Address in Mailx
Is it something like this?
command
{
If (arg = -r )
echo " Not allowed"
else
continue
}
Never did this so i need some coding help in this regard.
2: I understand that a user can directly telnet to the Exchange on port 25 and do it with commands still i need to secure this first. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 07:33 PM
10-29-2007 07:33 PM
Re: Blocking Reverse Address in Mailx
a wrapper script is not going to do much to protect you. Wrapper scripts work by hiding the real binary and parsing any variables passed and then calling the real binary. The issue is that for a shell script to be executable it needs to be readable - therefore the real location of the binary is visible to any users that can read the file (wrapper).
You'd need to write the wrapper in C to make this work. You then also need to make sure that your wrapper is not overwritten when you add OS patches to the server.
I'm really not sure what problem your trying to solve here. Its not a technology one - its more likely a people one that you should solve with policy. :)
Cheers,
Philip.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 07:59 PM
10-29-2007 07:59 PM
SolutionExcept that what Philip mentioned makes this useless, here is an example:
#!/usr/bin/ksh
# Checks for -r and gives error
set -A save
(( i = 0 ))
while [ $# -gt 0 ]; do
case "$1" in
-r*) echo "-r not allowed" 1>&2
exit 1
;;
*) save[i]="$1"
(( i += 1 ))
;;
esac
shift
done
set -- "${save[@]}"
/usr/bin/mailx "$@"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2007 09:31 PM
10-29-2007 09:31 PM
Re: Blocking Reverse Address in Mailx
I hope this can be stopped only with education and IT policy only. ;)
Thanks for your great advices and feedbacks.
Cheers!
Closing thread!
Anshu