How to delete all email From: a domain or one email address

To delete all email in the queue from a domain run this command as root:

postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } /@example\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

To delete all email in the queue From: a specific email address run this command as root:

postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } /username@example\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

 

http://www.emailquestions.com/threads/how-to-delete-all-email-from-a-domain-or-one-email-address.9369/

rsync with public key file

rsync -rave “ssh -i PEMKEYFILE.pem” /path/to/local/files/* ec2-user@EC2_INSTANCE_HOSTNAME:/path/to/remote/files

 

http://www.anthonychambers.co.uk/blog/rsync-to-aws-ec2-using-.pem-key/9

create remote git from local project

So, firstly setup the remote repository:


ssh git@example.com
mkdir my_project.git
cd my_project.git
git init --bare
git update-server-info # If planning to serve via HTTP
exit

On local machine:


cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master

Done!

 

http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/

change root password on mysql

sudo service mysql stop
sudo mysqld_safe --skip-grant-tables --skip-syslog --skip-networking

then run mysql in a new terminal

mysql -u root

and run the following query, after changing the password

UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
FLUSH PRIVILEGES;

quit the mysql safe mode and start mysql service by

mysqladmin shutdown
sudo service mysql start

http://stackoverflow.com/questions/10895163/how-to-find-out-the-mysql-root-password