Re: Automated message processing
Am 2008-09-03 22:59:39, schrieb David Champion: This works, but you'd need to store the valid random number someplace. For a zero-knowledge approach you could do something like generate an MD5 hash of the prospective member's e-mail address with some secret that's shared between the script that sends the 'who are you' I am using simply: echo ${MYSECRET}${EMAIL} |md5sum where ${MYSECRET} is only know to me and in conjunction with the senders ${EMAIL} it works perfectly... If someone want to know ${MYSECRET} he must 0wn1ng my brain... Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: Automated message processing
Am 2008-09-05 07:46:09, schrieb Peter Davis: I understand that. I guess what I should have said was Mutt doesn't give me any way to pass a pointer to the message file. All I can do is pipe the contents of the message. HOW do you filter the E-Mails? If you are using procmail, you can use TRAP (in front of the matching procmail recipe) to add an extra header to the message using: :0 * ^Subject:.*subscribe me { TRAP='cat ${LASTFOLDER} |formail -f -I X-Folder: ${LASTFOLDER} ${LASTFOLDER}.tmp mv -f ${LASTFOLDER}.tmp ${LASTFOLDER}' :0 .Subscribe_folder/. } Note: I put the TRAP inside a recipe since I do not want to have it executed on ANY other messages I receive Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: Automated message processing
Am 2008-09-04 22:58:29, schrieb Peter Davis: Yes, but both of those require searching through a potentially large number of messages to find the matching id. I figured that since I'm Are you joking? My LKM folder has at least 26.000 messages (2 month, 200 MByte) and a simple grep take less then 4 seconds... I asume already, you have much less messages in this folder and you are not using 15000 RpM SCSI drives Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: Automated message processing
Hi, * Kyle Wheeler wrote: On Thursday, September 4 at 10:58 PM, quoth Peter Davis: ~i id ... or: grep '^Message-ID: id' * Yes, but both of those require searching through a potentially large number of messages to find the matching id. If you use hcache, the ~i pattern match will be just a hash-table lookup, which should be constant time no matter the number of messages. Mutt internally maintains a hash table with message-ids for threading but for ~i this isn't considered. The reason is that ~i takes a regex as argument, and with hash tables you can't do range or partial matches or even regex matches, only exact string matches. Mutt knows about some headers per message one of them being the message-id which is used for ~i. hcache doesn't play a role since mutt always has that header, i.e. ~i doesn't require a disk hit per message. If you want to speed it up and your mutt is recent enough, you can use string instead of regex search if that is sufficient. I.e. =i [EMAIL PROTECTED] should be way faster for a large folder compared to ~i [EMAIL PROTECTED] Regards, Rocco
Re: Automated message processing
Kyle Wheeler wrote: I figured that since I'm using MH format anyway, I should be able to include a path directly to the message file itself ... except that Mutt doesn't seem to give me a way to pass that information when I pipe a message to a script. Of course not - it's a *pipe*. :) In the example: cat foo | somecommand somecommand has no way of ever discovering what or where foo is. That's a feature, not a flaw. I understand that. I guess what I should have said was Mutt doesn't give me any way to pass a pointer to the message file. All I can do is pipe the contents of the message. Thanks! -pd -- Peter Davis Funny stuff - http://www.pfdstudio.com Ideas Great and Dumb - http://www.ideasgreatanddumb.com Art/Tech Fusion - http://www.arttechfusion.com The Tech Curmudgeon - http://www.techcurmudgeon.com
Re: Automated message processing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday, September 3 at 10:59 PM, quoth David Champion: On Wednesday, September 3 at 10:54 PM, quoth Peter Davis: Usually, the person responds to the who are you? message leaving the message body intact. So I want to have something embedded in the who are you? message that can point my script back to the original so-and-so wants to join message from Yahoo!, so I can reply to that. How about just a long random number? This works, but you'd need to store the valid random number someplace. It occurs to me that you could also include the original Message-ID as the random number. ~Kyle - -- Eskimo: If I did not know about God and sin, would I go to hell? Priest: No, not if you did not know. Eskimo: Then why did you tell me? -- Annie Dillard -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAki/elQACgkQBkIOoMqOI14dpACfRrPGgX39vpkMpam/Vklc9Hi4 duQAn2XSHTsQOlJrZYINu2cIVBnkHJSu =t/Qf -END PGP SIGNATURE-
Re: Automated message processing
Kyle Wheeler wrote: On Wednesday, September 3 at 10:59 PM, quoth David Champion: On Wednesday, September 3 at 10:54 PM, quoth Peter Davis: Usually, the person responds to the who are you? message leaving the message body intact. So I want to have something embedded in the who are you? message that can point my script back to the original so-and-so wants to join message from Yahoo!, so I can reply to that. How about just a long random number? This works, but you'd need to store the valid random number someplace. It occurs to me that you could also include the original Message-ID as the random number. Sorry I wasn't clear. I don't want a random number. I want to find the message that Yahoo! sent to me, notifying me that someone wants to join, so that I can reply to that message to approve the membership. For example: Msg 1: Yahoo! to me: So-and-so wants to join list X. Msg 2: Me to So-and-so: Who are you? (cf. msg 1) Msg 3: So-and-so to me: I'm So-and-so.\n Who are you (cf. msg 1) Msg 4: Reply to msg 1 to approve membership. Is there a fast way to find a message with a given Message-ID? If so, that would work. Thanks! -pd -- Peter Davis Funny stuff - http://www.pfdstudio.com Ideas Great and Dumb - http://www.ideasgreatanddumb.com Art/Tech Fusion - http://www.arttechfusion.com The Tech Curmudgeon - http://www.techcurmudgeon.com
Re: Automated message processing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday, September 4 at 08:06 AM, quoth Peter Davis: Is there a fast way to find a message with a given Message-ID? If so, that would work. ~i id ... or: grep '^Message-ID: id' * ~Kyle - -- Whenever you have an efficient government, you have a dictatorship. -- Harry Truman, lecturing at Columbia University, April 28, 1959 -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAkjAFIEACgkQBkIOoMqOI16JSgCgy1wlR3qa0rZc+qfSLZkoyw7s 3xkAnj6Hab5cKt7x819JvC7LGaVijQS0 =Mpwo -END PGP SIGNATURE-
Re: Automated message processing
Kyle Wheeler wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday, September 4 at 08:06 AM, quoth Peter Davis: Is there a fast way to find a message with a given Message-ID? If so, that would work. ~i id ... or: grep '^Message-ID: id' * Yes, but both of those require searching through a potentially large number of messages to find the matching id. I figured that since I'm using MH format anyway, I should be able to include a path directly to the message file itself ... except that Mutt doesn't seem to give me a way to pass that information when I pipe a message to a script. Thanks! -pd -- Peter Davis Funny stuff - http://www.pfdstudio.com Ideas Great and Dumb - http://www.ideasgreatanddumb.com Art/Tech Fusion - http://www.arttechfusion.com The Tech Curmudgeon - http://www.techcurmudgeon.com
Re: Automated message processing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday, September 4 at 10:58 PM, quoth Peter Davis: ~i id ... or: grep '^Message-ID: id' * Yes, but both of those require searching through a potentially large number of messages to find the matching id. If you use hcache, the ~i pattern match will be just a hash-table lookup, which should be constant time no matter the number of messages. I figured that since I'm using MH format anyway, I should be able to include a path directly to the message file itself ... except that Mutt doesn't seem to give me a way to pass that information when I pipe a message to a script. Of course not - it's a *pipe*. :) In the example: cat foo | somecommand somecommand has no way of ever discovering what or where foo is. That's a feature, not a flaw. ~Kyle - -- A tyrant must put on the appearance of uncommon devotion to religion. Subjects are less apprehensive of illegal treatment from a ruler whom they consider God-fearing and pious. On the other hand, they do less easily move against him, believing that he has the gods on his side. -- Aristotle -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAkjAr3sACgkQBkIOoMqOI14+ZACgkJa9BTfh8a1A29RFD2WF1BRj crMAmgNq59r7EvHTzbB+W0ssFnUzZE4W =y6/C -END PGP SIGNATURE-
Automated message processing
I moderate a bunch of lists on Yahoo!, and I moderate list membership. When I get an e-mail saying so-and-so wants to join list X, I send an e-mail to so-and-so asking for a name and any other information that demonstrates that so-and-so is a legitimate member and not a spammer. So far, I've been successful in using Mutt to pipe a message to a Perl script which automatically sends the who are you? message. However, I'd like to be able to automatically process the reply also, in case I want to approve the membership. Usually, the person responds to the who are you? message leaving the message body intact. So I want to have something embedded in the who are you? message that can point my script back to the original so-and-so wants to join message from Yahoo!, so I can reply to that. I'm using MH mailboxes, so I could simply embed the folder and message number of the original Yahoo! notification. However, when I pipe a message to my perl script, I have no idea what the original MH message number is. Mutt has assigned numbers of its own. Any way to find the path/name of the original message file? Other suggestions for how to accomplish what I'm trying to do? Thanks! -pd -- Peter Davis Funny stuff - http://www.pfdstudio.com Ideas Great and Dumb - http://www.ideasgreatanddumb.com Art/Tech Fusion - http://www.arttechfusion.com The Tech Curmudgeon - http://www.techcurmudgeon.com
Re: Automated message processing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday, September 3 at 10:54 PM, quoth Peter Davis: Usually, the person responds to the who are you? message leaving the message body intact. So I want to have something embedded in the who are you? message that can point my script back to the original so-and-so wants to join message from Yahoo!, so I can reply to that. How about just a long random number? ~Kyle - -- When the people fear the government, there is tyranny; when the government fears the people, there is liberty. -- Thomas Jefferson -BEGIN PGP SIGNATURE- Comment: Thank you for using encryption! iEYEARECAAYFAki/WaUACgkQBkIOoMqOI16adACfauNCfnP88RIQ5WoBXooQ+fjs yGEAn0Dcz0VxRmexi2TzWIIN6LOqPn2E =CC53 -END PGP SIGNATURE-
Re: Automated message processing
On Wednesday, September 3 at 10:54 PM, quoth Peter Davis: Usually, the person responds to the who are you? message leaving the message body intact. So I want to have something embedded in the who are you? message that can point my script back to the original so-and-so wants to join message from Yahoo!, so I can reply to that. How about just a long random number? This works, but you'd need to store the valid random number someplace. For a zero-knowledge approach you could do something like generate an MD5 hash of the prospective member's e-mail address with some secret that's shared between the script that sends the 'who are you' and the script that processes the reply. This would depend on some reasonable parsing of the sender address, though (to reduce it to [EMAIL PROTECTED], discarding angle bracket enclosures and any real name present). -- -D.[EMAIL PROTECTED]NSITUniversity of Chicago