[Remops] procmail help needed

Grant Taylor gtaylor at tnetconsulting.net
Fri Apr 3 23:23:38 BST 2020


On 4/2/20 12:50 PM, Stefan Claas wrote:
> Hi Grant,
> 
> I just did a little test with a remailer message outfile send from 
> mailchuck to my personal address, then saved the complete message 
> with all headers.
> 
> After that I used sed to extract the relevant parts and it worked 
> with:
> 
> sed -n '/^::$/,/^-----END REMAILER MESSAGE-----$/p' message.txt

That looks quite similar to the sed that I was thinking and wrote in my 
previous reply.

> So, how should I proceed, because I do not want to mess up Iria while
> it is curently running ...
> 
> Any ideas?

Assuming that this flow is through email*, you would want to create a 
procmail filter to match the specific messages you want to act on, and 
then call your sed script.  Depending on the complexity of things, you 
may want to move sed and / or it's script into separate file(s) to avoid 
nesting / expansion / escaping complication.

* See my previous reply, I'm ignoring the following comment for the moment.

On 4/2/20 3:14 PM, Stefan Claas wrote:
> SUCCESS!!! :-)

Cool!

I tip my hat to you for figuring things out.  :-)

> Date: Thu, 2 Apr 2020 21:11:43 +0000
> From: Stefan Claas <stefan at mailchuck.com>
> Subject: From Bitmessage via Mailchuck to Usenet
> Message-Id: <20200402.211143.2cb4de78 at remailer.xyz>
> Newsgroups: alt.test.test
> Path:
> eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.mixmin.net!mail2news.mixmin.net!not-for-mail
> Injection-Info: mail2news.mixmin.net; posting-host=mail2news.mixmin.net;
> mail-complaints-to=abuse at mixmin.net Xref: reader01.eternal-september.org
> alt.test.test:7058
> 
> The quick brown fox jumps over the lazy dog.
> 
> Regards
> Stefan

Hum.

This looks like it's a news posting, not an email.  That's fine.  There 
are other ideas here.  Especially if you are wanting messages matching 
specific patterns to automatically go through this process.  }:-)

> Here's my procmail receipe:
> 
> PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
> SHELL=/bin/sh
> MAILDIR=$HOME/Maildir
> DEFAULT=$MAILDIR/
> :0fBbw
> * ^FROM.*mailchuck\.com
> | sed -n '/^::$/,/^-----END REMAILER MESSAGE-----$/p' | ./yamn -M

Nicely done.



-- 
Grant. . . .
unix || die

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4013 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mixmin.net/pipermail/remops/attachments/20200403/e69eff3f/attachment-0001.bin>


More information about the Remops mailing list