Saturday, March 29, 2014

unzip multipal zip files

Use below command to unzip multipal zip files:

#unzip '*.zip'

Sunday, March 9, 2014

Send Email from a PHP Script Example

Send Email from a PHP Script Example

To send a simple sample message, we could use:


Email successfully sent!
");  } else {   echo("Email delivery failed…
");  } ?>

Remove session files under /tmp weekly

Remove session files under /tmp weekly


root@host [/scripts]# ll | grep cleanup.sh
-rwxr-xr-x  1 root root      39 Nov 21 10:41 cleanup.sh*
root@host [/scripts]# cat cleanup.sh
find /tmp/  -name "sess_*" | xargs rm

root@host [/scripts]#
================================
weekly on sunday 1 PM
00 1 * * 7  /scripts/cleanup.sh
================================

create cpanel backup without public_html and without database

# /scripts/pkgacct  --skiphomedir --skipacctdb  CPANEL_USER

Find command


Recursive chmod only files within this folder:

find . -type f -exec chmod 0644 {} \;

Recursive chmod only folders within this folder:

find . -type d -exec chmod 0755 {} \;

into a bash script, so it could be something like:

For files:

rchmodf 744 .

For directories:

rchmodd 755 .

and... also maybe into a nautilus right click menu option if that's possibl

How to check for mod_rewrite is enabled or not.

How to check for mod_rewrite is enabled or not.

1- First of all create an empty file and name it test.html (or what you want) and upload this file on you hosting server.
# touch test.html

2- Create a .htaccess file and put the following code into it. (create htaccess.txt file )
#touch .htaccess
-------------------------

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^test\.html http://www.google.com/? [R=301,L]
------------------------
Note: On windows machine first create htaccess.txt file, then adds the above code into it, upload on server, after uploading remove the .txt extension.

3- Now run this URL into your browser http://www.domain-name.com/test.html (replace domain-name.com with your actual domain name).

If it redirects you on google.com then "mod_rewrite" is working on your server host, if it is not, shows you a blank file means mod_rewrite is not working.

4- If your site runs in some folder then adds the folder name before test.html and uploads the htaccess file in the root folder. Eg
-------------------------

1
2
3
RewriteEngine On
Options +FollowSymLinks
RewriteRule ^foldername/test\.html http://www.google.com/? [R=301,L]
-------------------------

Thursday, June 13, 2013

Blacklisting

Steps to Be Followed When Your IP Address Is Blacklisted


If your Domain-Name or IP Address is blacklisted at any ISP, you need to send them a request to remove it from their blacklist database(de-listed).

Here are the basic steps that you should follow for the whitelisting/de-listing procedure at the ISP in question: 
a) You should follow the URL links & apply for whitelisting/de-listing using their online form
and/or 
b) You should send an email to the mentioned email address.
List of ISP's:
Comcast:
Follow this URL: www.comcastsupport.com/rbl
Fill out the online form & submit.
Cox:
Follow this URL: http://postmaster.cox.net/confluence/display/postmaster/Error+Codes
On the page, search the listed error codes to match the one you received when you were blacklisted. Click the URL suggested to get to the appropriate online form. Then submit.
EarthLink:
Send an email to: blockedbyearthlink@abuse.earthlink.net
Use the subject line (example: Blocked 255.255.255.2555)
More details are given on these pages:
http://earthlink.net/block
http://support.earthlink.net/articles/email/email-blocked-by-earthlink.php
Gmail:
Read Gmail's Bulk Senders Guidelines here: http://www.google.com/mail/help/bulk_mail.html
Then follow this URL for the Bulk Sender Contact Form: http://mail.google.com/support/bin/request.py?contact_type=bulk_send&hl=en
Fill out & submit.
Hotmail:
Follow this URL: https://support.msn.com/eform.aspx?productKey=edfsmsbl&ct=eformts
Fill out the online form & submit.
AT&T/SBC Global/Bellsouth:
Follow this URL: http://rbl.att.net/cgi-bin/rbl/block_admin.cgi
Fill out the online form & submit.
For questions related to a request, please contact them at: abuse@rbl@abuse-att.net
Juno/NetZero/Bluelight (United Online):
Follow this URL: http://www.unitedonline.net/postmaster/blocked.html
Fill out the online form & submit.
Roadrunner/Adelphia:
Follow this URL: http://security.rr.com/mail_blocks.htm
Follow this URL to find whether your IP is blacklisted: http://security.rr.com/cgi-bin/block-lookup
USA.NET:
Follow this URL to find whether your IP is blacklisted: http://postmaster.usa.net/html/error.html
Verizon:
Follow this URL: http://www2.verizon.net/micro/whitelist/request_form.asp?id=isp
Fill out the online form & submit.
Yahoo:
Follow this URL: http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html
Fill out the online form & submit.
Mail.ru:
Follow this URL for the Google page translator tool: http://translate.google.com
Check "Translate from Russian" and "Translate to English"
Enter this link in the form: mail.ru/notspam/ Then and hit Enter or Return.
Read and follow the directions on the newly translated page.
AOL.com:
If you have been blacklisted, visit AOL Postmaster
You will need to open a Postmaster Support Request to put yourself on AOL's whitelist
(*The AOL whitelist is meant for permission-based bulk senders. Bear in mind that if you are on their blacklist, you may have done something to violate their technical guidelines or best practices)
You can also apply for Whitelist Status immediately.
List of Blacklist's [RBL/DNSBL]:
Lashback:
Follow this URL to find whether your IP is blacklisted:
http://www.lashback.com/support/UBLQuery.aspx
Fill out the online box and follow the links.
BarracudaCentral:
Follow this URL to find whether your IP is blacklisted: http://www.barracudacentral.org/lookups
Then follow this URL: http://www.barracudacentral.org/rbl/removal-request Fill out the online form & submit
Spamhaus:
Follow this URL to find whether your IP is blacklisted: http://www.spamhaus.org/lookup.lasso
Fill out the online form, submit and follow appropriate links.
Surbl:
Follow this URL to find whether your IP is blacklisted: http://george.surbl.org/lookup.html
Fill out the online form & submit.
Invaluement.com:
Follow this URL to find whether your IP is blacklisted: http://dnsbl.invaluement.com/lookup/
Fill out the online form & submit.
DNSBL Manitu:
Follow this URL to find whether your IP is blacklisted: http://www.dnsbl.manitu.net/
Fill out the online form & submit. You can also send an email to the link provided.
Uribl:
Follow this URL to find whether your IP is blacklisted: http://lookup.uribl.com/
Hostkarma blacklist:
http://ipadmin.junkemailfilter.com/remove.php Fill out the online form & submit.
Spamcop:
http://www.spamcop.net/fom-serve/cache/298.html For network and server administers.
http://www.spamcop.net/fom-serve/cache/405.html For bounce message recipients and end-users.
http://www.spamcop.net/bl.shtml Blacklist IP look-up