This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.
| « | July 2008 | » | ||||
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||
Install Mailscanner MRTG
Email with attachments from command line
Easy Mailscanner + Clam Antivirus + SpamAssassin *Updated 5/9/2003*
Set up Tripwire on RedHat
Chkrootkit
Use SFTP (Secure FTP via SSH2) instead of FTP
OpenSSH public key login (no password)
Easy CURL 7.10.4 w/SSL
APF Firewall 0.9.4-7
Antidos via APF Firewall
Sending emails from command line
I’ll describe possible ways to send emails from the command line. Of course there are much nicer ways to do it, but you may be in the situation (such as the one that drove me to do a deeper research and come out with this solution) and will need an easy and fast way to send mails from the prompt.
Simple text emails:
You can send simple emails by using the already installed sendmail program with the following command at the prompt:
echo "Simple, small body Text goes here" | mail -s "The Subject goes here" user@domain.com
If you have already typed a message in a text file, then import the text into the body of the email you are sending by using command:
mail -s "The Subject goes here" user@domain.com < text_file
Disadvantage: the email will be sent using header From: root@host.domain.com
Advanced emails with attachments:
If you need to send emails containing attachments, then I’ll recommend you to use an additional program not included on the standard Linux distributions, since there it were no way I could find a way to use the build in tools to do it.
This is a mature software, very well documented and with constant development to keep up to date and using most possible features we’ll need.
Program: Email
Version: 2.2.2
WebSite: http://email.cleancode.org/
As root:
Create a temp folder to download the source:
mkdir email
cd email
wget http://email.cleancode.org/download/email-2.2.2.tar.gz
tar –zxvf email-2.2.2.tar.gz
cd email-2.2.2
Run the following commands to have it installed:
./configure
Create the installation file:
make
Run the installation:
su -c 'make install'
At the end you’ll get the program installed with:
Binary directory: /usr/local/bin
Email Files /usr/local/etc/email
Edit the configuration file:
You can select to send email by SMTP or by sendmail.
I personally use sendmail for easiness.
pico -w /usr/local/etc/email/email.conf
For sendmail:
Comment out lines: (add # at the beginning of the line)
#SMTP_SERVER = '127.0.0.1'
#SMTP_PORT = '25'
Uncomment line: (remove # from the beginning of the line)
SENDMAIL_BIN = '/usr/lib/sendmail -t -i'
Set sender personal info with something like:
MY_NAME = 'System Administrator'
MY_EMAIL = 'info@domain.com'
REPLY_TO = 'info@domain.com'
Exit and save
Ctrl x
y
For SMTP:
You got the idea, just fill out SMTP variables with proper info.
Edit the signature file:
pico -w /usr/local/etc/email/email.sig
Set it as appropriate with relevant info.
I’d recommend removing line: (to keep system privacy)
On System: %h
Exit and save
Ctrl x
y
System installed and configured.
Some usage example:
Let say you are using Mailsacanner with ClamAV, and a valid attachment was removed, then a customer contacted you with the email MailScanner sent him, including the file name and info and the path were the attachment was quarantined:
It’ll read something like:
...
The original e-mail attachment "file_name.zip"
… …
Note to Help Desk: Look on the E-MailSystem MailScanner in /var/spool/MailScanner/quarantine/20040730 (message i6UKnWp02396)
…
With that info will do:
cd /var/spool/MailScanner/quarantine/20040730/i6UKnWp02396
Verify the mentioned file exists:
ls
decompressed_file_name.pdf file_name.zip
Execute the email command to send the attachment:
email -s "Attachment" -a file_name.zip user@domain.com
Info: -s = Subject -a = Attachment
For the email body, the system default editor will open up, usually vi
Type in whatever message you want to tell:
To start typing:
Shift a
Dear customer:
Find attached the removed file.
Regards,
To finish typing press:
[ESC]
To quit vi type:
:exit
As soon as vi exists, the email will be sent, and will give you a nice progress bar.
Read the README file for more usage options and tweaks.
pico /path/to/download/folder/email-2.2.2/README
Credits: http://www.integrese.com/
freeoneida
http://freeoneida.bravehost.com
[URL=http://freeoneida.bravehost.com]Oneida Flatware[/URL]
oneida flatware
adultfriendfinder
http://adultfriendfinder2.bravehost.com
[URL=http://adultfriendfinder2.bravehost.com]adultfriendfinder[/URL]
adultfriendfinder
floridalotteryer
http://floridalottery2.bravehost.com
[URL=floridalottery2.bravehost.com]floridalottery[/URL]
floridalottery
google
http://goglez.bravehost.com
[URL=http://goglez.bravehost.com]google[/URL]
google
oneida-flatware.tdfsf.info
http://oneida-flatware.tdfsf.info
[URL=http://oneida-flatware.tdfsf.info]oneida-flatware[/URL]
oneida-flatware
http://oneida-flatware.sauiu.info
http://oneida-flatware.lpppj.info
December 2005
November 2005
September 2005
Apache [4]

CentOS [1]

Cpanel [13]

DNS [1]

Ensim [3]

Fedora [1]

Mail [3]

Plesk [3]

RedHat [5]

Sales [4]

Security [6]

SQL [1]

SSH [3]

SSL [1]

Streaming audio [1]

System [10]

Webppliance [1]

Boonic Net
Apple
Audio y Video
Bloogo
Boonic Argentina
Boonic Brasil
Boonic Business
Boonic Castellano
Boonic English
Cámaras Digitales
Celulares
Cine - Música
Computadoras
Hoteles Argentina
Ipod Brasil
Ipod en Castellano
Juegos Flash
Letras gratis
Mega Notebooks
PlayStation
Software
Letras de Canciones
Diccionario Ciencia
Hoteles Salta
Hoteles Jujuy