summaryrefslogtreecommitdiff
path: root/mail/mini_sendmail/files
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2008-12-04 13:00:34 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2008-12-04 13:00:34 +0000
commitb15471429f926625bc6c3e797646a1af72711ee2 (patch)
treecac272d304814357a29c0dd0bed8fcad9024f6c9 /mail/mini_sendmail/files
parent- Removed buggy patch-main.c (diff)
Allow to specify To: field in Full Name <email> format.
PR: 128540 Submitted by: Helmut Schneider <jumper99@gmx.de>
Diffstat (limited to 'mail/mini_sendmail/files')
-rw-r--r--mail/mini_sendmail/files/patch-mini_sendmail.c36
1 files changed, 36 insertions, 0 deletions
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 )
+
+