artfulrobot
artfulrobot

Reputation: 21397

How to (re)send email from a file using mutt or mail?

I have set up exim4 to deliver a copy of all outgoing mails to a local maildir in case something goes wrong. Now something's gone wrong and I need to resend some of the mail from the local maildir.

The emails have their full headers (inc. Return-Path, To, From, Subject etc.) and body (MIME).

Is there a way to do this:

$ somemailcommand <theemail

and have it make a new attempt to deliver it?

I've tried mutt -H theemail which looked promising (although it starts an interactive UI) but the emails came through blank.

I've tried mail [email protected] <theemail but that just sent the headers in the body. I'm on Debian Linux.

Upvotes: 1

Views: 1066

Answers (2)

Bartek Chanda
Bartek Chanda

Reputation: 1

sendmail -t < messagefile

This command extract To: from email file, and send mail to it.

Upvotes: 0

Jakub Jindra
Jakub Jindra

Reputation: 591

You can use bounce function (default bound to b key) to resend message and keep original headers.

To do so:

  • a) bounce single message
    • just press b
  • b) bounce multiple messages

  • then ;b then You'll be asked to fill e-mail address Bounce tagged messages to:

Upvotes: 2

Related Questions