re-sending email from a mailbox during server migration

Posted on 2004-11-26
Last Modified: 2013-12-15
I'm moving mailservers, and for a particular user, I'd like to resend the email from his mailbox to the new server.  I remember that there is a command to do this, but for the life of me, I'm drawing a blank... perhaps it was formail?
Question by:periwinkle
    LVL 38

    Accepted Solution


    $ formail -s /usr/sbin/sendmail -v -t -oiee < (path to his mailbox)

    LVL 15

    Author Comment

    Thanks Wesly -

    I had finally found it in my notes as:

    formail -f -s sendmail user@address < /var/spool/mail/user-mailbox

    the -f according the man pages means to "Force formail to simply pass along any non-mailbox format (i.e., don't  generate  a  `From  ' line as the first line)."

    Thanks  - you get the points, and this goes into my bookmarks!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now