aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordemon <demon@FreeBSD.org>2008-12-04 21:00:34 +0800
committerdemon <demon@FreeBSD.org>2008-12-04 21:00:34 +0800
commit72e401c6ef39dedb453d30be5aa44cf62d7bb292 (patch)
tree1e1809d17e1d733402e857aeb6f7e980690c4685
parent2492d9442d98d73adee987c899c58863a6c5fb43 (diff)
downloadfreebsd-ports-gnome-72e401c6ef39dedb453d30be5aa44cf62d7bb292.tar.gz
freebsd-ports-gnome-72e401c6ef39dedb453d30be5aa44cf62d7bb292.tar.zst
freebsd-ports-gnome-72e401c6ef39dedb453d30be5aa44cf62d7bb292.zip
Allow to specify To: field in Full Name <email> format.
PR: 128540 Submitted by: Helmut Schneider <jumper99@gmx.de>
-rw-r--r--mail/mini_sendmail/Makefile1
-rw-r--r--mail/mini_sendmail/files/patch-mini_sendmail.c36
2 files changed, 37 insertions, 0 deletions
diff --git a/mail/mini_sendmail/Makefile b/mail/mini_sendmail/Makefile
index c8e51098e7c8..d5c3d07762a4 100644
--- a/mail/mini_sendmail/Makefile
+++ b/mail/mini_sendmail/Makefile
@@ -7,6 +7,7 @@
PORTNAME= mini_sendmail
PORTVERSION= 1.3.6
+PORTREVISION= 1
CATEGORIES+= mail
MASTER_SITES= http://www.acme.com/software/mini_sendmail/
diff --git a/mail/mini_sendmail/files/patch-mini_sendmail.c b/mail/mini_sendmail/files/patch-mini_sendmail.c
new file mode 100644
index 000000000000..e436728b718b
--- /dev/null
+++ b/mail/mini_sendmail/files/patch-mini_sendmail.c
@@ -0,0 +1,36 @@
+--- mini_sendmail.c.orig 2005-06-29 19:37:15.000000000 +0200
++++ mini_sendmail.c 2008-11-02 17:09:53.000000000 +0100
+@@ -542,6 +542,7 @@
+ }
+
+ /* Strip off any angle brackets. */
++/*
+ while ( len > 0 && *recipient == '<' )
+ {
+ ++recipient;
+@@ -551,6 +552,23 @@
+ --len;
+
+ (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient );
++*/
++ if (len > 0 && recipient[len-1] == '>' )
++ {
++ /* "<name@domain>" or: "Full Name <name@domain>" */
++ while (len > 0 && *recipient != '<' )
++ {
++ ++recipient;
++ --len;
++ }
++ (void) snprintf( buf, sizeof(buf), "RCPT TO:%.*s", len, recipient );
++ }
++ else
++ {
++ /* name@domain */
++ (void) snprintf( buf, sizeof(buf), "RCPT TO:<%.*s>", len, recipient );
++ }
++
+ send_command( buf );
+ status = read_response();
+ if ( status != 250 && status != 251 )
+
+