Import smtpclient 1.0.0.

Submitted by Patroklos Argyroudis <argp@bsd.gr>.

This program is a minimal SMTP client that takes an email
message body and passes it on to a SMTP server (default is the
MTA on the local host). Since it is completely self-supporting,
it is especially suitable for use in restricted environments.
This commit is contained in:
naddy 2001-08-13 01:06:41 +00:00
parent 37b8663486
commit c5ad21d92b
6 changed files with 79 additions and 0 deletions

21
mail/smtpclient/Makefile Normal file
View File

@ -0,0 +1,21 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/08/13 01:06:41 naddy Exp $
COMMENT= "simple SMTP client"
DISTNAME= smtpclient-1.0.0
CATEGORIES= mail
NEED_VERSION= 1.402
HOMEPAGE= http://www.engelschall.com/sw/smtpclient/
MAINTAINER= Patroklos Argyroudis <argp@bsd.gr>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}distrib/
CONFIGURE_STYLE= gnu dest
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (smtpclient-1.0.0.tar.gz) = 8b5d9260572107bb901edf6aacbf3747
RMD160 (smtpclient-1.0.0.tar.gz) = 8f85a3622cb201c798b9c30aa5538d89d2dd53f7
SHA1 (smtpclient-1.0.0.tar.gz) = 491ef8eeb525641eb25c36b17a4230d9b63e7f94

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-smtpclient_errno_c,v 1.1.1.1 2001/08/13 01:06:41 naddy Exp $
--- smtpclient_errno.c.orig Wed Aug 1 15:09:39 2001
+++ smtpclient_errno.c Wed Aug 1 15:11:36 2001
@@ -91,7 +91,7 @@ char *errorstr(int errnum)
#else
static char buffer[50];
if (errnum < 0 || errnum >= sys_nerr) {
- sprintf(buffer, "ERR-UNKNOWN (%d)", errnum);
+ snprintf(buffer, (sizeof(buffer) - 1), "ERR-UNKNOWN (%d)", errnum);
return(buffer);
}
return(sys_errlist[errnum]);

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-smtpclient_main_c,v 1.1.1.1 2001/08/13 01:06:41 naddy Exp $
--- smtpclient_main.c.orig Wed Aug 1 15:25:22 2001
+++ smtpclient_main.c Wed Aug 1 15:33:07 2001
@@ -86,7 +86,7 @@ void log(char *str, ...)
char buf[1024];
va_start(ap, str);
- vsprintf(buf, str, ap);
+ vsnprintf(buf, 1024, str, ap);
if (usesyslog)
syslog(LOG_ERR, "SMTPclient: %s", buf);
else
@@ -395,16 +395,16 @@ int main(int argc, char **argv)
log("%s: unknown host\n", my_name);
exit(1);
}
- strcpy(my_name, hp->h_name);
+ strlcpy(my_name, hp->h_name, sizeof(my_name));
/*
* Determine from address.
*/
if (from_addr == NULL) {
if ((pwd = getpwuid(getuid())) == 0) {
- sprintf(buf, "userid-%d@%s", getuid(), my_name);
+ snprintf(buf, (sizeof(buf) - 1), "userid-%d@%s", getuid(), my_name);
} else {
- sprintf(buf, "%s@%s", pwd->pw_name, my_name);
+ snprintf(buf, (sizeof(buf) - 1), "%s@%s", pwd->pw_name, my_name);
}
from_addr = strdup(buf);
}

View File

@ -0,0 +1,8 @@
SMTPclient -- simple SMTP client
This program is a minimal SMTP client that takes an email
message body and passes it on to a SMTP server (default is the
MTA on the local host). Since it is completely self-supporting,
it is especially suitable for use in restricted environments.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/08/13 01:06:41 naddy Exp $
bin/smtpclient
man/man1/smtpclient.1