DanRaposo
asked on
Can I resend emails to original recipient that were returned to sender for policy reasons (using Sendmail)?
I have a sendmail server that sent emails to another server (not sendmail) in our infrastructure. The emails were rejected for policy reasons and therefore returned to original sender not put in the queue for retry.
The sender is a service and not an actual user so they are sitting in an unused mail file.
Is there a command to resend all these messages that are in the users mailfile /var/spool/mail/usersfile to the originally intended recipients?
Thanks
The sender is a service and not an actual user so they are sitting in an unused mail file.
Is there a command to resend all these messages that are in the users mailfile /var/spool/mail/usersfile to the originally intended recipients?
Thanks
ASKER
This seems to parse out the messages but does not parse out the intended recipient in the For line.
So all messages are being sent to one recipient. As far as I can tell ... but I need it to determine who that proper recipient is.
Example from file is below ... I want it to send the email to tdoe
Return-Path: <asterisk@phone.mydomain.c om>
Received: from phone.ritesolutions.com (phone.mydomain.com [127.0.0.1])
by phone.mydomain.com (8.13.8/8.13.8) with ESMTP id p2IHCjlg009120
for <tdoe@mydomain.com>; Fri, 18 Mar 2011 13:12:45 -0400
Received: (from asterisk@localhost)
by phone.mydomain.com (8.13.8/8.13.8/Submit) id p2IHCjal009119;
Fri, 18 Mar 2011 13:12:45 -0400
Date: Fri, 18 Mar 2011 13:12:45 -0400
From: "Rite Voicemail System" <vm@asterisk>
To: "Tom Doe" <tdoe@mydomain.com>
Subject: New message 1 in mailbox 195
Message-ID: <Asterisk-1-2060776519-195 -3454@phon e.mydomain .com>
X-Asterisk-CallerID: 918604332358
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----voicemail_11 9534543159 58324"
So all messages are being sent to one recipient. As far as I can tell ... but I need it to determine who that proper recipient is.
Example from file is below ... I want it to send the email to tdoe
Return-Path: <asterisk@phone.mydomain.c
Received: from phone.ritesolutions.com (phone.mydomain.com [127.0.0.1])
by phone.mydomain.com (8.13.8/8.13.8) with ESMTP id p2IHCjlg009120
for <tdoe@mydomain.com>; Fri, 18 Mar 2011 13:12:45 -0400
Received: (from asterisk@localhost)
by phone.mydomain.com (8.13.8/8.13.8/Submit) id p2IHCjal009119;
Fri, 18 Mar 2011 13:12:45 -0400
Date: Fri, 18 Mar 2011 13:12:45 -0400
From: "Rite Voicemail System" <vm@asterisk>
To: "Tom Doe" <tdoe@mydomain.com>
Subject: New message 1 in mailbox 195
Message-ID: <Asterisk-1-2060776519-195
X-Asterisk-CallerID: 918604332358
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----voicemail_11
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No other answer was able to help me.
please check the one referenced here
http://www.jules.fm/Logbook/files/resend_mbox.html