Sunday 3 July 2011

TELNET Command to Test SMTP Email Authentication

Simple and precise lines for SMTP Test:
you can use rcpt to command for multiple recipients while smtp test is being performed using telnet session.
telnet to your smtp address you should get a reply back saying 'OK' for each command line
-------------------------------------------------
telnet 192.168.110.100 25
HELO yourdomain.com
MAIL FROM:
Test@abc.com
RCPT TO: 123@abc.com
RCPT TO: 345@abc.com
DATA
Subject:((Test Email..!!))

This is an automated email.


.
QUIT

-------------------------------------------------
fyi: you will get error for 501 5.5.4 Unrecognized parameter, if you do any correction with the typed command line under telnet session. delete and backspace commands are not accepted. you have to type command without errors.
Note that the above code cannot be automated in a script as TELNET itself is a power shell. So telnet to smtp server port will take you to another console and the rest of communication commands will not work IF you make a batch file of the above code. For which the best method is to use vb script to send automated emails. Sending emails using this method can be used for alerting Admins after completion of an automated process.

Send Email using VBScript

VB Script to send email in a structured method

copy the below code to a notepad and save it in yourname.vbs and execute. You will note how to fetch the logged on username info, how to get hostname as well as domain name to a string, in addition to displaying email body fields.

'code starts here KTR----------------------------------
'sending email

Dim objNet
On Error Resume Next

'In case we fail to create object then display our custom error
Set objNet = CreateObject("WScript.NetWork")
If  Err.Number <> 0 Then                'If error occured then display notice
 MsgBox "Don't be Shy." & vbCRLF &_
               "Do not press ""No"" If your browser warns you."
 Document.Location = "UserInfo.html"  
                                        'Place the Name of the document.
                                 'It will display again
End if

Dim strInfo
strInfo =  "" & objNet.UserName + " from the machine " & objNet.ComputerName + " hosted at " & objNet.UserDomain + " Domain."

'MsgBox strInfo --- supress msgbox

'-- can go at last line-- Set objNet = Nothing                    'Destroy the Object to free the Memory


Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = strUserNTName+"Automated: ((Intranet Production Site level Backup Completed Successfully..!!))"
objMessage.From = "
intranetproductionserver@abc.com"
objMessage.To = "
123@abc.com, 456@abc.com"
objMessage.TextBody = "The backup was executed by: " & vbCRLF & _
+ strInfo  & vbCRLF & _
+""& vbCRLF & _
+"Site Level Backup for Intranet Main Site and Subsites: Enforcement, AML, HR & IT completed successfully..!!" & vbCRLF & _
+""& vbCRLF & _
+""& vbCRLF & _
+"Note: " & vbCRLF & _
+"At the time of site level backups all the sites remains locked until processed completely." & vbCRLF & _
+"Site level backup remains at shared location @
\\abc\MOSSBackup\ for 2 days." & vbCRLF & _
+" "& vbCRLF & _
+"Apart from this, daily SQL Content Database (eg.:WSS_Content, WSS_Content_IT, WSS_Content_ENF,..,) backups are automated to NAS storage location @
\\192.168.11.193\backup" & vbCRLF & _
+"These backups are written to Tape Library on a Daily, Weekly and Monthly basis. Monthly backup is finally taken out to the safe locker at ABC Bank." & vbCRLF & _
+" " & vbCRLF & _
+"In addition to the above process, Intranet Site is replicated on a real-time basis to the disaster recovery site at the QDC." & vbCRLF & _
+"" & vbCRLF & _
+"Backup Schedule: " & vbCRLF & _
+"i)   Site Level Backups (using STSADM command): Starts@ 11:20PM, Ends@ 3:20AM" & vbCRLF & _
+"ii)  All Content DB Backup (Back-End Maintenance Plan from SQL): Starts @6PM, Ends@ 11:15PM" & vbCRLF & _
+"iii) DocAve software is used for real-time replication" & vbCRLF & _
+"iv)  Symantec SharePoint Farm level Backup starts at 8PM" & vbCRLF & _
+""& vbCRLF & _
+"File Output Format: " & vbCRLF & _
+"Eg: IntranetBackup_IT_0307Sun.bak, IntranetBackup_ENF_0107Fri.bak, ..," & vbCRLF & _
+"" & vbCRLF & _
+ "Please note that this is an Automated email..! If you have any further concern(s) about the above process, please feel free to drop-in an email to
123@abc.com. I shall get back to you as soon as your email has been prioritized."+"" & vbCRLF & _
+"" +"" & vbCRLF & _
+"-ABC IT Team"
'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/smtpserver") = "specify your smtp server"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("
http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
Set objNet = Nothing

'code ends here KTR----------------------------------

DOS command doesnt really allow TELNET command for testing and processing automated emails

Monday 27 June 2011

Unable to pick AD Attributes from SharePoint for new users

AD attributes not in sync with some of the subsites:

Created a new user profile attribute but these attributes are not available when adding a new column using "person or group" column type... what could be wrong??

Follow the steps to achieve the expected sync on all sites:
Stsadm -o sync -listolddatabases 0
Stsadm -o sync -deleteolddatabases 0 (deletes from cache old databases)
Stsadm -o sync -IgnoreIsActive 1

Stsadm -o sync -synctiming M:1
check profile sync (CA» Operations» Global Configuration» Timer Job Status» scroll down to Profile Synchronization and check for any errors)
check quick profile sync (CA» Operations» Global Configuration» Timer Job Status» scroll down to Quick Profile Synchronization and check for status to track down success/ aborted errors)

run again Stsadm -o sync -listolddatabases 0


if all the content databases are not listed as a result of the above command, try removing content database and attach again.. if you are on production environment, plan and schedule after office hours.. recommended to do db remove/ attach on pre-production first.

how to do this?
Go to Central Administration > Application Management > Content Databases
select each content database, copy exactly the same name of content DB (ex: WSS_Content_HR). Remove content database. Now Add content database. specify exactly the same database name (ex: WSS_Content_HR). Click ok.

Stsadm -o sync -listolddatabases 0




hover mouse over the content database and see the database ID if its in sync with the results you just retrieved after running the command stsadm -o sync -listolddatabases 0
------------------------------------------------------------------------------------------------------
ID: b4fc6c18-a622-498d-8f33-426225dfb22d  Synchronized: 6/27/2011 4:31:03 PM
ID: 943f1a54-245c-4b66-8127-90e7e71066de  Synchronized: 6/27/2011 4:31:03 PM
ID: 4be6b4ee-bb5d-4374-8eb0-a755f0b3350a  Synchronized: 6/27/2011 4:31:02 PM
------------------------------------------------------------------------------------------------------
change back the sync timing to 1 hour to avoid any conflicts.
Stsadm -o sync -synctiming H:1

Also try to Clear the SharePoint Configuration Cache.. refer here . Any issues share here your comments. Please note that you need to stop the windows sharepoint services timer job from services before clearing sharepoint config cache.

Friday 24 June 2011

Vanishing Trick Revealed

Your credulity is blackmagic witche's and magician's powerful weapon. Magicians Trick revealed.. interested to watch?

David Copperfield - Flying Revealed
vanishing train trick revealed
statue of liberty trick revealed

Thursday 23 June 2011

Craig Dietz: Man with no arms and no legs still swims with confidence

click here to
see Craig on youtube
Craig Dietz is preparing to swim four miles in an open water race despite being born without arms or legsThe Pennsylvania man and motivational speaker says that competing in the race is not about winning but showing people that he can do the same things as everyone else. other reference

Merlin Award for Muthukad


Muthukad, who ventured into the world of magic at the age of 10 now receives International Merlin Award, or the magicians' Oscar for the year 2011 from Tony Hassini, President of the US based International Magicians Society. Gopinath Muthukad is the second Indian to be chosen to receive the Merlin Award after PC Sorkar Jr.
Muthukad's motto is "Magic with a mission" and want to use magic as a tool for social upliftment. He also added the he conducts shows to promote national integration and fight against social evils like alcoholism, tobacco and terrorism.
Muthukad's sustained and rigorous practice takes him in par with David Copperfield. All of the top magicians use sophisticated gadgetry and expensive equipments to mesmerize audiences.

visit Muthukad's magic on youtube: Magician on youtube

Wednesday 22 June 2011

Windows Flip 3-D

Switch between open items in windows 7
Alt-Tab as you are aware of is the feature for all previous OS inclusive of Vista OS

but now Windows 7 onwards this has a 3D Flip effect which cycles thru open programs..
Windows logo key Picture of Windows logo key+TAB

yes start using this feature.
you can freeze the flip 3D by cycling the tabs CTRL+Windows logo key Picture of Windows logo key +TAB

and to release it press Alt+TAB.. there you go back to work..