Add smtpclient-1.0.0

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.

Obtained from:	OpenBSD
This commit is contained in:
Kris Kennaway 2001-08-25 10:14:13 +00:00
parent 5d8b47b83f
commit 0e61002d04
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46874
9 changed files with 83 additions and 0 deletions

View file

@ -179,6 +179,7 @@
SUBDIR += smail
SUBDIR += smapi
SUBDIR += smtpd
SUBDIR += smtpclient
SUBDIR += smtpfeed
SUBDIR += smunge
SUBDIR += solidpop3d

18
mail/smtpclient/Makefile Normal file
View file

@ -0,0 +1,18 @@
# Ports collection makefile for: smtpclient
# Date created: 24 Aug 2001
# Whom: Kris Kennaway <kris@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= smtpclient
PORTVERSION= 1.0.0
CATEGORIES= mail
MASTER_SITES= http://www.engelschall.com/sw/smtpclient/distrib/
MAINTAINER= ports@FreeBSD.org
GNU_CONFIGURE= yes
MAN1= smtpclient.1
.include <bsd.port.mk>

11
mail/smtpclient/Makefile~ Normal file
View file

@ -0,0 +1,11 @@
PORTNAME= smtpclient
PORTVERSION= 1.0.0
CATEGORIES= mail
MASTER_SITES= http://www.engelschall.com/sw/smtpclient/distrib/
MAINTAINER= ports@FreeBSD.org
GNU_CONFIGURE= yes
MAN1= smtpclient.1
.include <bsd.port.mk>

1
mail/smtpclient/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (smtpclient-1.0.0.tar.gz) = 8b5d9260572107bb901edf6aacbf3747

View file

@ -0,0 +1,11 @@
--- 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,31 @@
--- 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 @@
Simple SMTP client

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: http://www.engelschall.com/sw/smtpclient/

View file

@ -0,0 +1 @@
bin/smtpclient