Thursday, May 17, 2012

Why Is My Emails Getting As Spam?

Why Is My Emails Getting As Spam?
Check above things.

First we need to check Email Headers.
1. Return Path
2. To
3. From
4. We should not use CAPS because not only being unprofessional, but it
also triggers spam filters. To land in the Spam folder consistently,
please do not USE ALL CAPS IN THE SUBJECT LINE AND THE BODY FROM TO and
Excessive punctuation (e.g. -/, ;^%#$@+ * "').

E.g. as follows.

1. Email "From : ADMIN ENROLL " getting
spam in gmail.com sometimes and if we not change it will increasing
count.

2. Email "From: noreply@exmaple.com" it
getting in mailbox, check the CAPS deference.

http://php.net/manual/en/function.mail.php
http://www.niso.org/khelp/kmlm/user_help/html/examine_mail_headers.html

Please check this too. It can be understand better. :)
http://www.infusionblog.com/email-marketing/7-ways-for-your-email-to-land-in-the-spam-folder/

Check SPF for Domain.:
http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/

What is SPF records and How to setup?
http://www.kazeli.com/help/index.cfm?pageloc=quest&questid=435&catid=337,338

To diagnose the mail. Why its going in Spam.
Check tool:
http://mxtoolbox.com/
Here you can check following points
1. Mxlookup : For your domain and ip
2. Blacklist : For your IP
3. Diagnostics : SMTP Diagnostics, check your mail server
4. Analyze Headers : Check your mail headers.
5. SPF Records : Check your Sender Policy Framework
7. DNS Lookup : Check your Domain lookup.

If you check above all things your mail will not go in Spam.!

@Linux Administration Blog.!

Wednesday, May 16, 2012

ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number

mysql> GRANT SELECT ON *.* TO 'gita'@'localhost' IDENTIFIED BY PASSWORD "gita123";
ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number

# Check encripted password on Mysql Console.
mysql> select password('gita123');
+---------------------+
| password('gita123') |
+---------------------+
| 1f6f58c9269d50dc |
+---------------------+
1 row in set (0.00 sec)

# Check Grant for User
mysql> show grants for gita@192.168.10.143;
+-----------------------------------------------------------------------------------------------------+
| Grants for gita@192.168.10.143 |
+-----------------------------------------------------------------------------------------------------+
| GRANT SELECT, SHOW VIEW ON *.* TO 'gita'@'192.168.10.143' IDENTIFIED BY PASSWORD '1f6f58c9269d50dc' |
| GRANT SELECT, SHOW VIEW ON `data1`.* TO 'gita'@'192.168.10.143' |
| GRANT SELECT, SHOW VIEW ON `data2`.* TO 'gita'@'192.168.10.143' |
+-----------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

# Update Password In Query.

mysql> GRANT SELECT ON *.* TO 'gita'@'localhost' IDENTIFIED BY PASSWORD '1f6f58c9269d50dc';
Query OK, 0 rows affected (0.04 sec)


Resolved.!

Thursday, May 3, 2012

Auto Scaling On Amazon Cloud Computing.

First check the URL to understand Auto Scaling http://aws.amazon.com/autoscaling/
And download Auto Scaling developer tool http://aws.amazon.com/developertools/2535

After download follow the stapes:

unzip AutoScaling-2011-01-01.zip
cd AutoScaling-1.0.49.1/

Set the enviroment in /root/.bashrc on your box.
------------------------------------------------------------------------
export AWS_AUTO_SCALING_HOME=/opt/AutoScaling-1.0.49.1/
set AWS_AUTO_SCALING_HOME=/opt/AutoScaling-1.0.49.1/
export PATH=$PATH:$AWS_AUTO_SCALING_HOME/bin
set PATH=%AWS_AUTO_SCALING_HOME%/bin

export AWS_AUTO_SCALING_URL=https://autoscaling.ap-southeast-1.amazonaws.com
set AWS_AUTO_SCALING_URL=https://autoscaling.ap-southeast-1.amazonaws.com
------------------------------------------------------------------------

You need to be using an elastic load balancer to configure auto scaling. Configuring autoscaling consists of three steps:
1) Create launch configuration
2) Create auto scaling group
3) Create auto scaling trigger

Create launch configuration
Launch configuration provides information about the instance to be launched. You can see that an AMI, instance type, availability zone and security groups are specified when a launch configuration is created.

as-create-launch-config MY_Group --image-id ami-a2b7f3f0 --instance-type m1.small -I Your_access_key -S Your_Secret_key

Create autoscaling group
A launch configuration is attached with an autoscaling group. The group consists of pool of instances. You can specify minimum and maximum size of the pool.

as-create-auto-scaling-group sbsgroup --launch-configuration MY_Group --availability-zones ap-southeast-1b --min-size 1 --max-size 10 --desired-capacity 1 -I Your_access_key -S Your_Secret_key


To check
as-describe-auto-scaling-groups sbsgroup --headers -I Your_access_key -S Your_Secret_key
----------------------------------------------------------------
Output:
AUTO-SCALING-GROUP GROUP-NAME LAUNCH-CONFIG AVAILABILITY-ZONES MIN-SIZE MAX-SIZE DESIRED-CAPACITY
AUTO-SCALING-GROUP sbsgroup MY_Group ap-southeast-1b 1 10 1
INSTANCE INSTANCE-ID AVAILABILITY-ZONE STATE STATUS LAUNCH-CONFIG
INSTANCE i-e6d671b2 ap-southeast-1b InService Healthy MY_Group
-----------------------------------------------------------------

Create autoscaling trigger
The trigger defines the conditions to start or stop ec2 instances. For example:

as-create-or-update-trigger my-latency-trigger --auto-scaling-group sbsgroup --dimensions "LoadBalancerName=myloadbalancer" --measure Latency --period 60 --statistic Average --lower-threshold 0.25 --upper-threshold 0.75 --breach-duration 300 --lower-breach-increment=-1 --upper-breach-increment 1 --namespace "AWS/ELB" --unit Seconds

Now, we have created a latency trigger with 0.25 as the lower threshold and 0.75 seconds as the upper threshold. If your website latency goes beyond 0.75 seconds, this trigger will be activated and hence an instance will be launched (as specified by upper breach increment).

Its Done.! @ Linux Administration Blog.!