On Sat, 18 Jun 2011, Damian Kohlfeld wrote:
Use the following fetchmail configuration as a template. Replace all USERNAME with your unix user account name, all PASSWORD with the password for that IMAP account, all IMAPUSER with the IMAP username, all MAILHOST with the IMAP serverhostname and finally all MBOXPATH your mbox (absolute) filenames.
Thanks, but see below.
--- BEGIN CONFIG ---
set postmaster "USERNAME" set bouncemail set no spambounce set softbounce set properties "" set no showdots
poll MAILHOST with proto IMAP user 'IMAPUSER' there with password 'PASSWORD' is 'USERNAME' here options keep fetchall ssl mda "formail -c >> /MBOXPATH/inbox" folder INBOX
poll MAILHOST with proto IMAP user 'IMAPUSER' there with password 'PASSWORD' is 'USERNAME' here options keep fetchall ssl mda "formail -c >> /MBOXPATH/sent" folder INBOX.Sent
--- END CONFIG ---
I couldn't get it to work with exchange. I'm told Microsoft is holding up IMAP requests. I did get it to work with cableone. The relevant account is a thin wrapper on gmail. I have the mail I want, sort of. I had to hit forward rather a lot. So all my messages are wrapped in forwarding boilerplate. Is there a convenient way I can unwrap them?
-- Michael hennebry@web.cs.ndsu.NoDak.edu "Pessimist: The glass is half empty. Optimist: The glass is half full. Engineer: The glass is twice as big as it needs to be."
On Mon, 2011-07-18 at 15:28 -0500, Michael Hennebry wrote:
I couldn't get it to work with exchange. I'm told Microsoft is holding up IMAP requests. I did get it to work with cableone. The relevant account is a thin wrapper on gmail. I have the mail I want, sort of. I had to hit forward rather a lot. So all my messages are wrapped in forwarding boilerplate. Is there a convenient way I can unwrap them?
There's a form of forwarding usually denoted "redirect". If you can set the forwarding type in the forwarding account to redirect, the received message will look like the original (I think). I'm pretty sure Exchange is capable of this.
-- Michael hennebry@web.cs.ndsu.NoDak.edu "Pessimist: The glass is half empty. Optimist: The glass is half full. Engineer: The glass is twice as big as it needs to be."
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/18/2011 08:30 PM, Matthew Saltzman wrote:
On Mon, 2011-07-18 at 15:28 -0500, Michael Hennebry wrote:
I couldn't get it to work with exchange. I'm told Microsoft is holding up IMAP requests. I did get it to work with cableone. The relevant account is a thin wrapper on gmail. I have the mail I want, sort of. I had to hit forward rather a lot. So all my messages are wrapped in forwarding boilerplate. Is there a convenient way I can unwrap them?
There's a form of forwarding usually denoted "redirect". If you can set the forwarding type in the forwarding account to redirect, the received message will look like the original (I think). I'm pretty sure Exchange is capable of this.
You could try using fetchmail to get the messages. I believe Gmail supports POP3. I know it supports IMAP.
For the mail you have, you could probably use sed to remove the forwarding "boiler plate". Exactly how you will want to do it depends on if the messages are in one big file, or separate files.
Mikkel - --
Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
On Mon, 18 Jul 2011, Mikkel L. Ellertson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/18/2011 08:30 PM, Matthew Saltzman wrote:
On Mon, 2011-07-18 at 15:28 -0500, Michael Hennebry wrote:
I couldn't get it to work with exchange. I'm told Microsoft is holding up IMAP requests. I did get it to work with cableone. The relevant account is a thin wrapper on gmail. I have the mail I want, sort of. I had to hit forward rather a lot. So all my messages are wrapped in forwarding boilerplate. Is there a convenient way I can unwrap them?
There's a form of forwarding usually denoted "redirect". If you can set the forwarding type in the forwarding account to redirect, the received message will look like the original (I think). I'm pretty sure Exchange is capable of this.
You could try using fetchmail to get the messages. I believe Gmail supports POP3. I know it supports IMAP.
I forwarded the 300+ messages to a gmail account one at a time. I got them on my hard drive using fetchmail.
For the mail you have, you could probably use sed to remove the forwarding "boiler plate". Exactly how you will want to do it depends on if the messages are in one big file, or separate files.
For a one-off, I think I'd use python before sed for something especially complicated.
The problem is I don't understand the syntax well enough to know what to do. When I vim the mbox, I often see what appeared to me to be random bits of base-64.
Now I think I have a clue. Content-Transfer-Encoding: base64 means that the entire forwarded message text is in base-64 If I remove that line and decode the following base-64, I should at least get a better look at what else I need to undo.
I was rather hoping that I was not the first person that wanted to do this and that there was a canned solution somewhere.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/19/2011 11:33 AM, Michael Hennebry wrote:
On Mon, 18 Jul 2011, Mikkel L. Ellertson wrote:
For the mail you have, you could probably use sed to remove the forwarding "boiler plate". Exactly how you will want to do it depends on if the messages are in one big file, or separate files.
For a one-off, I think I'd use python before sed for something especially complicated.
I guess I did not see it as complicated. But this was before you said the message was base 64 encoded. But I would use a sed script file, not the command line.
Remove the forwarding header by matching the start/finish as an address range. Delete that range.
For me, it would be:
/Delivered-To:/,/-------- Original Message --------/d
You may need s@^> @@ if you get "> " added when forwarding messages.
Mikkel - --
Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
On Wed, 20 Jul 2011, Mikkel L. Ellertson wrote:
I guess I did not see it as complicated. But this was before you said the message was base 64 encoded. But I would use a sed script file, not the command line.
Remove the forwarding header by matching the start/finish as an address range. Delete that range.
For me, it would be:
/Delivered-To:/,/-------- Original Message --------/d
You may need s@^> @@ if you get "> " added when forwarding messages.
Mostly, I don't have an -------- Original Message -------- marker. For example:
B From Michael.Hennebry@ndsu.edu Sat Jul 16 13:55:33 2011 Delivered-To: hennebry2@cableone.net Received: from gmail-imap.l.google.com [74.125.159.109] by localhost.localdomain with IMAP (fetchmail-6.3.20) for hennebry@localhost (single-drop); Sat, 16 Jul 2011 13:55:33 -0500 (CDT) Received: by 10.231.11.135 with SMTP id t7cs87786ibt; Tue, 28 Jun 2011 07:38:48 -0700 (PDT) ... (tremendous number of rather long headers) Received: from VA3DIAXVS711.RED001.local ([10.8.234.244]) by VA3DIAHUB012.RED001.local ([10.32.17.80]) with mapi; Tue, 28 Jun 2011 07:38:37 -0700 From: "Hennebry, Michael" Michael.Hennebry@ndsu.edu To: "hennebry2@cableone.net" hennebry2@cableone.net Date: Tue, 28 Jun 2011 07:38:25 -0700 Subject: FW: Friday Thread-Topic: Friday Thread-Index: AQHMNaEJk7UiZNUdTkGrLcWWR+R62Q== Message-ID: 1B4F43608EA4A74A8C291C5EA586692519A68385B5@VA3DIAXVS711.RED001.local References: DA1SHMA010adf52d97c403470eba87e4bdd4abeff1@da1shma010 In-Reply-To: DA1SHMA010adf52d97c403470eba87e4bdd4abeff1@da1shma010 Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Return-Path: Michael.Hennebry@ndsu.edu X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from Michael.Hennebry@ndsu.edu [db-null]
DQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQpGcm9tOiBhWmVzdHlJ dGFsaWFuQHRhbGttYXRjaC5jb20gW2FaZXN0eUl0YWxpYW5AdGFsa21hdGNoLmNvbV0NClNlbnQ6 IEZyaWRheSwgRGVjZW1iZXIgMTIsIDIwMDggODoxMiBQTQ0KVG86IEhlbm5lYnJ5LCBNaWNoYWVs DQpTdWJqZWN0OiBGcmlkYXkNCg0KSGkgTWljaGFlbCwNCkkgZGlkbid0IHJlbWVtYmVyLCBzbyBJ IGdvb2dsZWQuDQpOb3cgSSB2YWd1ZWx5IHJlbWVtYmVyLg0KQnVzeSBCVVNZIHdlZWshDQpSZW5l ZQ0KDQoNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQoNCg0KUmVuZWUsDQpZb3Ug d3JvdGU6DQo+IEkgbmVlZCB0byBwb3N0cG9uZSBmb3Igbm93LS10b28gbXVjaCBnb2luZyBvbiB0 aGlzIHdlZWsvd2Vla2VuZC4NCg0KVFdUV1RXIGJvcmluZy4NCg0KRG8geW91IHJlbWVtYmVyIFRX VFdUVz8NCg0KTWljaGFlbCBIZW5uZWJyeQ0KDQoNCg0KDQo=
From Michael.Hennebry@ndsu.edu Sat Jul 16 13:55:34 2011
The ". "s are mine.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/20/2011 11:45 AM, Michael Hennebry wrote:
On Wed, 20 Jul 2011, Mikkel L. Ellertson wrote:
I guess I did not see it as complicated. But this was before you said the message was base 64 encoded. But I would use a sed script file, not the command line.
Remove the forwarding header by matching the start/finish as an address range. Delete that range.
For me, it would be:
/Delivered-To:/,/-------- Original Message --------/d
You may need s@^> @@ if you get "> " added when forwarding messages.
Mostly, I don't have an -------- Original Message -------- marker. For example:
B From Michael.Hennebry@ndsu.edu Sat Jul 16 13:55:33 2011 Delivered-To: hennebry2@cableone.net Received: from gmail-imap.l.google.com [74.125.159.109] by localhost.localdomain with IMAP (fetchmail-6.3.20) for hennebry@localhost (single-drop); Sat, 16 Jul 2011 13:55:33 -0500 (CDT) Received: by 10.231.11.135 with SMTP id t7cs87786ibt; Tue, 28 Jun 2011 07:38:48 -0700 (PDT) ... (tremendous number of rather long headers) Received: from VA3DIAXVS711.RED001.local ([10.8.234.244]) by VA3DIAHUB012.RED001.local ([10.32.17.80]) with mapi; Tue, 28 Jun 2011 07:38:37 -0700 From: "Hennebry, Michael" Michael.Hennebry@ndsu.edu To: "hennebry2@cableone.net" hennebry2@cableone.net Date: Tue, 28 Jun 2011 07:38:25 -0700 Subject: FW: Friday Thread-Topic: Friday Thread-Index: AQHMNaEJk7UiZNUdTkGrLcWWR+R62Q== Message-ID: 1B4F43608EA4A74A8C291C5EA586692519A68385B5@VA3DIAXVS711.RED001.local References: DA1SHMA010adf52d97c403470eba87e4bdd4abeff1@da1shma010 In-Reply-To: DA1SHMA010adf52d97c403470eba87e4bdd4abeff1@da1shma010 Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Return-Path: Michael.Hennebry@ndsu.edu X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from Michael.Hennebry@ndsu.edu [db-null]
DQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQpGcm9tOiBhWmVzdHlJ dGFsaWFuQHRhbGttYXRjaC5jb20gW2FaZXN0eUl0YWxpYW5AdGFsa21hdGNoLmNvbV0NClNlbnQ6 IEZyaWRheSwgRGVjZW1iZXIgMTIsIDIwMDggODoxMiBQTQ0KVG86IEhlbm5lYnJ5LCBNaWNoYWVs DQpTdWJqZWN0OiBGcmlkYXkNCg0KSGkgTWljaGFlbCwNCkkgZGlkbid0IHJlbWVtYmVyLCBzbyBJ IGdvb2dsZWQuDQpOb3cgSSB2YWd1ZWx5IHJlbWVtYmVyLg0KQnVzeSBCVVNZIHdlZWshDQpSZW5l ZQ0KDQoNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQoNCg0KUmVuZWUsDQpZb3Ug d3JvdGU6DQo+IEkgbmVlZCB0byBwb3N0cG9uZSBmb3Igbm93LS10b28gbXVjaCBnb2luZyBvbiB0 aGlzIHdlZWsvd2Vla2VuZC4NCg0KVFdUV1RXIGJvcmluZy4NCg0KRG8geW91IHJlbWVtYmVyIFRX VFdUVz8NCg0KTWljaGFlbCBIZW5uZWJyeQ0KDQoNCg0KDQo=
From Michael.Hennebry@ndsu.edu Sat Jul 16 13:55:34 2011
The ". "s are mine.
You could use:
Received: from VA3DIAXVS711.RED001.local ([10.8.234.244]) by VA3DIAHUB012.RED001.local ([10.32.17.80])
or just part of that line that would not match other headers. But if the mail is in one big file, then it would probably delete parts you do not want it to. IE any messages from VA3DIAXVS711.RED001.local
Mikkel - --
Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
On Wed, 20 Jul 2011, Mikkel L. Ellertson wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/20/2011 11:45 AM, Michael Hennebry wrote:
On Wed, 20 Jul 2011, Mikkel L. Ellertson wrote:
I guess I did not see it as complicated. But this was before you said the message was base 64 encoded. But I would use a sed script file, not the command line.
Remove the forwarding header by matching the start/finish as an address range. Delete that range.
For me, it would be:
/Delivered-To:/,/-------- Original Message --------/d
I think that were it not for base-64, this would wipe out all the headers exept the first. It also wouldn't leave a blank line to bound the body.
Can I get rid of the base-64 by decoding it and removing Content-Transfer-Encoding: base64 ?
You may need s@^> @@ if you get "> " added when forwarding messages.
Mostly, I don't have an -------- Original Message -------- marker. For example:
B From Michael.Hennebry@ndsu.edu Sat Jul 16 13:55:33 2011 Delivered-To: hennebry2@cableone.net Received: from gmail-imap.l.google.com [74.125.159.109] by localhost.localdomain with IMAP (fetchmail-6.3.20) for hennebry@localhost (single-drop); Sat, 16 Jul 2011 13:55:33 -0500 (CDT) Received: by 10.231.11.135 with SMTP id t7cs87786ibt; Tue, 28 Jun 2011 07:38:48 -0700 (PDT) ... (tremendous number of rather long headers) Received: from VA3DIAXVS711.RED001.local ([10.8.234.244]) by VA3DIAHUB012.RED001.local ([10.32.17.80]) with mapi; Tue, 28 Jun 2011 07:38:37 -0700 From: "Hennebry, Michael" Michael.Hennebry@ndsu.edu To: "hennebry2@cableone.net" hennebry2@cableone.net Date: Tue, 28 Jun 2011 07:38:25 -0700 Subject: FW: Friday Thread-Topic: Friday Thread-Index: AQHMNaEJk7UiZNUdTkGrLcWWR+R62Q== Message-ID: 1B4F43608EA4A74A8C291C5EA586692519A68385B5@VA3DIAXVS711.RED001.local References: DA1SHMA010adf52d97c403470eba87e4bdd4abeff1@da1shma010 In-Reply-To: DA1SHMA010adf52d97c403470eba87e4bdd4abeff1@da1shma010 Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Return-Path: Michael.Hennebry@ndsu.edu X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from Michael.Hennebry@ndsu.edu [db-null]
DQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQpGcm9tOiBhWmVzdHlJ dGFsaWFuQHRhbGttYXRjaC5jb20gW2FaZXN0eUl0YWxpYW5AdGFsa21hdGNoLmNvbV0NClNlbnQ6 IEZyaWRheSwgRGVjZW1iZXIgMTIsIDIwMDggODoxMiBQTQ0KVG86IEhlbm5lYnJ5LCBNaWNoYWVs DQpTdWJqZWN0OiBGcmlkYXkNCg0KSGkgTWljaGFlbCwNCkkgZGlkbid0IHJlbWVtYmVyLCBzbyBJ IGdvb2dsZWQuDQpOb3cgSSB2YWd1ZWx5IHJlbWVtYmVyLg0KQnVzeSBCVVNZIHdlZWshDQpSZW5l ZQ0KDQoNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQoNCg0KUmVuZWUsDQpZb3Ug d3JvdGU6DQo+IEkgbmVlZCB0byBwb3N0cG9uZSBmb3Igbm93LS10b28gbXVjaCBnb2luZyBvbiB0 aGlzIHdlZWsvd2Vla2VuZC4NCg0KVFdUV1RXIGJvcmluZy4NCg0KRG8geW91IHJlbWVtYmVyIFRX VFdUVz8NCg0KTWljaGFlbCBIZW5uZWJyeQ0KDQoNCg0KDQo=
From Michael.Hennebry@ndsu.edu Sat Jul 16 13:55:34 2011
The ". "s are mine.
You could use:
Received: from VA3DIAXVS711.RED001.local ([10.8.234.244]) by VA3DIAHUB012.RED001.local ([10.32.17.80])
or just part of that line that would not match other headers. But if the mail is in one big file, then it would probably delete parts you do not want it to. IE any messages from VA3DIAXVS711.RED001.local
Mikkel
Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk4nD5IACgkQqbQrVW3JyMQMGwCgg3If8i8BAbmQzk4eGuQ3P7GC DakAoIGGgdeHlmuT6vNly5DALeSbrnJR =oXFG
-----END PGP SIGNATURE-----
users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 07/20/2011 11:45 AM, Michael Hennebry wrote:
On Wed, 20 Jul 2011, Mikkel L. Ellertson wrote:
I guess I did not see it as complicated. But this was before you said the message was base 64 encoded. But I would use a sed script file, not the command line.
Remove the forwarding header by matching the start/finish as an address range. Delete that range.
For me, it would be:
/Delivered-To:/,/-------- Original Message --------/d
You may need s@^> @@ if you get "> " added when forwarding messages.
Mostly, I don't have an -------- Original Message -------- marker. For example:
<------------------------[snip]----------------------->
I forgot to mention that if the mail is in one big file, it can be split using formail. It will also do some headers. You will have to check the docs to see how much of the work it will do for you. I have never used it to strip forwarding headers.
Mikkel - --
Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!