Re: Procmail Decoding Mime Messages
Polytropon writes: > On Wed, 24 Apr 2013 16:07:35 -0500, Martin McCormick wrote: >> Is there a filter that one can run in procmail in which >> base64 encoded data go in and text comes out so one can allow >> procmailrc to do its work? >> [...] >> Is there anything which will take a raw email message >> and spit out linear strings which can be processed like normal >> text? > > I think this is possible with uudecode, in this case b64decode. > See "man uuencode" for more information. uuencode predates MIME. Although there are MIME types defined for it, the base-system tools don't handle the MIME headers or section marking. For this purpose, a MIME-aware tool (such as ripmime, or metamail, or mmencode) will be much more useful as part of an automated filtering system. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Procmail Decoding Mime Messages
On Wed, 24 Apr 2013, Martin McCormick wrote: Is there a filter that one can run in procmail in which base64 encoded data go in and text comes out so one can allow procmailrc to do its work? I use bogofilter to filter spam and it does a very good job after one builds a core of spammishness, but legitimate messages are often-times filled with base64 sections that look like garbage to the regular expressions that one puts in .procmailrc for sorting mail. When searching for information, I found something called mimencode which both encodes and decodes these attachments, but there is no FreeBSD port called mimencode so it occurred to me that some other application might exist which is in the ports that does basically the same thing. Is there anything which will take a raw email message and spit out linear strings which can be processed like normal text? mail/maildrop has a reformime program which may be useful. maildrop itself is like a better and easier to use procmail. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Procmail Decoding Mime Messages
Polytropon wrote: > On Wed, 24 Apr 2013 16:07:35 -0500, Martin McCormick wrote: > > Is there a filter that one can run in procmail in which > > base64 encoded data go in and text comes out so one can allow > > procmailrc to do its work? Good question, I havent tried that yet, (but should), but I have been demiming both to help majordomo on servers, & via procmail on local (to reduce bulk on my future archives of personal mail). 2 tools worth knowing in /usr/ports/mail/ : demime emil A few notes from my http://berklix.com/~jhs/src/bsd/fixes/freebsd/ports/jhs/mail/Makefile.local (where I've also more notes on eg much hated quoted-printable ) SUBDIR += emil # A candidate to be assesed for stripping quoted-printable from # majordomo on server, to help cluless people. # Something needed to replace demime as demime has been removed. # SUBDIR += mime4j # "It won't do any decoding of base64 or quoted-printable #encoded header fields and bodies." SUBDIR += demime # For majordomo on list servers, # For all the many lazy & incompetents who cant turn off sending # HTML to mail lists, despite having had a decade to learn. # (& for a few people who do understand they should, have tried to, but # can''t find where to turn off their HTML, if their ISP even allows. # Missing in FreeBSD-9.1-RELEASE so see also SUBDIR += mail/emil > > Is there anything which will take a raw email message > > and spit out linear strings which can be processed like normal > > text? See man emil ; man demime PS Trying to get procmail to work with a macro with a pipe defined after + $RCVSTOREUNSEEN, was a long pain & I failed so I use a longer version below which works, appended for syntax example. RCVSTORE=/usr/local/libexec/nmh/rcvstore RCVSTOREUNSEEN="$RCVSTORE -nounseen" # A 2nd copy, just text, stripped of MIME enclosures is # stored in $PRI_MAIL by $RCVSTOREUNSEEN # The 2nd copy is stored with $RCVSTORE -nounseen so I dont have to # click the archive copy from within exmh. NOMIME="/usr/local/bin/demime -8 -" # Demime is not in current after 9.1-RELEASE # To not demime instead use NOMIME=cat # NOMIME=cat # NOMIME=/usr/local/bin/emil # Emil converts a .jpg MIME to a uuencoded appended without MIME # I can not seem to achieve something like this: # XYZ="$NOMIME | $RCVSTOREUNSEEN" { :0 cw | $NOMIME | $RCVSTOREUNSEEN +$PRI_MAIL/my/archive :0 wc | $RCVSTORE +$INBOX_PLAIN } Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with "> ". Send plain text. No quoted-printable, HTML, base64, multipart/alternative. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Procmail Decoding Mime Messages
On Wed, 24 Apr 2013 16:07:35 -0500, Martin McCormick wrote: > Is there a filter that one can run in procmail in which > base64 encoded data go in and text comes out so one can allow > procmailrc to do its work? > [...] > Is there anything which will take a raw email message > and spit out linear strings which can be processed like normal > text? I think this is possible with uudecode, in this case b64decode. See "man uuencode" for more information. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Procmail Decoding Mime Messages
Forgot to cc the list. On 04/24/2013 04:47 PM, Ryan Frederick wrote: I believe mimencode is in ports as converters/mmencode. It is also included as part of mail/metamail. Ryan On 04/24/2013 04:07 PM, Martin McCormick wrote: Is there a filter that one can run in procmail in which base64 encoded data go in and text comes out so one can allow procmailrc to do its work? I use bogofilter to filter spam and it does a very good job after one builds a core of spammishness, but legitimate messages are often-times filled with base64 sections that look like garbage to the regular expressions that one puts in .procmailrc for sorting mail. When searching for information, I found something called mimencode which both encodes and decodes these attachments, but there is no FreeBSD port called mimencode so it occurred to me that some other application might exist which is in the ports that does basically the same thing. Is there anything which will take a raw email message and spit out linear strings which can be processed like normal text? Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"