Index: Makefile.in
--- Makefile.in.orig	2008-02-29 03:50:15 +0100
+++ Makefile.in	2009-07-07 22:45:14 +0200
@@ -16,7 +16,7 @@
 
 # Configuration files
 CONFIGURATION_FILE=$(SSMTPCONFDIR)/ssmtp.conf
-REVALIASES_FILE=$(SSMTPCONFDIR)/revaliases
+REVALIASES_FILE=$(SSMTPCONFDIR)/ssmtp.revaliases
 
 INSTALLED_CONFIGURATION_FILE=$(CONFIGURATION_FILE)
 INSTALLED_REVALIASES_FILE=$(REVALIASES_FILE)
Index: newaliases.8
--- /dev/null	2009-07-07 22:45:20 +0200
+++ newaliases.8	2009-07-07 22:45:14 +0200
@@ -0,0 +1,17 @@
+.TH NEWALIASES 8 "September 2000" "Debian GNU/Linux"
+.SH NAME
+newaliases \- update /etc/aliases database
+.SH SYNOPSIS
+.B newaliases
+.SH DESCRIPTION
+This is a link to the ssmtp binary. It invokes
+.B /usr/sbin/sendmail
+with the
+.B -bi
+option. It is provided for compatibility with the sendmail program.
+.P
+In this case it does absolutely nothing since sSMTP does not support
+/etc/aliases and is just there to avoid programs returning error messages.
+.SH AUTHOR
+This manual page was written by Christoph Lameter <clameter@debian.org>,
+for the Debian GNU/Linux system. Minor fixes by Matt Ryan <mryan@debian.org>
Index: ssmtp.c
--- ssmtp.c.orig	2009-07-07 04:56:01 +0200
+++ ssmtp.c	2009-07-07 22:46:12 +0200
@@ -39,6 +39,10 @@
 #include <fcntl.h>
 #include "xgethostname.h"
 
+#ifndef NUL
+#define NUL '\0'
+#endif
+
 bool_t have_date = False;
 bool_t have_from = False;
 #ifdef HASTO_OPTION
@@ -55,21 +59,21 @@
 
 #define ARPADATE_LENGTH 32		/* Current date in RFC format */
 char arpadate[ARPADATE_LENGTH];
-char *auth_user = (char)NULL;
-char *auth_pass = (char)NULL;
-char *auth_method = (char)NULL;		/* Mechanism for SMTP authentication */
-char *mail_domain = (char)NULL;
-char *from = (char)NULL;		/* Use this as the From: address */
+char *auth_user = (char *)NULL;
+char *auth_pass = (char *)NULL;
+char *auth_method = (char *)NULL;		/* Mechanism for SMTP authentication */
+char *mail_domain = (char *)NULL;
+char *from = (char *)NULL;		/* Use this as the From: address */
 char *hostname;
 char *mailhost = "mailhub";
-char *minus_f = (char)NULL;
-char *minus_F = (char)NULL;
+char *minus_f = (char *)NULL;
+char *minus_F = (char *)NULL;
 char *gecos;
-char *prog = (char)NULL;
+char *prog = (char *)NULL;
 char *root = NULL;
 char *tls_cert = "/etc/ssl/certs/ssmtp.pem";	/* Default Certificate */
-char *uad = (char)NULL;
-char *config_file = (char)NULL;		/* alternate configuration file */
+char *uad = (char *)NULL;
+char *config_file = (char *)NULL;		/* alternate configuration file */
 
 headers_t headers, *ht;
 
@@ -222,11 +226,10 @@
 	exit(1);
 }
 
-#ifndef _GNU_SOURCE
 /*
 basename() -- Return last element of path
 */
-char *basename(char *str)
+char *mybasename(char *str)
 {
 	char *p;
 
@@ -237,7 +240,6 @@
 
 	return(strdup(p));
 }
-#endif /* _GNU_SOURCE */
 
 /*
 strip_pre_ws() -- Return pointer to first non-whitespace character
@@ -261,7 +263,7 @@
 
 	p = (str + strlen(str));
 	while(isspace(*--p)) {
-		*p = (char)NULL;
+		*p = NUL;
 	}
 
 	return(p);
@@ -287,7 +289,7 @@
 		q++;
 
 		if((p = strchr(q, '>'))) {
-			*p = (char)NULL;
+			*p = NUL;
 		}
 
 #if 0
@@ -310,7 +312,7 @@
 	q = strip_post_ws(p);
 	if(*q == ')') {
 		while((*--q != '('));
-		*q = (char)NULL;
+		*q = NUL;
 	}
 	(void)strip_post_ws(p);
 
@@ -363,7 +365,7 @@
 	*linestart = False;
 
 	if((p = strchr(str, '\n'))) {
-		*p = (char)NULL;
+		*p = NUL;
 		*linestart = True;
 	}
 	return(leadingdot);
@@ -384,7 +386,7 @@
 		while(fgets(buf, sizeof(buf), fp)) {
 			/* Make comments invisible */
 			if((p = strchr(buf, '#'))) {
-				*p = (char)NULL;
+				*p = NUL;
 			}
 
 			/* Ignore malformed lines and comments */
@@ -519,7 +521,7 @@
 #endif
 
 	/* Ignore missing usernames */
-	if(*str == (char)NULL) {
+	if(*str == NUL) {
 		return;
 	}
 
@@ -576,7 +578,7 @@
 		}
 
 		/* End of string? */
-		if(*(q + 1) == (char)NULL) {
+		if(*(q + 1) == NUL) {
 			got_addr = True;
 		}
 
@@ -584,7 +586,7 @@
 		if((*q == ',') && (in_quotes == False)) {
 			got_addr = True;
 
-			*q = (char)NULL;
+			*q = NUL;
 		}
 
 		if(got_addr) {
@@ -676,7 +678,7 @@
 	if(strncasecmp(ht->string, "From:", 5) == 0) {
 #if 1
 		/* Hack check for NULL From: line */
-		if(*(p + 6) == (char)NULL) {
+		if(*(p + 6) == NUL) {
 			return;
 		}
 #endif
@@ -741,7 +743,7 @@
 	size_t size = BUF_SZ, len = 0;
 	char *p = (char *)NULL, *q;
 	bool_t in_header = True;
-	char l = (char)NULL;
+	char l = NUL;
 	int c;
 
 	while(in_header && ((c = fgetc(stream)) != EOF)) {
@@ -776,9 +778,9 @@
 						in_header = False;
 
 				default:
-						*q = (char)NULL;
+						*q = NUL;
 						if((q = strrchr(p, '\n'))) {
-							*q = (char)NULL;
+							*q = NUL;
 						}
 						header_save(p);
 
@@ -809,9 +811,9 @@
 						in_header = False;
 
 				default:
-						*q = (char)NULL;
+						*q = NUL;
 						if((q = strrchr(p, '\n'))) {
-							*q = (char)NULL;
+							*q = NUL;
 						}
 						header_save(p);
 
@@ -844,10 +846,12 @@
 	if (!rest) {
 		return NULL;
 	}
-	tok=strndup(*s,rest-(*s));
+	tok=malloc(rest-(*s));
 	if (!tok) {
-		die("firsttok() -- strndup() failed");
+		die("firsttok() -- malloc() failed");
 	}
+    strncpy(tok, *s, rest-(*s));
+    tok[rest-(*s)] = '\0';
 	*s=rest+1;
 	return tok;
 }
@@ -876,7 +880,7 @@
 		char *rightside;
 		/* Make comments invisible */
 		if((p = strchr(buf, '#'))) {
-			*p = (char)NULL;
+			*p = NUL;
 		}
 
 		/* Ignore malformed lines and comments */
@@ -1310,7 +1314,7 @@
 			buf[i++] = c;
 		}
 	}
-	buf[i] = (char)NULL;
+	buf[i] = NUL;
 
 	return(buf);
 }
@@ -1737,7 +1741,7 @@
 		j = 0;
 
 		add = 1;
-		while(argv[i][++j] != (char)NULL) {
+		while(argv[i][++j] != NUL) {
 			switch(argv[i][j]) {
 #ifdef INET6
 			case '6':
@@ -2066,7 +2070,7 @@
 	(void)signal(SIGTTOU, SIG_IGN);
 
 	/* Set the globals */
-	prog = basename(argv[0]);
+	prog = mybasename(argv[0]);
 
 	hostname = xgethostname();
 
