How to add init script as a service

image_pdfimage_print

1. You need to create a script file inside of

We will add this script to chkconfig

After list the CHKconfig LIST

Start the service

Example Init Script

 

#===================================================================
Other Method  , Soon  :__)

 

 

How to disable directory listing in Apache or HTTPd

image_pdfimage_print

Where is the config file
>>> httpd.conf

 

sendmail bash script to send mail

image_pdfimage_print

# send mail config

 

 

mail command send mail

image_pdfimage_print

 

Godaddy Ssmtp Server Configuration

image_pdfimage_print

After the installing  SMTP server   you need this configurations

 

ssmtp mail server setup and configuration

image_pdfimage_print

Install ssmtp Install ssmtp: sudo apt-get install ssmtp

Edit the ssmtp config file : gksu gedit /etc/ssmtp/ssmtp.conf

Enter this in the file:

#!!! Do not use  STARTTLS and  TLS  in the same time,  You cant use both of them in the same time. 

 
Enter the email address of the person who will receive your email:

Subject: Sent from a terminal!

Your content goes here. Lorem ipsum dolor sit amet, consectetur adipisicing.

To send the email: Ctrl + D

You can also save the text mentioned in Point 5 into a text file and send it using:

ssmtp recipient_name@gmail.com < filename.txt

Linux install E-mail server and make test

image_pdfimage_print

Create a virtual domain, and a virtual user inside that domain

Do a telnet to the port 25 of your server and send a mail to that domain and see if it’s delivered. You can check the error logs through tail -f /var/log/mail.log  -f from a different console. Using telnet is easy

Command line send mail


Postfix configuration