:::: MENU ::::

Monthly Archives / December 2014

  • Dec 22 / 2014
  • 0
Google Agenda

Create a repeating event on last day of each month on Google Calendar

There is no easy way to make an event repeating on last day of each month with Google Calendar. So here is a simple trick to pass through this and get an event repeating on the last day of each month.

Open a simple text editor with a new file (with Notepad for example, it’s efficient!) and write this in:

BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART:20141231T173000Z
DTEND:20141231T183000Z
RRULE:FREQ=MONTHLY;BYDAY=SU,MO,TU,WE,TH,FR,SA;BYSETPOS=-1;WKST=MO
SUMMARY:Title of the event
DESCRIPTION:Description of the event
END:VEVENT
END:VCALENDAR

You will need to change these parameters:

  • DTSTART/DTEND: The date (start/end) of the first event
  • SUMMARY: The name of the event
  • DESCRIPTION: The description of the event
  • BYDAY: You can choose whether the last business day or not by letting/dropping the SU and SA entries (for Sunday and Saturday

Save the file as “calendar.ics” and close it.

Right now, to include this recurring event:

  1. Go on your Google Calendar page
  2. On the left panel, click on the arrow near  “Other Calendars” and click on “Import calendar
  3. You will be asked for a file, choose the one you’ve just created (calendar.ics)
  4. Choose also the calendar you want to use to add the entries (you can create a new calendar or use an existing one)
  5. Click on “Import

Your event will now appear on the last day of each month (28, 29, 30 or 31st) depending on the month!

  • Dec 18 / 2014
  • 0
Linux

Testing SMTP server using telnet (whether with authentication or not)

You can need to perform testing with your SMTP server and see if you are able to send mail with it.
You have your domain name, and you want to check if mail server is answering properly?

1. Check the mail server with DNS entries

We first need to find the right DNS entry for MX record and know what is the mail server.

~$ nslookup
> server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
> set querytype=MX
> mydomain.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
mydomain.com	mail exchanger = 10 mail.mydomain.com.

2. Open connection to mail server (default ports 25,587)

We will now open a telnet connection on the mail server we just found. Port to use can be different depending on the configuration of the server mail.

~$ telnet mail.mydomain.com 587
Trying www.xxx.yyy.zzz...
Connected to mydomain.com.
Escape character is '^]'.
220 mail.mydomain.com ESMTP Postfix

The answer can change depending on the mail engine used, this is just an example.

3. Send an email with or without authentication

In case of there is no authentication needs (an open smtp server), just perform:

EHLO mydomain.com 
250
MAIL FROM:<[email protected]> 
250 OK
RCPT TO:<[email protected]> 
250 OK
DATA
354 GO AHEAD
From: Me <[email protected]>
To: Him <[email protected]>
Subject: This is a testing mail
This message is only sent for testing purposes.
. 
250 OK 1413684421 qp 18534
QUIT
221

If the server requests an SSL/TLS authentication before being able to send mail, you will probably need to use openssl library as telnet does not support TLS by default (you will get an error on STARTTLS command).
You will also need to prepare the credentials by encoding them in base 64:

~$ echo -ne 'userpassword' | base64
AHVzZXIAcGFzc3dvcmQ=

Once you got this, you can open connection and request mail sending as following:

openssl s_client -starttls smtp -connect mail.mydomain.com:587
CONNECTED(00000003)
EHLO mydomain.com
250-mail.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN AHVzZXIAcGFzc3dvcmQ=
235 2.7.0 Authentication successful
mail from: <[email protected]>
250 2.1.0 Ok
rcpt to: <[email protected]>
250 2.1.5 Ok
DATA
354 End data with .
From: Me <[email protected]>
To: Him <[email protected]>
Subject: This is a testing mail
This mail is only for testing purposes
.
250 2.0.0 Ok: queued as E65832403CF
QUIT
DONE

Notice that if the mail server doesn’t allow SMTP relay, you won’t be able to send a mail to another domain that the ones that this server is allowing. In that case, you will get an error as:

554 5.7.1 <[email protected]>: Relay access denied

That means you will only be able to send mail to an “@mydomain.com” mail address and not to any other.

  • Dec 07 / 2014
  • 0
Google Agenda

Unsubscribe from birthdays calendar on Google Calendar

To unsubscribe from the Birthday’s calendar, here is the process:

  1. Click on the arrow in left panel besides Other calendars and choose Browser interesting calendards
  2. Go to the More tab
  3. On line Birthdays, click on Unsubscribe at the right of the ligne

  • Dec 02 / 2014
  • 0
Linux

Testing an ISO or an USB bootable drive with QEMU

If you want to test an ISO image or a bootable USB drive you just prepared, you can do it very easily thanks to QEMU with a simple command-line. Obviously, you will need to install the QEMU package first so you can use it. For example on a Debian-based distribution:

sudo apt-get install qemu qemu-system qemu-utils

For USB drive testing, plug the USB key and get the name of device (checking dmesg if necessary and ensure that the drive is not mounted automatically). Afterwards you can launch:

sudo /usr/bin/qemu-system-x86_64 -hda /dev/sdb -m 1G

For ISO testing, just get the path of your ISO image and launch:

sudo /usr/bin/qemu-system-x86_64 -cdrom /path/to/image.iso -m 1G

It will launch an emulator with 1G RAM (-m option). As it’s emulated, there is a lot of things that won’t work and I recommend you to use this only for simple testing purposes (no network access or usb port enabled by default for example). All of these can surely be configured with a more complete command-line, but I invite you to read full QEMU documentation for doing that.

Here you go 😉 !

Question ? Contact