> On Nov 29, 2016, at 8:18 PM, troy_post...@piggo.com wrote: > > But for mail already sitting on the server here, what's the best way to > forward (re-queue?) all of that to her user@isp_domain.com? There are > thousands of emails.
Given that you know the envelope recipient, you need to re-inject this back into the mailstream for delivery via the sendmail(1) command, and carefully specify the new envelope recipient on the command-line, making sure to not revive any other (header) recipients. Use the user's old address as the envelope sender in order to avoid SPF issues. So the minimum command to forward a single message file is: /usr/sbin/sendmail -f "user@here" -i -- "user@there" < msgfile However, depending on what headers your email system prepends, it may be prudent to strip any locally added "Delivered-To:", "X-Original-To:" and similar headers. Don't send everything at once. Send a couple of test messages and check with the user that they are arriving intact. Even then send the mail slowly, don't flood the users mailbox, the downstream MTA may object to excessive arrival rates for a single user. That said, the best approach is to give the user temporary IMAP access, so that the user can download any missed email, and not forward it all. Or provide access to a tarball with all the messages, ... Forwarding can run into obstacles with DMARC, anti-spam controls, ... -- Viktor.