Tag Archives: SMTP

Nullmailer keeps trying to send unsuccessful mails on Ubuntu

I have noticed that my Ubuntu box is lately always trying to reach a SMTP server (detected through Wireshark tool). After reviewing the list of running processes that contains the word mail (running ps aux | grep mail on console), I found a couple of them called Nullmailer that seems the responsible of that and indeed, it was.

So a Google search led me to this thread, where in that case, Nullmailer registered entries on Syslog (which possible happened on my computer also). The messages that Nullmailer was trying to send were related to Cron jobs output. So, the solution was to delete the queue of messages of this program, located on /var/spool/nullmailer/queue/.

Configure Clientexec to send mail using Google Apps

If you use Clientexec as your hosting company’s management and support web application, and Google Apps for your emailing (or even just GMail), then, it is possible to configure Clientexec to send mails through Google SMTP server.

Unfortunately, it is not straightforward because the default Clientexec SMTP mailer (at least until 3.2.3 version of this software) can not handle SSL/TLS as Google required. You will need to manually modify the PHPMailer that is embedded on Clientexec.

The steps are not difficult, here they are:

First, open the file /{clientexec-directory}/newedge/classes/PHPMailer.php

Comment out the following part of the code (around line 537):

if(strstr($hosts[$index], ":"))
  list($host, $port) = explode(":", $hosts[$index]);

And just bellow those line, add the following:

    list($protocol,$hostPort) = explode("://",$hosts[$index]) ;
if(strstr($hostPort, ":"))
    list($host, $port) = explode(":", $hostPort);

Then, on EMail Settings inside Clientexec, use:

User: your-address@your-google-apps-domain

Password: your-google-apps-password

Host: ssl://smtp.gmail.com

Port: 465

Now, Clientexec should be sending mails without problems through your Google Apps email account, and all sent emails will be stored on that account.

Redmine y GMail

Siguiendo mi post anterior, lo siguiente que hice fue configurar el Redmine (versión 0.8-stable) con una cuenta de correo de GMail (Google Apps para ser más exactos) y que los correos sean enviados desde esa cuenta.

El problema es que el servidor SMTP del Gmail utiliza TLS, por lo que es necesario instalar primero el plugin Action Mailer. Se puede hacer directamente desde la consola así:

script/plugin install http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls

Y luego se modifica el archivo config/email.yml (o crearlo a partir de config/email.yml.example) de la siguiente manera:

# Outgoing email settings
  delivery_method: :smtp
    address: "smtp.gmail.com"
    port: "587"
    domain: "dominio-en-google-apps.com"
    authentication: :login
    user_name: "usuario@dominio-en-google-apps.com"
    password: "contraseña"
    tls: true
  delivery_method: :smtp
    port: 25
    domain: example.net
    authentication: :login
    user_name: redmine@example.net
    password: redmine