Foward local mbx file to new email address over smtp, how?

Foward local mbx file to new email address over smtp, how?

am 20.06.2005 08:57:52 von fernando.cassia

Hi,

What's the easiest way to forward a all the messages in a local mailbox
file (unix mbx format) over smtp to a destination mailbox?

In other words, I'd like being able to do:

mbx2smtp /path/here/mailbox --destination:blah@mydomain.com
--server:smtp.myisp.com

Is there such an utility? The idea would be to move all local mail to a
remote mailbox which can then be accessed over imap4. The emails would
ideally be forwarded with the original subject line, sender and date.

Is there any such utility?. Linux, unix, windows, I don't care.

I've tried with the python-written 'mailgate' but it seems to me that
there is no way to specify a different destination address other than
the one originally specified in each email. (I could be wrong).

Ideas? Thoughts? Expletives?
Thanks :)
FC

Re: Foward local mbx file to new email address over smtp, how?

am 20.06.2005 09:18:40 von Alan Connor

On comp.mail.misc, in
<1119250672.218554.203440@f14g2000cwb.googlegroups.com>,
"fernando.cassia@gmail.com" wrote:

> Hi,
>
> What's the easiest way to forward a all the messages in a local
> mailbox file (unix mbx format) over smtp to a destination
> mailbox?
>
> In other words, I'd like being able to do:
>
> mbx2smtp /path/here/mailbox --destination:blah@mydomain.com
> --server:smtp.myisp.com
>
> Is there such an utility? The idea would be to move all local
> mail to a remote mailbox which can then be accessed over
> imap4. The emails would ideally be forwarded with the original
> subject line, sender and date.
>
> Is there any such utility?. Linux, unix, windows, I don't care.
>
> I've tried with the python-written 'mailgate' but it seems to
> me that there is no way to specify a different destination
> address other than the one originally specified in each
> email. (I could be wrong).
>
> Ideas? Thoughts? Expletives? Thanks :) FC
>

The easiest way I know of would be to use procmail and formail:

cat mbox | formail -s procmail ~/procmail2rc

~/procmail2rc:

#-------------
SHELL=/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin

:0
! joe@foo.com
#---------

The above asssumes that your SENDMAIL environment variable is
set and exported, which is more than likely.

Formail splits the mbox into seperate mails and sends them
one-at-a-time to procmail, which forwards them to the address
after the "!".

AC

--
Please visit my home page:
http://angel.1jh.com./nanae/kooks/alanconnor.html
alanconnor AT earthlink DOT net http://tinyurl.com/2t5kp
~

Re: Foward local mbx file to new email address over smtp, how?

am 20.06.2005 09:50:22 von fernando.cassia

Thanks so much!. It's certainly worth a try.

FC