How to export mailman mailinglist subscribers

There is no built-in function to export the mailinglist subscriber in mailman. If you want to migrate to another software or move to another mailman installation you are in need to export the subscribers. I found this to be the easiest way:

  1. Log in to your mailman mailinglist administration panel, like http://hostname/cgi-bin/mailman/admin/mylist
  2. Replace “admin” with “roster” in the URL in the address bar and press enter, like http://hostname/cgi-bin/mailman/roster/mylist
  3. The subscribers are listed in a bulleted list with the @ sign replaced by ” at “. Mark the list in the browser, right click the selection and “Copy”
  4. Open a plain text editor, like notepad if you are running Windows (avoid Word, Wordpad, LibreOffice writer etc since you will also paste a lot of text attributes in those editors, use a plain text editor)
  5. Right click in the editor and select “Paste”
  6. Search and replace, normally by pressing CTRL-H. Search for ” at ” and replace it with “@” (without the “”) and click “Replace all”.
  7. Save the file

If you are moving the subscriber list into another mailman installation:

  1. In the text editor above, right click and “Select all” to select all text (the list of the subscribers) and then right click and “Copy”
  2. In the administration panel of the new mailman installation, click on “Membership management
  3. Click on “Add new members to the list
  4. In the top box where you can type email addresses one per line, right click and “Paste”
  5. Set “Send welcome message to new members” to “No” (unless you really want mailman to send an email welcoming all the subsrcibers you are adding)
  6. Click “Save” in the bottom of the page

Connecting a Windows client to a WebDAV drive

There are several third party products available to connect a Windows client to a WebDAV drive. This guide will explain how to do it with using native Windows and has been tested using Windows 7 but should work for other versions too. For Windows server 2003, Windows XP and Vista users, you first need to download a web folders patch from Microsoft.

It is a recommendation that you connect to the WebDAV drive using encryption (SSL), i.e. https. If you have a real, non self signed, certificate for your host, you’re good to go (the one that makes they key symbol in your browser show locked, green and give no warnings). Just skip down to the section describing how to setup the connection.


Using a self signed SSL certificate

If you are using a self signed SSL certificate, or signed by a non trusted certificate authority (CA), you will get the error message “An unexpected network error occurred” when trying to connect the WebDAV drive.

If you are using a self signed certficate, make sure it is issued for the hostname you are accessing the WebDAV drive through. If not, you must create a new certificate issued for the hostname of your WebDAV host. No workaround on that part as far as I know.

When you have a self signed certificate for your WebDAV hostname installed on your WebDAV server you must add the certificate on the client. This is how you do it:

  1. Run Internet Explorer as Administrator (right click on it and select “Run as administrator”)
  2. Go to your WebDAV host by entering the hostname in the address bar, like https://mywebdavhost (make sure you use https:)
  3. Select “Continue to this website (not recommended)”
  4. Click on the “Certificate error” displayed in red in the address bar
  5. Click on “View certificates”
  6. Click on “Install certificate”
  7. Click on “Next” in the Import wizard
  8. In the next step, select “Place all certificates in the following store” and click “Browse”
  9. Select “Trusted Root Certification Authorities” and click OK
  10. Click “Next”
  11. Answer “Yes” to the security question


Setting up Windows to map a network drive using native WebDAV

When your SSL certificate is sorted out (either by using a real certificate or a self signed one using the above steps), you are ready to map the network drives.

  1. Start the file manager, for example by clicking the Start menu and then click on “Computer”
  2. In the top of the file manager window, click on “Map network drive”
  3. Select folder letter, for example Z:
  4. The folder, enter the URL of your WebDAV host, like https://mywebdavhost
  5. Select “Connect using different credentials” and optionally “Reconnect at logon”
  6. Click “Next”
  7. Enter the WebDAV host user name and password and if you previously selected “Reconnect at logon” it can be a good idea to select “Remember my password”
  8. Click “OK”

Joomla Update component missing

Sometimes the Joomla Update component is missing in the Components menu in the backend. A workaround has been to use the extension manager and paste the update package URL and make the update that way.

But when updating to Joomla 3.5.0 that method is not possible. A quick solution, if the Joomla Update component is present but just not displayed in the menu, is to call the URL to the component directly. In the address bar of your web browser, enter:

Now you can do the Joomla version update.

To solve the problem on a more permanent basis (i.e. to get it back into the Component menu in the backend), see this article.

How to find out the IP-address of a remote desktop client on Windows server

From a command shell (cmd) issue the command:

netstat -a | find “:3389” | find “ESTABLISHED”

This will a result in a list of all remote IP-addresses connected using RDP to the server.

If the server is using a non-standard port for RDP, replace 3389 with the non-standard port.

Microsoft remote desktop (RDP) shows black screen after login [SOLUTION]

After connecting by remote desktop to a machine, the initial welcome screen is displayed then the screen goes black.

Press CTRL-ALT-END and wait (it might take a while). When the Cancel button is visible, hit Cancel. Now the screen goes back to normal.

How to remove unwanted formatting, like class=”MsoNormal”, in Joomla content

If a content administrator pastes text containing styling into the editor in Joomla, the formatting is kept as it is in the source (another web page or a Microsoft Office Word document for example). The general idea using a template on a website is that the template should control the looks of headers, paragraphs etc. By keeping the formatting on the pasted text, it will cause your website to have a variety of fonts, styles and sizes.

It can also be a problem when a content administrator receives text material for the website, it can be written in Microsoft Office Word, causing a paste to include unwanted formatting, like the class=”MsoNormal” (Mso = Microsoft Office formatting).

This solution removes all class and style tags from the content. This means the user will no longer be able to set a different font style or size on the content. So that will be entirely controlled by the template. However, if you as the super super admin, who knows what you are doing, need to be able to create content with class and style you can add an unfilterered group for your own account. Note that if your content then is being edited and saved by a filtered user, your classes and styles will be lost.

We assume for this example that all content administrators are Super Users.

  1. Go to System -> Global options -> Text filters
  2. For Super Users, select Filter type = My own blacklist
  3. In the column Filter tags enter span
  4. In the column Filter attributes enter class,style
  5. Click Save

If you need to be able to save unfiltered content for a user, such as yourself, do this:

  1. Go to Users -> Groups
  2. Click New to add a new group
  3. Name it Unfiltered and make it a subgroup to Super Users
  4. Click Save & Close
  5. Go to Users -> Users
  6. Click on the user you want to edit (presumbaly yourself)
  7. Click on the Groups tab
  8. Unselect Super Users and select Unfiltered (make sure it really is a subgroup to Super Users, otherwise you have just removed your accounts super users priviliges)
  9. Click Save & Close
  10. Go to System -> Global settings -> Text filters 
  11. Make sure the group Unfiltered has No filtering selected as Filter type
  12. Click Save


Delete old PHP5 session files automatically

If not specified the PHP5 session files will be located in a directory like /var/lib/php5 and the builtin garbage collection will delete them, normally after 24 hours.

But often systems like CMS:es will put session files somewhere else and if the system doesn’t have it’s own garbage collection those session files will be kept forever. The reason can be to let a website visitor click “keep me logged in” or to remember a visitors preferences on the website. This normally doesn’t impose a problem as these session files are very small and the number of them counts in hundreds or possibly a couple of thousand files.

However, I encountered a site that created a very large number of session files and kept them forever. At some point the session files count was in the range of millions of files causing the system to run out of inodes. A solution could be to investigate how the system was handling session files but the internal workings of the site was outside of my responsibility. Another solution was to increase inodes but this will be a temporary solution.

The solution chosen was to create a garbage collection routine for the site in question, that deleted session files older than x days. The oldest session files was over 4 years old. The decision was to delete all session files older than a month (30 days), causing visitors who logged in, or had their preferences set, for more than a month ago had to re-login or set their preferences again on their next visit to the site. This was accomplished by the following command (which is run by cron every night):

find /var/www/ -type f -mtime +30 -exec rm {} \;

bigclivedotcom Youtube channel

bigclivedotcom is a Youtube channel operated by Clive from Isle of Man. He dissects and investigates all kinds of electronics stuff, mostly ordered from questionable eBay sources. If you are into electronics this is a really enjoyable channel.