mysqmail (0.4.9-7) mysqmail-dovecot-logger.c

Summary

 mysqmail-dovecot-logger.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

--- mysqmail-0.4.9.orig/mysqmail-dovecot-logger.c
+++ mysqmail-0.4.9/mysqmail-dovecot-logger.c
@@ -124,6 +124,9 @@
 		domain++; //shift past the @ to get the domain
 	}
 
+	// Strip off the last 2 chars of the domain name which are "):"
+	domain[strlen(domain) - 2] = 0;
+
 	// *** Calculate the total traffic for the session ***
 	mysqmail_bytes = 0;
 
@@ -213,7 +216,7 @@
 	daemonize();
 	setlogmask (LOG_UPTO (LOG_NOTICE));
 	openlog(DAEMON_NAME, LOG_NDELAY | LOG_CONS | LOG_PID, LOG_LOCAL1);
-	write_pidfile("mysqmail-dov-logger");
+	write_pidfile("mysqmail-dovecot-logger");
 	reg_hand();
 
 	read_config_file();