Skip to main content

Linux Send Email



Send email



1…………………………………………………………………………………………..

[root@tecadmin ~]# vi /tmp/email.txt

Subject: Terminal Email Send

Email Content line 1
Email Content line 2

[root@tecadmin ~]# sendmail user@example.com  < /tmp/email.txt
 
 
 
2…………………………………………………………………………………………………
# - user inputs
 
# telnet localhost smtp
 
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 fbreveal.com ESMTP Sendmail 8.13.8/8.13.8; Tue, 22 Oct 2013 05:05:59 -0400
# HELO yahoo.com
250 tecadmin.net Hello tecadmin.net [127.0.0.1], pleased to meet you
# mail from: sender@tecadmin.net
250 2.1.0 sender@tecadmin.net... Sender ok
# rcpt to: myemail@ymail.com
250 2.1.5 myemail@ymail.com... Recipient ok
# data
354 Enter mail, end with "." on a line by itself
# Hey This is test email only Thanks
#.
250 2.0.0 r9M95xgc014513 Message accepted for delivery
# quit
221 2.0.0 fbreveal.com closing connection
Connection closed by foreign host.
 
 

Telnet

 
To check port
telnet 192.168.8.109 2302

IP Trace


$ traceroute google.com
$ tracepath google.com

cURL


curl http://www.google.com
get the content
curl -L http://www.google.com
-L can be used if location is moved, this will follow the header.
curl -u username:password URL
Can pass the credentials along with the url
curl -v http://google.co.in

-v is verbose mode, will print all the details
curl --mail-from blah@test.com --mail-rcpt foo@test.com smtp://mailserver.com
Send email


Comments

Popular posts from this blog

Oracle Database 12c installation on Ubuntu 16.04

This article describes how to install Oracle 12c 64bit database on Ubuntu 16.04 64bit. Download software  Download the Oracle software from OTN or MOS or get a downloaded zip file. OTN: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit). edelivery: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit)   Unpacking  You should have following two files downloaded now. linuxamd64_12102_database_1of2.zip linuxamd64_12102_database_2of2.zip Unzip and copy them to \tmp\databases NOTE: you might have to merge two unzipped folders to create a single folder. Create new groups and users Open a terminal and execute following commands. you might need root permission. groupadd -g 502 oinstall groupadd -g 503 dba groupadd -g 504 oper groupadd -g 505 asmadmin Now create the oracle user useradd -u 502 -g oinstall -G dba,asmadmin,oper -s /bin/bash -m oracle You will prompt to set to password. set a momorable password and write it down. ...

DBCA : No Protocol specified

when trying to execute dbca from linux terminal got this error message. now execute the command xhost, you probably receiving No protocol specified xhost:  unable to open display ":0" issue is your user is not allowed to access the x server. You can use xhost to limit access for X server for security reasons. probably you are logged in as oracle user. switch back to default user and execute xhost again. you should see something like SI:localuser:nuwan solution is adding the oracle to access control list xhost +SI:localuser:oracle now go back to oracle user and try dbca it should be working

Slow CPU after resume / Ubuntu 16.04 LTS too slow after suspend and resume

you might experience a slow performance in ubuntu 16.04 after resuming back from a sleep or hibernate. reason for this is it doesn't move away from powersave mode automatically. intel_pstate driver is the one making this problem, so we have to disable it and use acpi-cpufreq  driver. first lets check weather your competer is on powersave.  cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor If your answer is powersave we have to move it to performance state. get your cpu info by cat /proc/cpuinfo | grep MHz  probabaly you seeing 4 cores lets update scaling governers     echo 'performance' > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor     echo 'performance' > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor     echo 'performance' > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor     echo 'performance' > /sys/devices/system/cpu/cpu3/cpufreq/scaling_g...