From 343f9984ce85c3fcf1b92b78fc694a20ba0f1db7 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 29 Jun 2005 21:18:03 +0000 Subject: Cesar Eduardo Barros's fix to avoid double @ when username has @ and envelope sender is null. Debian bug #272289. svn path=/trunk/; revision=4061 --- sink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sink.c') diff --git a/sink.c b/sink.c index 431a7e64..68a1739b 100644 --- a/sink.c +++ b/sink.c @@ -877,7 +877,11 @@ static int open_smtp_sink(struct query *ctl, struct msgblk *msg, */ if (!msg->return_path[0] || (msg->return_path[0] == '@')) { - if (is_dottedquad(ctl->server.truename)) + if (strchr(ctl->remotename,'@') || strchr(ctl->remotename,'!')) + { + snprintf(addr, sizeof(addr), "%s", ctl->remotename); + } + else if (is_dottedquad(ctl->server.truename)) { snprintf(addr, sizeof(addr), "%s@[%s]", ctl->remotename, ctl->server.truename); -- cgit v1.2.3