Reputation: 38043
I'm writing a subscription list program that sends emails to a large list of addresses. I've managed to set up the outgoing messages with a custom "Reply-To" field like so:
mail.ReplyToList.Add("[email protected]");
And that works fine. But what I also want to handle is when people set up vacation messages or other auto-responders. Right now those reponses are going to the "reply-to" address. I want to set up a different address for autoresponders, say "[email protected]". I know this is possible, because the discussion list providers like Yahoo Groups manage to intercept those pretty well. But how?
EDIT: here is a (redacted) sample of the Yahoo mail headers. This email comes from the Yahoo server, is sent to [email protected], and replies go to [email protected]... but auto-response/out-of-office messages do not go to [email protected]; my guess is they go to that "Return-path" address (sentto-74624151-351-1308558348-recipient=domain.com@returns.groups.yahoo.com) near the top of the header. But how do you add that line to the SMTP header when sending a mail?
Delivered-To: [email protected]
Received: by 10.52.161.7 with SMTP id xo7cs8544vdb;
Mon, 20 Jun 2011 01:25:51 -0700 (PDT)
Received: by 10.236.184.134 with SMTP id s6mr5686752yhm.271.1308558351152;
Mon, 20 Jun 2011 01:25:51 -0700 (PDT)
Return-Path: <sentto-74624151-351-1308558348-recipient=domain.com@returns.groups.yahoo.com>
Received: from n40a.bullet.mail.sp1.yahoo.com (n40a.bullet.mail.sp1.yahoo.com [66.163.168.134])
by mx.google.com with SMTP id bd10si13985607icb.130.2011.06.20.01.25.49;
Mon, 20 Jun 2011 01:25:50 -0700 (PDT)
Received-SPF: pass (google.com: manual fallback record for domain of sentto-74624151-351-1308558348-recipient=domain.com@returns.groups.yahoo.com designates 66.163.168.134 as permitted sender) client-ip=66.163.168.134;
Authentication-Results: mx.google.com; spf=pass (google.com: manual fallback record for domain of sentto-74624151-351-1308558348-recipient=domain.com@returns.groups.yahoo.com designates 66.163.168.134 as permitted sender) smtp.mail=sentto-74624151-351-1308558348-recipient=domain.com@returns.groups.yahoo.com; dkim=pass [email protected]
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoogroups.com; s=lima; t=1308558349; bh=TWS7oJzaM8D+kqiNOGoc7ZTZZzJdtRBkRQUFvR4cPoc=; h=Received:Received:X-Yahoo-Newman-Id:Received:Received:Received:DKIM-Signature:Received:Received:Received:X-Sender:X-Apparently-To:X-Received:X-Received:X-Received:X-Received:Message-Id:To:X-Greylist:X-Originating-IP:From:X-eGroups-Approved-By:Sender:MIME-Version:Mailing-List:Delivered-To:List-Id:Precedence:List-Unsubscribe:Date:Subject:X-Yahoo-Newman-Property:Content-Type; b=GjEw2xlAEtRGKcvQgr/KBi86murpN1CfuR3ZQn3hGVnZuNPkbME1cshBe6d/nAnDZvIaynA5uIY+COQ65K6va21b/EP3CZV3HxqBXL68z+NqLeQ2wZekRxxHmqr3QtKw
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lima; d=yahoogroups.com;
b=DuQiSLNxiatDQUGAPVdsPchkteO8MLqgI77xHN/YVtZjwF2CuHpEI2jOaqIfrYRuNHyoLdB1tdux09ne3g3kOgxuUJzKDuVTveJX1thZAh85zm+nY4Yfi9Jk2XTvxKCM;
Received: from [69.147.65.150] by n40.bullet.mail.sp1.yahoo.com with NNFMP; 20 Jun 2011 08:25:49 -0000
Received: from [66.196.94.60] by t7.bullet.mail.sp1.yahoo.com with NNFMP; 20 Jun 2011 08:25:49 -0000
X-Yahoo-Newman-Id: 74624151-m351
Received: (qmail 4862 invoked from network); 20 Jun 2011 08:25:43 -0000
Received: from unknown (66.196.94.106)
by m10.grp.re1.yahoo.com with QMQP; 20 Jun 2011 08:25:43 -0000
Received: from unknown (HELO ng5-ip2.bullet.mail.bf1.yahoo.com) (98.139.165.28)
by mta2.grp.re1.yahoo.com with SMTP; 20 Jun 2011 08:25:43 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoogroups.com; s=lima; t=1308558343; bh=LLk0YVSQWNR1bJTbWtNZJr/n97ny4ZS2B4qKl82nrPg=; h=Received:Received:Received:X-Sender:X-Apparently-To:X-Received:X-Received:X-Received:X-Received:Message-Id:MIME-Version:To:Date:Content-Type:X-Greylist:X-Originating-IP:From:Subject:X-Yahoo-Group-Post:X-YGroups-SubInfo:Sender:X-Yahoo-Newman-Property:X-eGroups-Approved-By:X-eGroups-Auth; b=m0Z2uG7aoojJE9tTdpY/zABz5r0QhXhwFAIghnFAqMqHqeC7QRUqV18xpxsJ0S/W1ZB3/+5vjPaTsWLWNoUTtmzYiq8LIyikU7nMnu94f6xtGoC3BkJjDuwxJNlx+pyk
Received: from [98.139.164.124] by ng5.bullet.mail.bf1.yahoo.com with NNFMP; 20 Jun 2011 08:25:43 -0000
Received: from [69.147.65.150] by tg5.bullet.mail.bf1.yahoo.com with NNFMP; 20 Jun 2011 08:25:43 -0000
Received: from [98.137.34.155] by t7.bullet.mail.sp1.yahoo.com with NNFMP; 20 Jun 2011 08:25:43 -0000
X-Sender: [email protected]
X-Apparently-To: [email protected]
X-Received: (qmail 91008 invoked from network); 20 Jun 2011 08:19:21 -0000
X-Received: from unknown (66.196.94.106)
by m17.grp.re1.yahoo.com with QMQP; 20 Jun 2011 08:19:21 -0000
X-Received: from unknown (HELO server.somedomain.com) (1.2.3.4)
by mta2.grp.re1.yahoo.com with SMTP; 20 Jun 2011 08:19:21 -0000
X-Received: from anotherserver (4.3.2.1)
(authenticated bits=0)
by server.somedomain.com (1.2.3.4) with ESMTP id p5K8JKjq020377
for <[email protected]>; Mon, 20 Jun 2011 03:19:21 -0500
Message-Id: <[email protected]>
To: [email protected]
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (someserver.somedomain.com [6.5.4.3]); Mon, 20 Jun 2011 03:19:21 -0500 (CDT)
X-Originating-IP: 8.7.6.5
From: "Mr Sender" <[email protected]>
Sender: [email protected]
MIME-Version: 1.0
Mailing-List: list [email protected]; contact [email protected]
Delivered-To: mailing list [email protected]
List-Id: <listname.yahoogroups.com>
Precedence: bulk
List-Unsubscribe: <[email protected]>
Date: 20 Jun 2011 11:19:23 +0300
Subject: [Listname] test
Upvotes: 1
Views: 966
Reputation: 17868
Usually this is done by processing the mails on return - eg, Outlook rules, or whatever, SMTP doesnt differentiate between auto responders, and proper emails.
Upvotes: 3
Reputation: 1015
Sorry, friend. I don't think SMTP supports this type of request. Yahoo most likely implements this in their email server through filters, as noted in the comments.
Upvotes: 0