"Paul R. Morin" <prm(_at_)scinteract(_dot_)com> writes:
I have a user with mail in their /var/mail/[user] spool. I need to
requeue that mail file so all the messages are reprocessed and sent to a
new destination as specified by the virtusertable. Can this be done
with procmail, formail, etc?
Use formail to split the mailbox, feeding each message into sendmail:
formail -Y -n -s sendmail -odq user < /var/mail/user
Since you've already setup the virtusertable entry, no new mail should
be arriving in the mailbox, so you don't need to worry about locking it.
The "-odq" option to sendmail tells it to queue the message instead of
trying to send it out immeadiately. Once the above command finishes,
you can then 'run' the queue with something like:
sendmail -v -qRnew-address
where "new-address" is the address that 'user's mail is being redirected
towards. That should be able to send all the messages with one SMTP
connection to the remote host.
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail