aboutsummaryrefslogtreecommitdiffstats
path: root/sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'sink.c')
-rw-r--r--sink.c6
1 files changed, 5 insertions, 1 deletions
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);