Thursday, December 19, 2013

Exchange 2013 MSDiagnostics Error 1006

Error exist from exchange 2013 RTM to 2013 CU3
Error look like:

The performance counter ‘\\SERVER\LogicalDisk(HarddiskVolume1)\Free Megabytes’ sustained a value of ’0,15′, for the ’10′ minute(s) interval starting at ’8/20/2013 7:21:00 AM’. Additional information: None. Trigger Name:DatabaseDriveSpaceTrigger. Instance:exchndb1

It is not clear what does this error means, because 50% of hard drive space is free.
You can disable this notification. To do this edit configuration file:

C:\Program Files\Microsoft\ExchangeServer\V15\Bin\Microsoft.Exchange.Diagnostics.Service.exe.config

Change “ExchangeJobs.Triggers.DatabaseDriveSpaceTrigger” from “True” to “False”. After making changes do not forget to restart exchange diagnostic service.

Thursday, November 7, 2013

How to enable and configure spam filter on exchange 2013

In Microsoft Exchange Server 2013, the following anti-spam agents are available in the Transport service on Mailbox servers, but they are not installed by default:
  • Content Filter agent
  • Sender ID agent
  • Sender Filter agent
  • Recipient Filter agent
  • Protocol Analysis agent for sender reputation
You can install these anti-spam agents on a Mailbox server using a script in the Exchange Management Shell.

1. Instalation


Use the shell to run Install-AntispamAgent.ps1 script

& $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1

Then close power shell, restart Transport Service and open power shell again.

Specify SMTP servers of your organization

Set-TransportConfig -InternalSMTPServers @{Add="<ip address1>","<ip address2>"...}
example:

Set-TransportConfig -InternalSMTPServers @{Add="10.0.1.22","10.0.1.23"}

check servers list:

Get-TransportConfig | Format-List InternalSMTPServers

InternalSMTPServers : {10.0.1.22, 10.0.1.23)

to clear list set it to $null

Set-TransportConfig -InternalSMTPServers $null

to remove item from list:

Set-TransportConfig -InternalSMTPServers @{Remove="10.0.1.23"}


2. Sender filtering configuration

2.1 Sender block list

Set-SenderFilterConfig -Enabled $true

senders can be blocked on tree different block lists

  • blocked senders
  • blocked domains
  • blocked domains and subdomains
Set-SenderFilterConfig -BlockedSenders @{Add="spammer@domain.com",spammer2@domain.com} -BlockedDomains @{Add="spammers.com"}

check bloked senders list

Get-SenderFilterConfig | fl BlockedSenders, BlockedDomains

you should get somthing similar to:

BlockedSenders : {spammer@domain.com, spammer2@domain.com}
BlockedDomains : {spammers.com}

2.2 Empty sender blocking


Set-SenderFilterConfig -BlankSenderBlockingEnabled $true

this is usually used to block NDR, received from internet.

 

3. Recipient filtering

Set-RecipientFilterConfig -Enabled $true

Then enable feature of recipient filter config

Set-RecipientFilterConfig -BlockListEnabled $true

Populate blocked recipients list

Set-RecipientFilterConfig -BlockedRecipients @{Add="internal@domain.com", "internal2@domain.com"}

Check that list populated:

Get-RecipientFilterConfig | fl BlockedRecipients

BlockedRecipients : {internal@domain.com, internal2@domain.com}

3.1 Block recipients that is not listed in global address book.

Set-RecipientFilterConfig -RecipientValidationEnabled $true

that blocks all mails to non existing users, but it could expose all directory emails for spammers that use directory harvesting. To protect from directory harvesting we can set delay between send email requests.

get list of receive connectors:

Get-ReceiveConnectors

get tarpit interval of connector:

Get-ReceiveConnector "WIN2012-TEST\Default Frontend WIN2012-TEST" | fl tar*

TarpitInteval : 00:00:05

Set interval to 6 seconds

Set-ReceiveConnector "WIN2012-TEST\Default Frontend WIN2012-TEST" -TarpitInterval 00:00:06







How to install telnet client from cli in windows server 2012

Open cli and type following command:

pkgmgr /iu:"TelnetClient"

Friday, October 11, 2013

Chan_dongle do not compile with asterisk 11

The symptoms are:

In file included from app.c:21:0:
/usr/include/asterisk/version.h:1:2: error: #error "Do not include 'asterisk/version.h'; use 'asterisk/ast_version.h' instead."
app.c: In function 'app_register':
app.c:162:3: warning: passing argument 2 of 'ast_register_application2' from incompatible pointer type [enabled by default]
In file included from app.c:20:0:
/usr/include/asterisk/module.h:458:5: note: expected 'int (*)(struct ast_channel *, const char *)' but argument is of type 'int (*)(struct ast_channel *, void *)'
make: *** [app.o] Error 1


Solution:
  • Download patched sources
  • autoconf and autmake should be installed
  • uzip sources
  • cd to unzipped folder
  • issue commands: aclocal, autoconf, automake -a
  • install chan_dongle as usual ./configure, make, make install.
then I got next error

# sudo make install
./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
strip chan_dongle.so
/usr/bin/install -c -m 755 chan_dongle.so
/usr/bin/install: missing destination file operand after `chan_dongle.so'
Try `/usr/bin/install --help' for more information.
make: *** [install] Error 1

Error because on chan_dongle installed on 64 bit OS. In that case DESTDIR should be: DESTDIR="/usr/lib64/asterisk/modules

after that you can run asterisk console and load module:

CLI> module load chan_dongle.so

but then next error comes:

WARNING[24644]: chan_dongle.c:218 opentty: unable to open /dev/ttyUSB2: Permission denied
that because of wrong permissions.


That usually happens when asterisk running in non root mode. Set the correct permissions to /dev/ttyUSB

#chmod 666 /dev/ttyUSB*

after all chan_dongle is up and runnin, but after adding second dongle, problem with permissions comes back. The silution is to set permission automatically. Create file in /etc/udev/rules.d/92-dongle.rules
and add

KERNEL=="ttyUSB*", MODE="0666", OWNER="asterisk", GROUP="uucp"

Wednesday, September 18, 2013

Joomla 3.1 instalation stuck on creating tables.

I was installing Joomla 3.1 by uploading Joomla files. Instalation stuck when creating tables. PhpMyAdmin show that tables created, but instalation loops forewer on this step.

Replacing "ENGINE=InnoDB" by "ENGINE=MyIsam" in the SQL script /installation/sql/mysql/joomla.sql solved the issue.


I tried adding a php.ini file with *max_execution_time = 3000* and *memory_limit = 256M*, but it did not worked.

Monday, September 16, 2013

Windows 7 Profiles Wont Load. Stuck with Backup Status.

There are bugs that you can get around with, and then there are some that are just weird.. I came across one that involved a weird state for a localwindows profile. Usually this will prompt you to simply solve the issue by just re-creating the profile. This usually solves the issue, but there is a faster way to resolve issues that involve with the profile with a backup status:Image
The image above doesn't really show a backup status but, you get thepicture. The profile in question will load the home directory c:\users\TEMP. The user's desktop won't be the same,outlook won't have the same profile, and the user's favorites will be gone. Lets not panic, the folder in question is still there. The user is just not properly mapped to the right home directory.
First thing to do is to reboot the workstation in question. If you still have the same issue, we will need to modify the registry.
NOTE: Modifying the registry is risky, and even if you follow the instructionsword for word, I can't guarantee success or a corrupted windows or loss of data. Please proceed at your own risk.
This remedy is taken from this Microsoft KB article, but ill mention it here for completeness and add my thoughts to each task.
http://support.microsoft.com/kb/947215
Go to Start and run REGEDIT
Go to:
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
In this key, you should see something similar to this:
Image 
The S-1-5-21 keys actually are the configuration of the profiles in windows. one thing to notice is that there are two that are strikingly similar (S-1-5-21-1079119....) but with one difference, the .bak at the end of the key at the bottom.
Lets take a look inside the key:
A healthy profile should look like this:
Image
A cool thing to note is that the ProfileImagePath points to thehome directory of the user. An unhealthy profile will display theProfileImagePath to c:\users\temp, and the RefCount will have a value higher than 0.
To solve the problem, login to an administrator account other than the one that has the issue.
Next modify the key name that doesn't have the .bak to .ba.
Image
Now Rename the key that HAS the .bak and remove the .bak.
Image
Finally modify the key name that HAS the .ba to .bak
Image
Once that is done, you will need to modify a few more things in the key without the .bak.
We need to change the RefCount to 0
We need to clear the state in State to 0
Now its time to reboot and try to login.
This worked for me. What your more or less doing is manually changing the state of the profile from the backup state to a local state

PROPS to Tmatthews / http://microitblog.com/micro-it-blog/2012/01/17/windows-7-profiles-wont-load-stuck-with-backup-status

Monday, July 29, 2013

Import Export menu is grayed out in Outlook

This is usually happens with localized version of Outlook. Greyed menu preventing from making backups, import/export email and adress book. Solution is easy:
  • Go to Control panel 
  • Clock, Language and region
  • Region and language
  • Administrative tab 
  • On Lnguage for non-Unicode programs press "Change system locale.."
  • Select the same locale as selected in outlook.
After OS restart import/export meniu should be functional

Friday, July 12, 2013

SDR-radio.com and SDR# do not recognize RTL based tuner.

That story begins when I decided to start SDR radio on my laptop. I bought DVB-T USB tuner, based on RTL2832U chip, downloaded software and start playing. Zadig driver installed without any problems, but sdr software was unable to find my tuner.
I have tried different versions of zadig drivers, all of them installed with succes. Different versions of sdr software and different .dll's, but result was always the same - when I tried to start sdr software it did not saw tuner.

After some research and internet browsing I found that problem relays to libusbx, and NEC/Renesas USB 3.0 chip users should upgrade their drivers to version 2.1.16.0 or later. There is a bug in older versions that prevents libusbx from accessing devices. Unfortunatelly my laptop (HP EliteBook 8460p) has that USB 3.0 chip.

Problem was resolved by downloading new driver from HP. After installation I tried to start SDR#, but again with no luck. Though driver's installer reported, that installation was successful, but after looking in driver's properties I recognized that old drivers still in use. So I manually updated driver (Device manager -> Update Driver Software... -> Browse my computer for driver software -> Choose folder with drivers files). After that software was able to detect tuner.

Hope it will help someone to avoid dificulties with configuration.

Thursday, July 11, 2013

Exchange 2013 EAC - Blank page after login

After deleting or assigning other Exchange certificate, you can't open emc page (blank page).

netsh http show sslcert

save output

delete error causing cert:


netsh http delete sslcert ipport=0.0.0.0:444

assign right cert:

netsh http add sslcert ipport=0.0.0.0:444 certhash=4849849849884484884848 appid="{4dc3e181-e1445554554155455}"
-> you can copy certhash and appid from the other applied certs..

Exchange 2013 increasing rules quota

To set the rules quota to 256kb for the user dummy run
[PS] C:\>get-mailbox dummy|set-mailbox -rulesquota 256kb
To make sure that the user has got the new rules size run
[PS] C:\>get-mailbox dummy|fl rulesquota
It should return
RulesQuota : 256KB
To set the quota for all users run
[PS] C:\>get-mailbox|set-mailbox -rulesquota 256kb
To get the quota of all users run
[PS] C:\>get-mailbox|fl rulesquota, alias

How to install .NET Framework 3.5 on Windows Server 2012


The problem was that the .NET Framework 3.5 was a requirement, and I was unable to install it from the Server Manager.This is the problem I ran in to when trying to add the feature:
“Do you want to specify an alternate source path? One or more installation selections are missing source files…”
Bug when adding .net framework 3.5 in Server 2012
Apparently, there’s a bug in Windows Server 2012 when trying to add the .NET Framework 3.5 from Server Manager. In order to get it to work, I had to enable the feature via the Command Prompt.
This is the command that I had to type:
dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess
Note: Source should be the Windows installation disc. In my case, this was located on D:
Bug when adding .net framework 3.5 in Server 2012
After running this command, .NET Framework 3.5 was enabled and I was able to install SQL Server 2008 R2

Configuring postfix to forward all email to a smtp gateway

Introduction

Suppose you want all your web servers to locally send all email (maybe from your contact forms, or whatever) to a real smtp gateway. If you're running postfix as your mta, this is quite easily to achieve.

Configuration

In your main.cf file (usually /etc/postfix/main.cf or /usr/local/etc/postfix/main.cf), specify your transport maps:
  1. transport_maps =  hash:/etc/postfix/transport  
And in your transport file (usually /etc/postfix/transport or /usr/local/etc/postfix/transport), specify your gateways per domain. This allows you to specify with regular expressions which emails go where. In this case, an asterisk specifies every domain (the transport file allows very complex setups, this is of course an extreme and trivial example):
  1. *              smtp:myotherhost.com  
Then invoke postmap to regenerate the transports db, and reload postfix:
  1. # postmap hash:/etc/postfix/transport  
  2. # postfix reload  
That should do it. All email generated in this host should now be forwarded to the smtp gateway. Remember to configure your smtp gateway to accept mail from all the hosts that will forward emails to it.