Change Exchange account password

Standard
  1. Open https://controlpanel.msoutlookonline.net/asp/MManager/Login.asp?mmm=1 in your browser making sure “My Services” at the top of the page is selected.
  2.  Login with email address and password
  3. On the right hand site is a link “Change password:”
  4. Follow the prompts

 

Note:
New passwords have to conform to the Password complexity rules:

A password must not contain:

  •         all or part of the email address;
  •         the entire Account Name;
  •         the entire Display Name.

Note: The Account Name and Full Name are parsed for delimiters: commas, periods, dashes or hyphens, underscores, spaces, pound signs, and tabs. If any of these delimiters are found, the Account Name or Full
Name is split and each section is verified as not included in the password. There is no check for any inidividual character or any three characters in succession.

Minimum password length is six (6) characters.

The password must contain characters from three (3) of the following five (5) categories:

  •         English uppercase letters (A-Z)
  •         English lowercase letters (a-z)
  •         Numbers (0-9)
  •         Special characters (e.g. ! $ # %)
  •         Unicode characters that do not fall into one of the above categories (e.g., a Japanese character or Russian letter)

 

MySQL command line import/export

Standard

Export

mysqldump -u username -p database_name > dbname.sql

 

Import

mysql -p -u username database_name < dbname.sql

 

Replace username with the database username
Replace database_name with the name of the database

Condition of the above working is, that you are logged into the Linux server (by ssh or console) that runs the MySQL database and that you have the password relevant to the database user.

The Top 5 Reasons to Use Fiber Optic Cables

Standard

Are you trying to decide between fiber optic and copper cabling for your computer networking application? If the not-so-mere fact that fiber optics have completely revolutionized communications over the past couple of decades isn’t enough for you, CableOrganizer.com would like to share a few more reasons why you should definitely consider fiber optic cable:

  • Fiber optic is so much more efficient…and secure. Compared to copper cabling, fiber optic cables can transmit far more information, with a greater degree of fidelity. Fiber optic cabling also offers extra security for the data being transmitted, since it is much harder to tap than copper cable.
  • Only fiber optics can go the distance. Not only is fiber optic cable capable of carrying far more data than copper, it also has the ability to carry that information for much longer distances.
  • Fiber optics can’t be interfered with! Because fiber optic cables are glass-based, they don’t conduct electricity. This eliminates the need for grounding, and makes them immune to any type of electrical interference, even lightning. Since fiber optic cabling is so resistant to interference and atmospheric conditions, it can be used outdoors — and in close proximity to electrical cables –without concern.
  • Fiber optic cables don’t mind roughing it. Glass fibers don’t only escape interference…they are virtually free from the threat of corrosion, too! While copper cabling is sensitive to water and chemicals, fiber optic cabling runs almost no risk of being damaged by harsher elements. As a result, fiber optic cable can easily endure “living conditions” that coaxial cable just can’t, such as being put in direct contact with soil, or in close proximity to chemicals.
  • You may be surprised by fiber optics, but you won’t be shocked. A major benefit of fiber optic cable is that it doesn’t pose a threat of physical injury to the user if it breaks. Since fiber optic cabling transmits light and not electricity, the people handling it run no risk of injury from fire, sparking or electrocution.

Let fiber optics take your telecommunications or datacom network to a whole new level.

ProcmailRC recipes

Standard

Sending an auto reply while on vacation

PATH=/bin:/usr/bin:/software/common/bin
MAILDIR=$HOME/mailroom #you’d better make sure it exists
LOGFILE=$MAILDIR/procmail.log #recommended

# Vacation work-alike (3/6/98) Accurso
#
# This is an annotated and slightly modified version of the
# vacation work-alike example given in “man procmailex”.
# The use of ^TO is the significant modification.
# See also “man procmailrc”.
#
# First we must decide whether to send an auto reply.
# All the egrep conditions (* lines) must be satisfied.
# If so, headers (h) of the current message are fed to
# formail which checks the vacation.cache to find out
# if the sender has already received an auto reply.
# We will lock vacation.lock while processing this
# recipe to avoid clashes when updating the cache.
#
# This recipe waits (W) for a return from formail.
# Without the (c) procmail would stop processing
# after completing this recipe because it is
# a delivery recipe, it delivers headers to formail.
#
# The conditions ^TO and ^FROM_DAEMON are more than
# meet the eye.
#
# ^TOzz1demo is satisfied if zz1demo
# appears in any recipient header To: Cc: Bc:.
# This avoids sending auto replies to messages that
# were addressed to an alias or maillist, but not
# explicitly to zz1demo.
#
# !^FROM_DAEMON makes sure we do not auto reply to
# messages from any of a wide variety of daemons.
#
# “!^X-Loop: zz1demo@ieng9.ucsd.edu” avoids replying
# to our own auto reply, notice below that this X-Loop
# header is inserted into the auto replies we send out.

SHELL=/bin/sh # for other shells, this might need adjustment

:0 Whc: vacation.lock
* ^TOzz1demo
* !^FROM_DAEMON
* !^X-Loop: zz1demo@ieng9.ucsd.edu
| formail -rD 8192 vacation.cache

# Due to (e) recipe below is executed if the preceding one
# returns an error status. In this case it is not really
# and error, it is just the signal from formail to go
# ahead with the auto reply. Notice that if in the
# preceding recipe the egrep conditions are not met
# and that causes the formail cache check to be
# skipped, procmail is [somehow] clever enough to skip
# this recipe.
#
# The headers (h) of the current message are fed to the
# formail in this recipe in order to construct the
# headers for the auto reply.
#
# The (c) in this recipe causes the whole
# current message to be processed after this recipe.
# Typically that means it will be processed with no
# further recipies and that is how you get a copy in your
# mailbox. There is no need for a lock while executing
# this recipe so none is used.

:0 ehc # if the name was not in the cache
| (formail -rA”Precedence: junk” \
-A”X-Loop: zz1demo@ieng9.ucsd.edu” ; \
echo “I received your mail, but I will be away”; \
echo “from the office until Monday Dec 15th.”; \
echo ” “;\
echo “If this is an urgent matter, please call my office XXX-XXXX “;\
echo ” “;\
cat $HOME/.sig \
) | $SENDMAIL -oi -t

Automatically discarding or returning unwanted mail
Return to sender with “reject” notice (not for spam!)

# This procmailrc will automatically reject and bounce mail from
# certain addresses. NOTE: DO NOT USE THIS FOR SPAM! Only use it for
# folks that you know have a valid return address.
#
# This file can be dropped into your home directory as ‘.procmailrc’, or
# inserted into your existing ‘.procmailrc’, with or without the
# comments.
# -zz1sn 2/18/98

#
# The :0 is the start of a rule. Note, blank lines in a rule are NOT
# happy. Don’t insert any blank lines between the :0 and the line with
# $SENDMAIL, or the rule won’t work. Also, don’t put any comments
# within the rule, either.

#
# The *^From:.*example.*nuisance
# line indicates the string you want to match. If the From
# header in the e-mails you want to match looks something like
# From: Block Head <llarry@ancientgames.com>
# you can use a rule like: *^From:.*llarry.*ancientgames
# or perhaps something like *^From:.*Block Head
# (Remember, case is important – capitals are different from lowercase!)
#
# You want to be as specific as possible, but general enough to
# catch the person’s e-mails. The ‘*^From: bit ensures that the
# rule only matches on the ‘From:’ header, and the ‘.*’ sequence
# is a wildcard (match 0 or more occurrences of any character).
#
# Replace ‘example.*nuisance’ with your expression; otherwise, this
# rule won’t do a thing.
#
# If you want to reject mail from more than one source you can
# repeat the whole rule (from the :0 line to the SENDMAIL line)
# as many times as necessary in your .procmailrc file. Put
# a blank line between rules.
#
# This rule bounces the mail. First, it pipes through a series of
# commands that generate a new e-mail. ‘formail’ takes the old e-mail
# and generates a response; we replace the ‘From:’ line with
# ‘devnull@ucsd.edu’ (which silently discards all mail) to prevent
# mail loops caused by ricocheting bounces.
#
# We then pipe the result through $SENDMAIL -oi -t, which tells
# sendmail to ignore dots as end-of-file markers, and to grab the
# sender/recipient info from the message body.
#
# Note syntax; anything that should be in the message needs to go in
# an ‘echo’ statement inside the parentheses. It should be
# double-quoted, and should not contain funny characters (*, $, etc.).
# The ‘ \’ (space-backslash) needs to be at the end of each line
# except the last to indicate that technically the entire rule belongs
# on one line.
#
:0
*^From:.*example.*nuisance
|( formail -rI”From: Responses will be automatically discarded <devnull@ucsd.edu>”; \
echo “Your mail has been administratively rejected.”; \
echo “It was NOT received.” \
) | $SENDMAIL -oi -t

Discard/block e-mail messages (without return to sender)

# This procmailrc will automatically reject and discard mail from
# certain addresses.
#
# This file can be dropped into your home directory as ‘.procmailrc’, or
# inserted into your existing ‘.procmailrc’, with or without the
# comments.
# -zz1sn 3/09/98

#
# The :0 is the start of a rule. Note, blank lines in a rule are NOT
# happy. Don’t insert any blank lines between the :0 and the line with
# $SENDMAIL, or the rule won’t work. Also, don’t put any comments
# within the rule, either.

#
# The *^From:.*example.*nuisance
# line indicates the string you want to match. If the From
# header in the e-mails you want to match looks something like
# From: Block Head <llarry@ancientgames.com>

# you can use a rule like: *^From:.*llarry.*ancientgames
# or perhaps something like *^From:.*Block Head
# (Remember, case is important – capitals are different from lowercase!)
#
# You want to be as specific as possible, but general enough to
# catch the person’s e-mails. The ‘*^From: bit ensures that the
# rule only matches on the ‘From:’ header, and the ‘.*’ sequence
# is a wildcard (match 0 or more occurrences of any character).
#
# Replace ‘example.*nuisance’ with your expression; otherwise, this
# rule won’t do a thing.
#
# This rule silently discards all mail containing the matched From:
# address. If you want to discard mail from more than one address,
# duplicate the entire 3-line rule, from :0 to /dev/null (changing the
# wildcard expression appropriately)
#
#
:0
*^From:.*example.*nuisance
/dev/null

Amazon AWS EC2 – Move instance to other region

Standard

By far the simplest way to transfer/copy/move instanaces between AWS regions is to use the Ylastic interface.

It is US$20 and when you transfer there are costs for traffic and a temporary control instance (which you also will have with the method below). However Ylastic makes this a 5 minute understand and setup process. And it works even for Windows instances.

 

Preparation:

In AWS web console

  1. Stop instance to move to another region
  2. Make snapshop (you can restart your original instance and put it back in production)
  3. Make new volume of snapshot
  4. Start another instance
  5. Attach the volume from the snapshot to the newly started instance
  6. (on the temp instance in the source region) Mount the volume to the instance
  7. Start an instance in the target region
  8. Create a volume of the same size as your source volume in the target region in the same availability zone as your target instance.
  9. Attach the just create volume to the target instance
  10. (on the target instance) Format the attached volume with the same file system as the source instance.
  11. (on the target instance) Mount the target instance
  12. (on the target instance) make sure you can access the temp instance in the source region via SSH – disable any keys and change ssh_config in the temp instance in the source region etc, if you have to.
  13. (on the target instance) Copy files from the temp instance the source to the mounted volume on the target with rsync:
    rsync -PHAXaz -e ssh ec2-107-22-76-156.compute-1.amazonaws.com:/mnt/sdf1/ /mnt/sdf1
  14. (on the target instance) Unmount the volume
  15. Detach the volume
  16. make a snapshot
  17. make an image
  18. start the instance. DOESNOT WORK. Don’t know why.

Amazon AWS: Backing up running instances with additional volumes

Standard

I have a running instance (virutal server) with an additional attached volume (virtual hard disk) on Amazon AWS and I need to make a snapshot (back it up) regularly. So I can restore it quickly if need be.

For this purpose the following steps are taken:

  1. Setup another machine either inside or outside of AWS with the EC tools (http://aws.amazon.com/developertools/351). I chose one of the preconfigured Amazon images with EC2 tools already installed and spun up a micro instance in the same region as my servers, that then controls all the backing up of all my instances. It does not matter in which region the backup server controller is spun up, but it will only make snapshots in the region the backed up volume or instance resides.
  2. It is vital to have a valid X509 certificate with the private key. Create it in the Security Essentials section of AWS.
  3. Next you will need to know the volume IDs you want to back up. They are found in the Amazon AWS Management Console under EC2 / Elastic Block Store / Volumes
  4. The command to use to create a snapshot is:
    ec2-create-snapshot -C cert-YOURCERT.pem -K pk-YOURPK.pem VOLUME-ID -d “An optional description (I also use the $(date +%C%g%m%d%H%M%S%N) to timestamp my snapshot”This will make the snapshot appear in the Amazon AWS Management Console under EC2 / Elastic Block Store / SnapshotsYou could automate this with cron.
  5. From within the Amazon AWS Management Console under EC2 / Elastic Block Store / Snapshots you can create an Image from your snapshot (which then appears in EC2 / Images /AMIs) or a create a volume (which then appears in EC2 / Elastic Block Store / Volumes)
  6. The resulting AMI can be spun up as a new instance or the volume can be attached to a running instance and appears as an additional disk.

Steps 1 to 4 describe Backup.

Steps 5 and 6 describe Restore.

Note: I have not tested this with running databases (MySQL or PostgreSQL). If in doubt shutdown databases first then create the snapshot. Then start the databases up again.

Set up mail forwarding and replies (Holiday replies) in Blue Net POP3 server

Standard
  1. Log into https://mailboxes.blue.net.au:10000 with your administrator username and password
  2. Go to “Edit Mail and FTP Users”
    Image 
  3. Select user you would like to set forwarding or auto reply for
    ImageIMPORTANT: If you use AUTO REPLY you must include “Subject: ” and set some subject relevant to the auto reply. Otherwise this will not work.
  4. Go to Mail forwarding settings:
    Image
  5. Add details to the various fields as needed:
    imgNote: You may also want to set some values in the “Auto Reply Options” (for example 1440 minutes is 24 hours – so a frequent emailer does not get the auto reply message 5 times a day, but only once a day. This setting also helps to prevent cyclic auto replies with mailing lists and the likes). Another good one to use is the start and end dates for the auto reply.

    IMPORTANT: If you use AUTO REPLY you must include “Subject: ” and set some subject relevant to the auto reply. Otherwise this will not work.

  6. Click Save to save your settings.

Recover information from a disk otherwise unreadable or unmountable

Standard

Install dd_rescue (not ddrescue – although that might also work)

copying everything to a file:

dd_rescue /dev/hda1 target-file.img

Mounting the file:

losetup /dev/loop0 target-file.img
mount /dev/loop0 /home/you/dir

or

mount -o loop target-file.img /home/you/dir

Installing s3fs on CentOS 5.6

Standard

Installing s3fs on CentOS 5.6

Assumptions:

  • rpmforge yum repo installed
  • centos up-to-date – yum -y update

Installation:

  1. yum -y install python
  2. yum -y install fuse
  3. yum -y install libfuse
  4. yum -y install python-hashlib
  5. wget ftp://rpmfind.net/linux/epel/5/i386/fuse-python-0.2.1-1.el5.i386.rpm
  6. rpm -ivh fuse-python-0.2.1-1.el5.i386.rpm
  7. yum -y install fuse-s3fs

Then you will need to do:

  1. Make your access details available to the program:
    (there are a multitude of ways to do that. This is just one shot for this session. You could also include them in your environment)

    export AWS_ACCESS_KEY_ID=<your amazon access key id>

    export AWS_SECRET_ACCESS_KEY=<your amazon secret access key>

  2. Create a bucket:
    /usr/bin/s3fs -C -c bucketnameofyourchoice
  3. Format bucket to be used with this program:
    /usr/bin/s3fs -C -f bucketnameofyourchoice
  4. Mount the bucket to a convenient place:
    /usr/bin/s3fs -o bucket=bucketnameofyourchoice /mnt/s3/

Then Amazon S3 behaves as if it is part of your file system and you can copy to and from and rsync to and from it. Ideal for backup.