How to setup sendmail to relay outgoing emails

If you don’t use postfix and just sendmail to sendmail may want to relay your emails to your relay server.

Navigate to /etc/mail/

then add define(`SMART_HOST’, `’)dnl

sudo service sendmail restart

You can then check your logs on /var/log/mail.err to see if it’s all working.


How to fix Iphone stuck in headphones mode – set of fixes.

have to say it’s amazing how many different fixes can fix this problem!!! Apple go back to work!

List of things that I have already tried:

  1. Replaced the headphone/charging port.
  2. Replaced ear speaker
  3. Reset the iPhone. Press and hold Sleep/Wake button and Home button together until Apple logo appears.
  4. Factory Full Reset and setup as new iphone
  5. Play a song (lengthy duration) and allow iPhone to completely lock.Now insert iPhone compatible headset jack.Unlock iPhone. Stop audio and unplug jack.
  6. Plug in headset when phone is locked.Hold down power button. It will bring “slide to power off” bar.Now remove the headphones.

    Press the “cancel” button at the bottom of the screen.

    Now check the sound.

  7. Signing up for Beta and Updating to the latest software.
  8. Turned off/flicked keyboard clicks in Sounds option.
  9. Checked for  LCI Liquid Contact Indicator ( All good)
  10. Cleanup headphone jack before replacing the board (there are little metal balls which can get stuck)
  11. Go to Sound and Try to play some ringtones (you can hear ringtones but it did not switched back)
  12. Turning on “Airplane” mode then adjusting the volume up and down.
  13. set an alarm, let that go off, and the headphone mode turned off!
  14. Play with the ringtones in the settings keep flipping the mute switch and volume keys. And rebooting the phone it worked for me
  15. plugged the apple headphones in and out it
  16. 5/10 minutes of hairdryer on the cold setting
  17. Restore Phone using DFU method and Itunes
  18. Clean logic board connector which connect headphones/thunderbird using 99 isoprop
  19. plugged in my headphones, opened my Control Center, and then pulled them out
  20. Try to use Isopropyl alhocal to clean the speaker/microphone Thunderbird connector.


Installing Mediawiki with Vision Editor, parsoid active directory as private wiki notes/fixes

My Notes:

Setup: Mediawiki 1.27

AD: Windows 2012

Web Server: Linux Debian

Installing missing libraries first:

  • php5-curl
  • stunnel4
  • curl


  • Make sure that the correct spacing is set in parsoid.conf

  • Make sure that it has started by checking the /var/log/parsoid.log

  • Mare sure that you enables stunnel after in etc/default/stunnel4

Change to one to enable stunnel automatic startup

Add to Wiki config: LocalSettings.php

\\ Make Wiki Private

$wgGroupPermissions[‘*’][‘read’] = false;
$wgGroupPermissions[‘*’][‘edit’] = false;

\\Enable API for VisionEditor //Parsoid


\\ Configure LDAP

require_once( “$IP/extensions/LdapAuthentication/LdapAuthentication.php” );
$wgAuth = new LdapAuthenticationPlugin();
$wgDebugLogGroups[‘ldap’] = ‘/tmp/mediawikiADDebug.log’;
$wgShowExceptionDetails = true; //for debugging MediaWiki

\\LDAP AD config

$wgLDAPDomainNames = array(

$wgLDAPServerNames = array(
 ‘’ => ‘’,

$wgLDAPEncryptionType = array(
 ‘’ => ‘tls’,

$wgLDAPSearchStrings = array(
 ‘’ => “domain\\USER-NAME”,

//Enable Visual Editor

wfLoadExtension( ‘VisualEditor’ );
// Enable by default for everybody

$wgDefaultUserOptions[‘visualeditor-enable’] = 1;
$wgVirtualRestConfig[‘modules’][‘parsoid’] = array(
// Use port 8142 if you use the Debian package or 8143 if running parsoid under https
 ‘url’ => ‘’, // or use 8142 if you don’t use stunnel4
 ‘domain’ => ‘’,

Linking with Parsoid in private wikis

Forwarding Cookies to Parsoid
// This feature requires a non-locking session store. The default session store will not work and
// will cause deadlocks (connection timeouts from Parsoid) when trying to use this feature.
$wgSessionsInObjectCache = true;

// Forward users' Cookie: headers to Parsoid. Required for private wikis (login required to read).
// If the wiki is not private (i.e. $wgGroupPermissions['*']['read'] is true) this configuration
// variable will be ignored.
// WARNING: ONLY enable this on private wikis and ONLY IF you understand the SECURITY IMPLICATIONS
// of sending Cookie headers to Parsoid over HTTP. For security reasons, it is strongly recommended
// that $wgVirtualRestConfig['modules']['parsoid']['url'] be pointed to localhost if this setting is enabled.
$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;

Parsoid over HTTPS

By default, Parsoid only supports HTTP connections. However, it’s easy to provide HTTPS Parsoid by using Stunnel, a utility which offers SSL wrapping for arbitrary sockets. Most Unix distributions have ‘stunnel’ or ‘stunnel4’ package available from the repository. The following config file shard (e.g. /etc/stunnel/parsoid.conf) should do the trick:

cert = /etc/ssl/my_certs/parsoid.crt
key = /etc/ssl/my_keys/mykey.key
CAfile = /etc/ssl/my_ca/ca.crt

accept  = 8143
connect = 8142


How to fix W: Duplicate sources.list entry newrelic/non-free amd64 Packages (/var/lib/apt/lists/apt.newrelic.com_debian_dists_newrelic_non-free_binary-amd64_Packages)

How to fix this error ?

W: Duplicate sources.list entry newrelic/non-free amd64 Packages (/var/lib/apt/lists/apt.newrelic.com_debian_dists_newrelic_non-free_binary-amd64_Packages)

This comes on my hosting once you typed in apt-get update.

The resolution is pretty simple if you know where to look to for and they don’t make it easy.

Instead of navigating to

$cd /etc/apt/

you need to navigate to:

# cd /etc/apt/sources.list.d/ and edit newrelic file

it might just simpler to type:

$vim /etc/apt/sources.list.d/newrelic.list

and edit to file from:

deb newrelic non-free

deb newrelic non-free

So you need to remove one line and run apt-get update again.

Problem solved!

Or simply you can use this command to find where it is

grep -rnw /etc/ -e “deb”
/etc/apt/sources.list.d/newrelic.list:1:deb newrelic non-free

Kaspersky How to fix database updates

If the database is not updating even if the “Update task worked” then follow the below

1. Log in to the Kaspersky Management console.

2. Navigate to affected server.

3. Run Database Update task.

4. Check if the task worked by checking the database timestamp in the Application->Kaspersky Server-> Database Date. If the timestamp hasn’t changed then do the following

5. Under Application Stop/Start Kaspersky Server.

6. Under Task Run a Database Rollback

7. Under Taks Run the database Update.

8. Go out of the server and refresh the view.

9. Check the database timestamp but it should be “green” already.