Mail Using Telnet SMTP

Hi All,

I am trying to send email using telnet to smtp as mailx and other functionality is restricted by administrator.

I am not able to figure out as how to attach any text or any file using the below.

I am following all instructions and steps as shown at http://exchange.mvps.org/smtp_frames.htm

1. telnet <servername> 25
2. helo <your domain name><enter>
3. mail from: <your Email Address><enter>
response should be as follows
250 OK - mail from <your Email address>

rcpt to: <recipient address><enter>
response should be as follows
250 OK - Recipient <recipient address>

data<enter>
response should be as follows
354 Send data. End with CRLF.CRLF

To: <recipient's display name><enter>
From: <your display name><enter>
Subject: <Subject field of Email message><enter>
<Enter you body text><enter><enter> . <enter>
response should be as follows
250 OK

quit<enter>


Similar Content



Sending Mail From Command Line

I searched the forums for my title and I am not finding exactly what I am looking for. I am not using a program to send mail, such as Thunderbird or whatever. I simply want to be able to send mail from my Ubuntu 14.04 DESKTOP version for logging. I use a program called Logwatch (used alot in RHEL or CentOS) to monitor the server itself. The program sends mail to the root user account on the machine, which I can check and see, and within the program conf file, I can add an external email address, but it never sends.

I'm familiar with the SMTP concept of sending mail, outgoing mail server authentication, etc. I don't care to run this box as an SMTP server, but I understand that I need some sort of SMTP or MTA program to send mail into the real world. I tried Postfix but couldn't get that to work, and the Logwatch program wants to use sendmail, so I installed that but I am having the same issue. I am sure it is a step I am missing.

I also can't figure out how to get the 'mail' cmd from Terminal to work. I use this command:
Code:
mail -s "test" | /usr/sbin/mail myemail@domain.com

it follows through the subject, CC, body, but when I try to hit either . or CTRL-D, it never sends the email, in fact is does nothing.

I also tried sendmail with this command:
Code:
sendmail -v my@email.com < /dev/null

I was just trying to send a test email. It logs into my SMTP mail server, which I already configured, and it tells me to type out the mail, then end with a "." by itself on a single line. I try this and it just sits there.

I am missing SOMETHING when trying to actually send the mail. I can get it written with subject and body, connected, but it never sends and I am probably missing a / or something.

I did find and follow these instructions, but it still isn't working with sendmail. If I need to go back to Postfix, I can do that, I don't honestly care what I use, I just want some programs such as Logwatch to be able to email me.
http://stackoverflow.com/questions/1...mail-on-ubuntu

When I Press Enter, It Is Taken Twice

I have written a script to start a virtual machine through pass through mode and port number.

I start the guest linux through Run command from windows
telnet <baseIP> <portNUm>

Then after connecting to that guest machine,

each enter taking twice.

Any help will be greatful

Qmail Help

Hi All,
We have qmail server running on RHEL6.5. We have already made sure that our server is not acting as an open relay with the help of http://mxtoolbox.com/diagnostic.aspx.
But still anyone can telnet to our domain and send fake emails to anybody@ourdomain.com. For example Code:
telnet mail.ourdomain.com 25
helo mail.ourdomain.com
mail from: unknown@anyname.com
rcpt to: anyemailid@ourdomain.com
data
from: "Any Unknow name" <unknown@anyname.com>
to: "Some user Name" <anyemailid@ourdomain.com>
subject: Testing MTA with telnet

Hi,
This way anybody can fool us.

Regards,

.
quit

So can anybody pls help me to prevent this. I meant to say, we should not block port 25, instead it should verify whether or not "from email id" is exist in our domain, if it is exist then it should ask for the password also or if it is not exist then also it should not take us to next step. Because as per above example anybody can fool us as the mail is coming from outside but it is just from our domain to our domain without any authentication!!!
Expecting your kind help to block sending mails in this way.

Squid Server Asks Me To Enter Username And Password Twice

I am experiencing a strange issue where squid asks me to authenticate twice. Here is how it goes:

I have my Firefox browser set to go out my squid proxy. Whenever I open the browser I am prompted for my username and password, which I enter. Immediately the browser fetches my homepage, however, at almost the exact same time I am prompted to enter my username and password again.

Clearly the I entered the correct information the first time or the browser would never load my homepage. The odd part is that sometimes I can just cancel the second request for a username and password without issue. Other times I MUST enter it to continue browsing.

Here is a copy of my config: http://pastebin.com/mdM7gfLf

Any ideas on what is going on here? Thanks in advance to anyone who has some thoughts on this.

Why Wont My Code Work, " SyntaX Error: Unexpected End Of File"

i have been trying to get this peice of code to work but i cant seem to get it to work.
im just starting out coding and kinda poking around in the dark to get this resolved, any help would be much appriciated, thankyou


Quote:
#!/bin/bash

echo "Would you like to scan using nmap or hping?"

read scanner

if "$scanner" = "nmap" : then

echo "Enter the starting IP address :"

read FirstIP

echo "Enter the last IP address :"

read LastIP

echo "Enter the port number you want to scan for :"

read port

nmap -sT $FirstIP-$LastIP -p $port -oG web
cat web | grep open > web1
cat web1 | cut -f2 -d ":" | cut -f1 -d "(" > web2
cat web2


elit



echo "Which IP address would you like to scan?"

read IPaddress

echo echo "What port would you like to scan for ?"

read hpingport

echo "How many packets would you like to send?"

read packets

hping3 -c $packets $IPaddress -p $hpingport > hpingscan

cat hpingscan
thankyou for any help

Bash User Input With Static Value Validation

So I created this big script and want to ask for username and set a variable, however if the username exist in the username variable then continue with script otherwise ask the user to enter his name.

Flow:
-- start script "Enter User Name"
-- ask user to input username
-- if username is blank or different value then put that username in $USERNAME variable
-- then continue with the rest of the script

-- next time this user runs the script it will have his name loaded so he just presses enter to continue with the script.

-- If it is NOT the same user then, new user can erase existing input and enter a new name.

Hope it makes sense...

Thanks in advance for the help.

Unable To Enter Command Because Of Daemon Job On Startup

Good day

I have a application that startup as a daemon when the system boot-up. My problem is that it display that this application is running and nothing else is happening then. I am unable to enter any commands. I have tried all kind off key presses but cannot get to the prompt.

First off all why will this happen and then is there a way to get to the prompt without accessing the system with the network?

Thank you.

Cant Enter To Settings (general) On Centos 7

Hello everyone,

Something happened with my centos partition and now i cant enter to settings via gui.

Can someone explain how to go there using the command line?

What i want to do is to change the screen resolution and i dont know how to do it using the console. I read some old threads about it but im a noob and dont get it.

Thanks in advance

Postfix Modify Recipient Address

Hi,
I am trying to configure my postfix to do the following :
when received a message to :
xxx@domain.com
change the recipient to :
xxx@host.doamin.com

can't find where to do it .

Kindly assist.

Yoni

Help With 'CASE'

Hi guys,

i'm beginner with Unix, I tried my best, but I Really don't know how to finish it .

here's my problem : I have to do something like Student system - student's name | subjects | mark |credits.

after starting script it will ask you for Student's name, then which subject, then the mark will appear.

It's a homework, and I have my own idea how to solve it, but cannot finish it, i don't want complete solution, just a help!

Code:
#!/bin/bash
echo "Students name"
echo -n "Enter student's name: "
read name
echo
case $name in
Example1|Math) echo "C" ;;
Example2|Programming) echo "D" ;;
Example3|WWW) echo "A" ;;
Example4|Economie) echo "-" ;;
esac

I don't now how to bring together case with second things which is "enter subject".

I appreciate any help