how to transparently resend email?

how to transparently resend email?

am 01.11.2007 15:48:07 von didds

Sendmail 8.12.10+Sun/8.12.10
solaris 9

got a bit of a wierd request so bear with me please :-)

we run a sendmail server running the versions of software above.
some users have .forwards to 3rd party email accounts ie email comes
in, then gets forwarded out to blackberries and home accounts etc.
a user has "lost" some emails on said 3rd party accounts and would
like them resent. (user doesn;t really very often vsisit office to
handle email directly "in-house").

we can esilt find/grab/isolate the emails from the last three days
(say) but just using "tail" on user's /var/mail/ - no big
deal. We can also reasoinably esily seperate all the individual
emails similarly.

However.... how can we resend/forward said emails such that they
arrive at blackberry/home/etc as if originally snet? Colleague
suggested that all we need do is cat the tailed emails onto the /var/
mail/ - but that wouldn;t invoke the .forwards ....
colleague also suggested catting the tailed emails onto HIS /var/mail
file which would "introduce" them to his inbox from which he could
then forward to the user's account (from which they can then
be .forwarded)... but of course that would mean they arrived with HIS
name on them not the originators (which would be a problem as it turns
out).

So - is there a way we can "reintroduce" emails such that they get
sent as per .forward and arrive as if they had been sent by the
otiginator/

cheers (and thatnks for your patience)

ian

Re: how to transparently resend email?

am 01.11.2007 18:59:20 von gtaylor

On 11/01/07 09:48, didds wrote:
> So - is there a way we can "reintroduce" emails such that they get
> sent as per .forward and arrive as if they had been sent by the
> otiginator

Unless I'm completely missing the mark, you should be able to separate
out the individual message(s) that needs to be ""re-introduced and send
them via Sendmail.

I'm not sure what the command line is from memory, but it should be
something along the lines 'sendmail rcpt@domain.tld'. In fact I just
issued the following command form my inbox in my Maildir (messages are
individual files so I did not have to separate the message):

cat messagefile | sendmail rcpt@domain.tld

The message arrived in my inbox with out a problem. The only difference
between the original message and the one that was ""re-introduced was an
extra set of Received: headers.



Grant. . . .

Re: how to transparently resend email?

am 01.11.2007 19:00:58 von gtaylor

On 11/01/07 12:59, Taylor, Grant wrote:
> (messages are individual files so I did not have to separate the
> message)

If you do need to separate the messages out from an mbox formated file,
formail is your friend.



Grant. . . .

Re: how to transparently resend email?

am 02.11.2007 11:26:06 von Georg Horn

didds wrote:

> we can esilt find/grab/isolate the emails from the last three days
> (say) but just using "tail" on user's /var/mail/ - no big
> deal. We can also reasoinably esily seperate all the individual
> emails similarly.
>
> However.... how can we resend/forward said emails such that they
> arrive at blackberry/home/etc as if originally snet?

Use "mutt -f /var/mail/", then tag the messages you want to
resend using the "t" key, and then send the tagged messages by
pressing ";b" and entering the address.

Bye,
Georg