Comment 0 for bug 86425

Revision history for this message
Pablo Castellazzi (pcastellazzi) wrote :

Binary package hint: ssmtp

Ubuntu Edgy / sSMTP 2.61

When you use smtp authentication and the password contains a ":" (colon) sSMTP send an incomplete password to the server. I mean if AuthPass is set to Pepe:49, sSMTP only send Pepe.

It can be fixed with the following patch:

--- ssmtp-2.61/ssmtp.c 2007-02-19 23:16:03.000000000 -0600
+++ ssmtp-fixed.c 2007-02-19 23:17:59.000000000 -0600
@@ -881,7 +881,7 @@ bool_t read_config()
   p=firsttok(&begin, "= \t\n");
   if(p){
    rightside=begin;
- q = firsttok(&begin, "= \t\n:");
+ q = firsttok(&begin, "= \t\n");
   }
   if(p && q) {
    if(strcasecmp(p, "Root") == 0) {
@@ -894,15 +894,15 @@ bool_t read_config()
     }
    }
    else if(strcasecmp(p, "MailHub") == 0) {
+ if((r = strchr(q, ':')) != NULL) {
+ *r++ = '\0';
+ port = atoi(r);
+ }
+
     if((mailhost = strdup(q)) == (char *)NULL) {
      die("parse_config() -- strdup() failed");
     }

- if((r = firsttok(&begin, "= \t\n:")) != NULL) {
- port = atoi(r);
- free(r);
- }
-
     if(log_level > 0) {
      log_event(LOG_INFO, "Set MailHub=\"%s\"\n", mailhost);
      log_event(LOG_INFO, "Set RemotePort=\"%d\"\n", port);