Sunday, 5 May 2013

Sending emails from the Terminal in linux | Send mail using terminal

In this post I’m going to explain how to set up sSMTP in order to send emails through your Gmail right from the Terminal. Once you have sSMTP set up you can also use cron jobs to get you computer/server to automatically email you when there is a problem. Please note that this only works on Linux (and Mac OS X).

First we install sSMTP:

    sudo apt-get install ssmtp

Configure sSMTP by editing ssmtp.conf:

    vi /etc/ssmtp/ssmtp.conf

You can delete everything in that file and just replace it with this:

(If the gmail is a Google Apps account then use the full email address for the AuthUser.)
Now we need to edit revaliases to add each user account we want to send mail from:

    vi /etc/ssmtp/revaliases


And we’re done!

To send emails from the Terminal either type:

    echo “email content” | mail -s “email subject”



Then enter the following:

    Subject: this is your email subject
    And here you write the content of the email

And to send the email, press: CTRL+D
(N.B. The empty line between the Subject and the content of the email must not be omitted)

You can also send emails using a text file:

    ssmtp < message.txt

(The contents of message.txt must be in the same format as above)

Depending on your machine’s set up, it may be necessary to remove sendmail and install mailutils:

    sudo service sendmail stop
    sudo apt-get remove sendmail
    sudo apt-get install mailutils

If you have any questions please leave a comment!

Full speed download on Firefox

(* try this at your own risk)

I just read on a forum that this can really boost Firefox’s speed for broadband users. Until you enable this tweak, you won?t realize how much bandwidth you?re not utilizing when you?re browsing the web:

1.Type about:config into the address bar and press enter.

2. Now alter these entries as follows (just search for them):

network.http.max-connections: 96
network.http.max-connections-per-server: 48
network.http.max-persistent-connections-per-proxy: 24
network.http.max-persistent-connections-per-server: 12
network.http.pipelining: true
network.http.pipelining.maxrequests: 64
network.http.proxy.pipelining: true

3. Right-click anywhere and select New-> Integer. Name it nglayout.initialpaint.delay and set its value to 0 (zero). This value is the amount of time the browser waits before it acts on information it recieves.

You have to close your browser after you make the changes. When you start it back up they will be in effect.

If you’re using a broadband connection you’ll load pages MUCH faster now!

Useful Run Commands for Windows

Here is a list of useful commands that you can run from the Run Command prompt in windows XP. The Run Command prompt itself can be found on the start menu or with the key combination ‘WINDOWS+R’.

Accessibility Controls - access.cpl
Add Hardware Wizard - hdwwiz.cpl
Add/Remove Programs - appwiz.cpl
Administrative Tools - control admintools
Automatic Updates - wuaucpl.cpl
Bluetooth Transfer Wizard - fsquirt
Calculator - calc
Certificate Manager - certmgr.msc
Character Map - charmap
Check Disk Utility - chkdsk
Clipboard Viewer - clipbrd
Command Prompt - cmd
Component Services - dcomcnfg
Computer Management - compmgmt.msc
Date and Time Properties - timedate.cpl
DDE Shares - ddeshare
Device Manager - devmgmt.msc
Direct X Control Panel (If Installed)* - directx.cpl
Direct X Troubleshooter - dxdiag
Disk Cleanup Utility - cleanmgr
Disk Defragment - dfrg.msc
Disk Management - diskmgmt.msc
Disk Partition Manager - diskpart
Display Properties - control desktop
Display Properties - desk.cpl
Display Properties (w/Appearance Tab Preselected) - control color
Dr. Watson System Troubleshooting Utility -
Driver Verifier Utility - verifier
Event Viewer - eventvwr.msc
File Signature Verification Tool - sigverif
Findfast - findfast.cpl
Folders Properties - control folders
Fonts - control fonts
Fonts Folder - fonts
Free Cell Card Game - freecell
Game Controllers - joy.cpl
Group Policy Editor (XP Prof) - gpedit.msc
Hearts Card Game - mshearts
Iexpress Wizard - iexpress
Indexing Service - ciadv.msc
Internet Properties - inetcpl.cpl
IP Configuration (Display Connection Configuration) - ipconfig /all
IP Configuration (Display DNS Cache Contents) - ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) - ipconfig /flushdns
IP Configuration (Release All Connections) - ipconfig /release
IP Configuration (Renew All Connections) - ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) - ipconfig /registerdns
IP Configuration (Display DHCP Class ID) - ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) - ipconfig /setclassid
ava Control Panel (If Installed) - jpicpl32.cpl
Java Control Panel (If Installed) - javaws
Keyboard Properties - control keyboard
Local Security Settings - secpol.msc
Local Users and Groups - lusrmgr.msc
Logs You Out Of Windows - logoff
Microsoft Chat - winchat
Minesweeper Game - winmine
Mouse Properties - control mouse
Mouse Properties - main.cpl
Network Connections - control netconnections
Network Connections - ncpa.cpl
Network Setup Wizard - netsetup.cpl
Notepad - notepad
Nview Desktop Manager (If Installed) - nvtuicpl.cpl
Object Packager - packager
ODBC Data Source Administrator - odbccp32.cpl
On Screen Keyboard - osk
Opens AC3 Filter (If Installed) - ac3filter.cpl
Password Properties - password.cpl
Performance Monitor - perfmon.msc
Performance Monitor - perfmon
Phone and Modem Options - telephon.cpl
Power Configuration - powercfg.cpl
Printers and Faxes - control printers
Printers Folder - printers
Private Character Editor - eudcedit
Quicktime (If Installed) - QuickTime.cpl
Regional Settings - intl.cpl
Registry Editor - regedit
Registry Editor - regedit32
Remote Desktop - mstsc
Removable Storage - ntmsmgr.msc
Removable Storage Operator Requests - ntmsoprq.msc
Resultant Set of Policy (XP Prof) - rsop.msc
Scanners and Cameras - sticpl.cpl
Scheduled Tasks - control schedtasks
Security Center - wscui.cpl
Services - services.msc
Shared Folders - fsmgmt.msc
Shuts Down Windows - shutdown
Sounds and Audio - mmsys.cpl
Spider Solitare Card Game - spider
SQL Client Configuration - cliconfg
System Configuration Editor - sysedit
System Configuration Utility - msconfig
System File Checker Utility (Scan Immediately) - sfc /scannow
System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce
System File Checker Utility (Scan On Every Boot) - sfc /scanboot
System File Checker Utility (Return to Default Setting) - sfc /revert
System File Checker Utility (Purge File Cache) - sfc /purgecache
System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x
System Properties - sysdm.cpl
Task Manager - taskmgr
Telnet Client - telnet
User Account Management - nusrmgr.cpl
Utility Manager - utilman
Windows Firewall - firewall.cpl
Windows Magnifier - magnify
Windows Management Infrastructure - wmimgmt.msc
Windows System Security Tool - syskey
Windows Update Launches - wupdmgr
Windows XP Tour Wizard - tourstart
Wordpad - write

Source :-