I installed varnish as HTTP accelerator in front of my apache server. Some of my sites can be accessed only via https. When accessed via http, clients get redirected to https (the redirection is done in the virtual host definition).
After varnish's installation, I wanted to move the redirection under varnish. In order to redirect browsers using varnish, edit /etc/varnish/default.vcl and add the following:

sub vcl_recv {
if (req.http.host ~ "webmail\.glennie\.fr" || req.http.host ~ "nagios\.glennie.fr" || req.http.host ~ "stats\.glennie\.fr") {
       set req.http.x-host = req.http.host;
       set req.http.x-url = req.url;
       return(synth(750, "https://" + req.http.x-host + req.http.x-url));
    }
}


sub vcl_synth {
    if (resp.status == 750) {
      set resp.http.Location = "https://" + req.http.x-host + req.http.x-url;
      set resp.status = 301 ;
      return(deliver);
  }
}


YMMV


I have been using spamassassin since a decade now. Few days a ago, sa was tagging a spam as ham. After few checks, I discovered that the sender address was white listed.
In this case, just use spamassassin --remove-addr-from-whitelist spamSender to remove the address from the white list. More information on this topic can be found on spamassassin's wiki page and the tool call sa-awl can be used to maintain the white liste database.


I use bash since I started using Linux. Since then, I use few tricks to be more effcient. I started to write a simple page grouping few tricks I use every day. I will continue add some more as learn them. If you find this useful, you may also like:


Since few months, on my self hosted mail server, smtp authentification under postfix stopped working. Mails were rejected with elay access denied error.

At first glance, it looked related to sasl. So I tried some tools (testsaslauthd, smtptest) to debug the issue, but found the authentication was working. So I started to look at the postix configuration.

After some tracing, it appeared postfix was rejecting incomming mail becase of smtpd_relay_restrictions parameter, even if it was able to authenticate client connexion via sasl. In fact, in some point of time, smtpd_relay_restrictions has changed (or got added...).

The default value of the postconf -d | grep smtpd_relay_restrictions is permit_mynetworks, reject_unauth_destination. Obviousy, permit_sasl_authenticated is missing from the list. So, I added smtpd_relay_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination, reject to main.cf and restarted the service. Magicly, I was able to send mails from the public wifi access.


Sur une machine windows 7 fraîchement installée, toute nouvelle connexion échouait avec le message d'erreur Échec d'ouverture de session par le service Service de profil utilisateur. Impossible de charger le profil utilisateur.

Pour résoudre ce problème, il faut:

  • Rebooter en mode sans échec (ou se connecter avec un compte ayant les droits administrateur si possible)
  • Afficher les fichiers cachés et les fichiers système par l'explorateur windows.

  • Supprimer le C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\Sqm\iesqmdata1.sqm (Si les cachés et systèmes, ne sont pas affichés, ce fichiers n'est pas visible sous l'explorateur)

  • Redémarrer la machine.