user-avatar
Today is Saturday
February 4, 2012

Tag: email

April 3, 2010

Announcing colibri 1.0 alpha1, a mailing list manager with a django based web interface

by Thomas Capricelli — Categories: Admin, Django, Gentoo — Tags: , 3 Comments

It has been more than one year now that I’m running my own mailing list software here at freehackers, and I think it is now time to release a first preview of it. Let me introduce Colibri 1.0 alpha1

Colibri is a free software (GPL), based on python and Django.

myaccount2

It’s not feature complete, but it actually forward mails. From the web interface, people can (un)subscribe and configure their accounts.

The webpage, with screenshots, download, bugtracker and some documentation is at http://labs.freehackers.org/projects/colibri/wiki

I use mercurial for source control, and the repository is available both for cloning and browsing at http://sources.freehackers.org/Colibri/

July 13, 2008

Linux, a second-class citizen in the PHP world

by Thomas Capricelli — Categories: Admin, Gentoo — Tags: , 5 Comments

PHP has the ability to send mails. Great. To do so, it can either connect to an external smtp server, or use a local MTA. Even greater!

But only on windows. As astounding as it sounds, the feature of using a smtp server is only available on windows : on linux, you need to install a full-blown MTA just to be able to send mails from PHP.

Consider the following quite common setup : you have a main vserver, hosting the MTA (postfix in my case), and a dedicated vserver for all those unsecured php-based web stuff. The natural thing to do would be to ask apache/php to send mail through the MTA on the main vserver. This is just not possible, even with the more recent php version.

You can try to use SSMTP or similar “relay only” MTA, but this wont work very well. They don’t relay headers well enough and for example the “From:” header wont go through.

The most surprising thing about it, is that the feature is here, but for some unknown reason, it is not made available under linux. PHP authors decided that linux would be a second-class citizen in the PHP world, and I don’ understand why it is so.

The solution I’ve finally used is to install postfix as a relay only, and NOT starting smptd (you need to comment out the line related to “smtpd” in the file master.cf). It would not be possible anyway, as the smtp port (25) is already opened on the main vserver (vservers share inet ports). The important steps for the configuration (main.cf) are :

  • relayhost = 192.168.0.1 # IP of your main postfix server
  • inet_interfaces = all #wont be used, but needed anyway
  • mydestination = # nothing -> everything is relayed

Once postfix has started, you can check that no port is opened (“netstat -anp | grep postfix”) and that mails actually go through (‘echo foobar | sendmail mymail@myhost.com’).

© 2012 Thomas Capricelli All rights reserved - Wallow theme v0.46.5 by ([][]) TwoBeers - Powered by WordPress - Have fun!