Tuesday, December 15, 2009

How to set up email forwarders in Exchange Server 2007


Login to the Exchange server
Open the Exchange Management Console
First create a mail contact then set up the forwarder.

Detailed instructions :
To create a MailContact using the Exchange Management Console:

1. Expand Recipient Configuration | Mail Contact
2. In the Action pane, click New Mail Contact
3. To create a new Contact object, leave the default (New Contact) selected | click Next
4. Type First name, Last name
5. Click Edit to add the external email address
6. Click New to complete creation of new MailContact

To forward mail for a recipient to the MailContact using the Exchange Management Console:

1. Expand Recipient Configuration | Mailbox | select mailbox | properties | Mail Flow Settings tab | Delivery Options
2. Under Forwarding address, select the Forward to checkbox
3. Click Browse to select the MailContact

Figure 1: Modifying Delivery Options to forward email to an alternate recipient

4. Optional: If a copy of the message needs to be delivered to both the external recipient and the original recipient's mailbox, select theDeliver message to both forwarding address and mailbox
5. Click OK to close Delivery Options properties
6. Click OK to close recipient's properties

Thursday, December 10, 2009

MOSS 2007 server not sending email for domain

So one of our Sharepoint 2007 Servers was not sending out email to anyone anymore after a datacenter move. The reason was dns issues related to the move.

Here is how it was solved:
MB - per yesterdays research and changes: A request was sent to NetSource to create a reverse DNS for the IP 68.70.161.12 to point to portal.harmonicconsulting.com. HarmonicConsulting.com MX records we edited to add portal.harmonicconsulting.com as a e-mail server with a low priority. The SMTP server was reconfigured to relay mail for the harmonicconsulting.com domain to google and Sharepoint was configured to use the local SMTP server to send mail. Rlaying to harmoinic from the SMTP server worked - I can't seem to add myself to the notification list here so I will wait to hear badck from the real bacuff to verify this is working now. - Mark

Monday, November 23, 2009

Forgot root password

Forget your root password?
On Red Hat/Centos most any linux box:

1. Get physical access to the box
2. reboot it
3. during the grub menu, type e
4. go down to the line that has 'quiet' in it, usually that's the one I use but it doesnt'really matter. what you are basically going to do is type single at the end of whatever line you want to boot.

*this will also walk you though it
http://www.cyberciti.biz/faq/grub-boot-into-single-user-mode/


5. this will dump you to single user mode, and you can just do passwd to set new root password

Wednesday, November 11, 2009

Roaming Profiles Windows Server 2003

Trying to set up roaming profiles on Windows Server 2003 domain?

Try this:

To setup roaming profiles, first log onto your server and open Active Directory users and Computers. Right click on a user; choose properties and the click the profiles tab. In the profile box type the UNC path of the shared folder you made on the server. For example you would type:

\\servername\profiles\%username%

Where servername is the name of your server and the profiles folder is on the root of the C or D or whatever data drive the server is using. Do not type in the users name at the end but make sure it says %username% like in the example.

Make sure you have created this profiles folder and shared it with the same name as the folder. You can leave the share permissions wide open if you want because the %username% will create the users profile with permissions that grant only the user the right to view the contents.

The next time the user logs in, the users local profile will be copied to the new profiles folder on the server creating a new folder with the users name and permissions set up so that only the user can access it.

Tuesday, November 10, 2009

Rhapsody Playlist - GLEE TV Show hits ;-)

dorky post but trying some html generated from rhapsody to see if images are sent properly or are red xs after the post.

http://rhaplinks.real.com/rhaplink?rhapid=6393732&type=playlist&title=Playlist&from=msn
1. Sweet Caroline (Glee Cast Version) - Glee Cast
2. Bust A Move (Glee Cast Version) - Glee Cast
3. Don't Stop Believin' (Glee Cast Version) - Glee Cast
4. Halo / Walking On Sunshine (Glee Cast Version) - Glee Cast
5. Gold Digger (Glee Cast Version) - Glee Cast
6. Can't Fight This Feeling (Glee Cast Version) - Glee Cast
7. Rehab (Glee Cast Version) - Glee Cast
8. Dancing With Myself (Glee Cast Version) - Glee Cast

or this version (generic, not the blogger format as above):
http://rhaplinks.real.com/rhaplink?rhapid=6393746&type=playlist&title=Playlist&from=msn

Tuesday, November 03, 2009

MOSS 2007 External Web Resolution Issues/Alternate Access Mappings

So when building a MOSS site, you cannot simply assign an IP say 64.24.232.177 and then make a DNS A record say moss1.yourdomain.com point to it, then in IIS configure that MOSS Web Site to run on say, port 80 for example.

No, that is not good enough, you have to tell Sharepoint about it -- go into Central Administration, then there is a slew of different alternate access mappings you can configure for the site.

There are different zones (dont you just love IIS/Internet Explorer?!?):
default, intranet, public, extranet, custom (blah blah)

All you really need to do to enable your moss site to be viewed externally (assuming you set the DNS as explained above) is:

1. In IIS, configure the host header for the site (right click it go to properties, Advanced, Add the DNS name i.e. moss1.yourdomain.com in the host header box).

and

2. In MOSS Central Administration, Operations, Alternate Access Mappings add a public URL as http://moss1.yourdomain.com (I just added it into the default zone and erased what was there -- the http://hcmoss02 which is the internal name of the server)

VOILA you are done. Now your site resolves externally. Take a coffee break.

Wednesday, October 14, 2009

Shared images for MOSS 2007 templates

put shared images for the MOSS site in %12 hive%\template\images
i.e.:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES

Wednesday, September 30, 2009

Linux Find Command find text in files

To find the text "JoomlArt" in all files in all subdirectories under the current dir, use this:

find . -type f -name "*" -exec grep -il JoomlArt {} \;

If you just wanted to search in php file for example, it would be this:

find . -type f -name "*.php" -exec grep -il JoomlArt {} \;

(grep is not needed in these examples)

Thursday, September 24, 2009

DirectAdmin forgot admin password?

If you forget the Direct Admin admin password, all you have to do is if you have ssh to the box as root type:

passwd admin

(then reset it you goof!)

Monday, August 31, 2009

exim permissions error

When I see this:

login as: root
root@64.254.200.10's password:
Last login: Mon Aug 31 15:44:06 2009 from adsl-70-131-140-218.dsl.emhril.sbcglob al.net
[root@ls3 ~]# 2009-08-31 15:45:42 1MiDl0-0001b0-SA Failed to create spool file / var/spool/exim/input//1MiDl0-0001b0-SA-D: Permission denied
[root@ls3 ~]#


I do this (temporarily):
chmod -R 777 /var/spool/exim
because this does not work:
chmod -R 755 /var/spool/exim

Thursday, August 27, 2009

Directadmin - MySql move a database and grant user permission

So to move a Mysql database from one server to another all you have to do is copy the database over and then grant the appropriate permissions to the new database on the new server.

In the example below the username is da_admin and password kbjlms1X

the database name is aurorafcs_md
the database user name is also aurorafcs_md
the database user password is gggyro33

To grant the permissions:
2. [root@ns2 conf]# mysql -uda_admin -pkbjlms1X
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6118
Server version: 5.0.37-standard MySQL Community Edition - Standard (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on aurorafcs_md.* to aurorafcs_md@localhost identified by 'gggyro33';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

Saturday, August 22, 2009

Exchange 2003 Information Store Repair

So a client had a Exchange 2003 Information Store corruption issue on a lovely saturday night when I was supposed to be at the movies at the park in the neighborhood with the kids.

Anyway, here is a command to fix it (after you have made backups of the edb and stm files):

ESEUTIL /P "D:\Program Files\Exchsrvr\MDBDATA\priv1.edb" /S"D:\Program Files\Exchsrvr\MDBDATA\priv1.stm" /T"D:\Program Files\Exchsrvr\MDBDATA\tempdb.edb"

Thursday, August 20, 2009

Remove 'Welcome to the Frontpage' title in Joomla! 1.5

How to remove 'Welcome to the Frontpage' title in Joomla! 1.5
Navigation
• •
If you install new Joomla! 1.5 on your server, you get the 'Welcome to the Frontpage' title on your Frontpage. Sometimes, it is difficult to find, where you can change this title.

Go to your Joomla! 1.5 Administration site and login. In your administration site go to:

Menus - Main Menu (now you are in: Menu Item Manager: mainmenu).
Click on 'Home' link to edit this link (you are now in: Menu Item: Edit).
Click on Parameters System and change or delete the Page title.
If you change the Page title, changed title will be displayed on your Frontpage as a title.
If you delete the Page title, Menu link will be displayed on your Frontpage as a title (in the present case 'Home' will be displayed as title, because 'Home' is the name of the link to the Frontpage).
If you don't want to display any title, set Show Page Title below Page title parameter to 'No'.
Don't forget to save changes.

Tuesday, August 18, 2009

Transfer linux pop mail directadmin command

so to transfer email from one DA box to another:
scp -r 64.254.200.10:/etc/virtual/rubesreadymeals.com/* /etc/virtual/rubesreadymeals.com

scp -r 64.254.200.10:/var/spool/virtual/rubesreadymeals.com/* /var/spool/virtual/rubesreadymeals.com

Mysql directories and move info

It is no fun when a linux shared hosting server crashes. You have to move the web files, email, and any mysql databases the users websites are running on, not to mention DNS info. So get some mountain dew and lets get started:

Mysql important directories:
The databases are all here: /var/lib/mysql

Grep for the mysql username and password in:
Joomla - configuration.php
Drupal - settings

Directadmin info is here: /usr/local/directadmin

Wednesday, August 12, 2009

tar help (zip up a linux dir and all files and subdirs)

use this to zip up linux dirs, files, folders, subdirs, etc.

tar -cvzpffilename.gz {source dir or files wildcard}

Example:
tar -cvzpfpublic_html_backup_08122009_plinkgolf.gz public_html

where:
-f - whatever follows the f is the filename, so public_html_backup_08122009_plinkgolf.gz is the tarball/zip file name in this case.
-v indicates verbose listing of command output.
-c indicates create a new tar ball file.
-z indicates use gzip.
-p indicates preserve all permissions of underlying files/dirs being zipped.
public_html - is the name of the top level folder I am zipping including all its subfolders and files underneath it

Have a nice day!

Oops - almost forgot, to explode/unzip the zip file in the current directory, just type:

tar -xvf nameofzipfile.gz

Tuesday, July 21, 2009

Modify Joomla footer Part 2

To modify the joomla footer in a template, it is overridden in the template directory (Joomla 1.5, the mod_footer module).

/home/plinkgolf/domains/powerlinksgolf.com/public_html/templates/ja_helio/html/mod_footer/

is where the files are located.

Friday, July 03, 2009

Find out who is logged on as root (or any other user)

So I want our support team to get an email when someone logs on as root or su to root on our servers. So I saw this:
Want to be notified instantly when someone logs into your server as root? No problem, check out this nice tutorial on email notification for root logins. Keeping track of who logs into your server and when is very important, especially when you're dealing with the super user account. We recommend that you use an email address not hosted on the server your sending the alert from.

So lets get started!

1. Login to your server and su to root, I know the irony!

2. cd /root

3. pico .bashrc

4. Scroll to the end of the file then add the following:
echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" you@yourdomain.com

Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address

5. Crtl + X then Y

Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.

But I changed to this:
Edit root (or whatever user you wanted) .bash_profile

echo 'ALERT - Root Shell Access (YourserverName) on:' `date` `who` | mail -s "Alert: Root Access from `netstat | grep ssh`" you@yourdomain.com

Replace YourServerName with the handle for your actual server
Replace you@yourdomain.com with your actual email address

This netstat gives you all users connected to your box via ssh at that time, not just the specific user who just sshed in.

Example Output (user SSH sessions from my home laptop ip of 70.131.105.251:
tcp 0 0 ls3.harmonicwebhosting.:ssh adsl-70-131-105-251.d:61852
ESTABLISHED
tcp 0 220 ls3.harmonicwebhosting.:ssh adsl-70-131-105-251.d:63195
ESTABLISHED

ALERT - Root Shell Access on (ls3.harmonicwebhosting.com-64.254.200.10): Fri Jul 3
11:37:51 CDT 2009

Wednesday, July 01, 2009

DirectAdmin DNS issue same shared Linux server-cannot send email to other domain hosted on same server

So we are running Direct Admin on one of our shared linux web hosting servers and ran into a problem where one domain had switched email services to google apps (another mail server not hosted on the Direct Admin shared mail server).

So all other domains on that server could not send email to that domain since they thought the local server was still serving mail even though they changed the MX records to google servers.

Long story short to fix this go to:
Click on the domain in question, Click on Modify DNS Records, Click on Modify MX records, then uncheck the local mail server box as follows:
Local Mail Server
Use this server to handle my emails.
If not, change the MX record and uncheck this option
*Note: Making modifications to the MX records can potentially disable all of your email accounts from recieving mail.
ONLY make modifications if you know what you are doing.
Make sure to include the period at the end of the domain. (eg: mail.domain.com. )

Tuesday, June 30, 2009

Time Zone setting in .NET webapps

So the time zone was off by 5 hours in one of our .NET webapps. After reading tons of articles on the web they were all quite confusing. The simple fix was:

It was a code chanege in sql. I change getutcdate() to getdate(). I used
getutcdate() for some reason i dont remember why now.

Changing it to getdate() fixed it.