Check email addresses on SMTP level

New tool smtpcheckaddresses – it checks given email addresses on SMTP level.

The intended use is to validate a MX email server configuration when it comes to email addresses / domains. E.g. during a migration just before going in production one might to check that all configured email address are accepted
and not bouncing.

smtpcheckaddresses.py accpepts a list of email addresses in a text file, one line per address. For each address it then opens a connection to a given host and checks the return code for the “RCPT TO” command. If the return code is in the range 200 to 299 the email address is assumed to be "OK".

Additionally when given the -s option it sends a short test email to the addresses so you can check that mails are really delivered locally and not relayed. It is wise to provide also some email addresses which must fail.

smtpcheckaddresses.py was hacked together in about one hour. So don’t expect much error/exception handling. Needless to say that you use it at your own risk.

Lokales git-Projekt auf Gitosis-Server übertragen

Gitosis ist ein Werkzeug, was das öffentliche Hosten von git-Projekten erleichtert. Hier wird beschrieben wie man ein – bisher lokal verwaltetes – Git-Projekt zu gitosis hinzufügt, sodaß es übers Web und über das git-Protokoll per ssh verfügbar ist. Es wird dabei davon ausgegange, daß schon eine funktionierende gitosis-Installation existiert.

Continue reading “Lokales git-Projekt auf Gitosis-Server übertragen”

Git: Reverting files in working copy

If you have want to revert some single file in your working copy to the “official” repository version use $ git checkout filename. git revert does not work like in other versioncontrol systems, instead it reverts already submitted changes.

If you want to revert the whole working copy use git reset.

See also man page of git-revert and Bryan Murdocks blog post.

Correct wrong exif timestamps

Found out that the exif timestamps of my last holiday pictures had the wrong timezone. This can be easily corrected with Phil Harveys exiftool. There is even a description of exactly that problem in the documentation

In my case I did not only correct the timezone shift, but also the error to UTC time. For this purpose I simply took a picture of my GPS receivers clock display to compare the GPS / UTC timestamp to the EXIF data. It was a time shift of plus 59 minutes and 39 seconds so I used the following command line:

$ exiftool -AllDates+=:59:39 pictureDirectory

Note that by default exiftool generates backup copies to *_original files which you may want to delete afterwards.