Re: Sending a new email with maildrop/mailbot

Sam Varshavchik <[email protected]>
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
Larry Stone writes:

>
> So far, for the Maildrop equivalent, I've come up with using mailbot
> (from reading the man page, it appears reformail is not the tool for
> this) is:
> if (/^From:.*REDACTED/ && \
>       /^Subject:.*key subject/ && \
>       /.*key text/:b && \
> {
>       `grep -i "key text" > .tmpmailfilter`
>       cc "|/usr/local/bin/mailbot -t .tmpmailfilter \
>         -A 'From: [email protected]' \
>         -N -s "Key" /usr/sbin/sendmail -f '' [email protected]"
>       `rm .tmpmailfilter`
> }
>
> This works so my only concern is that it is not optimal. Is there a way to
> avoid using the temporary file by using a variable like in the procmail
> recipe? Also, I tried setting the destination with [email protected]
> but if IIRC, correctly, that caused it to go to the original sender as
> well.

Something like this:

if (/^From:.*REDACTED/ && \
    /^Subject:.*key subject/ && /.*key text.*/:b)
{
       cc "| (echo 'From: [email protected]'; echo 'Subject: key'; sed -n '/^From:/d;/^Subject:/d;1,/^$/p';"' echo "$MATCH") | /usr/sbin/sendmail -f "" [email protected]'
}

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAABAgAGBQJSoR8kAAoJEGs6Yr4nnb8leBYP/RZu2NZ+E3PE/lCadwvhh4jx
FvjxrasGq1VlFqxw/pmvMMol+Gyz3HtG5KQncApMld0MBNOsHBOsPV0bMKbOl2Sw
njLlKhm+4UXcD7oR0sZnSKanbyZeVZznM4l9tKmTy4zYW+wqwO/7SoN5++vNbW3+
qrzxveH1VAOa4SltuNQjop5o/bs38cD+EyMn+JJxO6RPfEABVGGpFhYw4YwtV0jP
4nX1SzMpGHMGBYYj+8rMLJ9+L8EOKCKZrbA04bxY29/rS1EnfvhQ9tPq+tnBSDwi
C2cMXCNEmTIqXmZ1kTomjBpCwcyhpWfP6u2nuQsfrZ2D63Ahil1Bj9RJTpqXwlMl
RkrywanpmoViDXo3waMMDOkHeBSdXzLTj0S/1blhHr+c/BlsVtsjvp6gXAB9wv1B
ktBy/PrLagq8oJLuYoS4MUqFa8pYcUtRSeRb4b8w0TvTo2dBhWsZ06DzrzsxvzqQ
PugzEpN8C/50PZtap62XySUgwAUgso0dd+VHn4oaRjSPnrpsRFf6V1A5U274bXHx
RK5fiPf0fMG7QXf70F5xjHq3H5qg+KBJ1CzSLfwjxE7ejv3LcYh/YvBckJKx3PPm
E1i0Fr0r6hvKpto8+9LKbk3SEQO/ht5upgfS5kqTC/0zq59mOT4GLHsJstTelxtg
BNJVCph2MSYxk/W8Z1Lr
=mIfa
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.