procmail copying to folder, not moving
procmail copying to folder, not moving
am 04.11.2005 23:49:29 von bobdc
For the following .procmailrc rule, procmail puts a copy of the
relevant emails into the MyNewFolder folder, but it leaves a copy in my
inbox as well. What should I do so that I only end up with the one in
MyNewFolder?
:0:
* ^Subject:.*potrzebie
/some/path/here/MyNewFolder
thanks,
Bob
Re: procmail copying to folder, not moving
am 05.11.2005 00:20:05 von AK
bobdc wrote:
> For the following .procmailrc rule, procmail puts a copy of the
> relevant emails into the MyNewFolder folder, but it leaves a copy in my
> inbox as well. What should I do so that I only end up with the one in
> MyNewFolder?
>
> :0:
> * ^Subject:.*potrzebie
> /some/path/here/MyNewFolder
>
> thanks,
>
> Bob
>
You can try using the w flag or is it the W flag to make procmail wait
for the successful storage of the email.
:0w:
* ^Subject:.*potrzebie
/some/path/here/MyNewFolder
You should enable verbose logging around this recipe to see what happens.
Is this recipe part of a larger block of recipes?
There is no way to determine for sure why you have duplicates based on
the information you provided.
AK
AK
Re: procmail copying to folder, not moving
am 05.11.2005 03:40:34 von Alan Connor
On comp.mail.misc, in <1131144569.931666.285800@g14g2000cwa.googlegroups.com>, "bobdc" wrote:
bobdc
Results 1 - 5 of 5 posts in the last year
1 Gmail-Past-discussions
1 comp.lang.python
1 comp.mail.misc
1 sci.lang.japan
1 soc.culture.china
Right.
[Note: I don't read the posts of "Sam" or any of his
many aliases, nor any responses to them.]
AC
--
URLs in headers.
Re: procmail copying to folder, not moving
am 05.11.2005 04:09:55 von Sam
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
--=_mimegpg-commodore.email-scan.com-16390-1131159900-0004
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Usenet Beavis writes:
> bobdc
> Results 1 - 5 of 5 posts in the last year
"Results 1 - 10 of 23,500 for usenet beavis (0.28 seconds)"
You win.
> Right.
Like a broken clock, twice a day.
> [Note: it's not my fault that I'm a complete dumbass. I was dropped
> on my head as a child. See http://angel.1jh.com/nanae/kooks/alanconnor.shtml
> for more information]
--=_mimegpg-commodore.email-scan.com-16390-1131159900-0004
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
iD8DBQBDbCFcx9p3GYHlUOIRAi97AJ0cEsHkkHJ2lJJx3PEwnofKJjLawACf buMK
OmMesXbbOkXTwrAFukGI9dY=
=tr/t
-----END PGP SIGNATURE-----
--=_mimegpg-commodore.email-scan.com-16390-1131159900-0004--
AC found bug in his script. News at ten. (was: procmail copying to folder, not moving)
am 05.11.2005 14:52:45 von Frank Slootweg
Alan Connor wrote:
> On comp.mail.misc, in <1131144569.931666.285800@g14g2000cwa.googlegroups.com>, "bobdc" wrote:
>
>
> bobdc
> Results 1 - 5 of 5 posts in the last year
> 1 Gmail-Past-discussions
[deleted]
> Right.
So you found a bug in your script. Big deal. If I were you, I would
not post it, but fix it, but that's just me.
Re: procmail copying to folder, not moving
am 05.11.2005 15:58:42 von AK
Alan Connor wrote:
> On comp.mail.misc, in <1131144569.931666.285800@g14g2000cwa.googlegroups.com>, "bobdc" wrote:
>
>
>
> bobdc
> Results 1 - 5 of 5 posts in the last year
> 1 Gmail-Past-discussions
> 1 comp.lang.python
> 1 comp.mail.misc
> 1 sci.lang.japan
> 1 soc.culture.china
>
> Right.
>
>
> [Note: I don't read the posts of "Sam" or any of his
> many aliases, nor any responses to them.]
>
> AC
>
Alan,
What is the purpose for this? Does this in any way answer the
individual's question?
Please spare us from your dedicated research of how many times and by
which means a poster posted articles to this or any other news group. I
could say that few if any besides you, care.
It seems that you like to see your name in a newsgroup, please use
alt.test and post as many articles as you deem necessary to satisfy your
ego. There you would have free reign and would not have to deal with
individuals who find your posts of little utility if not a waste of
bandwidth and a waste of storage space on a server.
AK
Re: procmail copying to folder, not moving
am 05.11.2005 18:32:11 von bobdc
> You can try using the w flag or is it the W flag to make procmail wait
> for the successful storage of the email.
No luck. I've pasted my complete current .procmailrc file below, but it
looks pretty straightforward to me. I put the log entry from running a
test after that.
(For anyone interested in where else I post--and I find it odd that
there would be so much interest--try searching the xml-dev or rdf-list
mailing lists for "Bob DuCharme." I post questions on usenet groups
when I don't know a specific mailing list to go to, which is why it's
such a short but diverse list of groups.)
thanks,
Bob
# start of .procmailrc
DEFAULT=/var/mail/bobdc
MAILDIR=${HOME}/Mail
SHELL=/usr/local/bin/ksh
PATH=${HOME}/bin:/bin:/usr/bin:/usr/local/bin
LOGFILE=${MAILDIR}/log
SENDMAIL=/usr/sbin/sendmail
:0w:
* ^From:.*lexisnexis@prod.lexisnexis.com
| /usr/www/users/bobdc/rss/bin/mail2rss2.sh
:0w:
* ^From:.*savedsearches@ebay.com
| /usr/www/users/bobdc/rss/bin/ebaymail2atom.sh
:0w:
* ^Subject:.*potrzebie
/usr/boxes/bobdc/snee.com/bob^/.imap/test1
# anything with cyrillic characters is spam
:0w:
* ^From:.*[\x0400-\x04ff]
/usr/boxes/bobd/snee.com/bob^/.imap/test1
# end of .procmailrc
# log entry after sending test:
>From bobducharme@lexisnexis.com Sat Nov 05 17:28:00 2005
Subject: potrzebie
Folder: /usr/boxes/bobdc/snee.com/bob^/.imap/test1
1863
Re: procmail copying to folder, not moving
am 06.11.2005 16:11:25 von AK
bobdc wrote:
>>You can try using the w flag or is it the W flag to make procmail wait
>>for the successful storage of the email.
>
>
> No luck. I've pasted my complete current .procmailrc file below, but it
> looks pretty straightforward to me. I put the log entry from running a
> test after that.
>
> (For anyone interested in where else I post--and I find it odd that
> there would be so much interest--try searching the xml-dev or rdf-list
> mailing lists for "Bob DuCharme." I post questions on usenet groups
> when I don't know a specific mailing list to go to, which is why it's
> such a short but diverse list of groups.)
>
> thanks,
>
> Bob
>
> # start of .procmailrc
>
> DEFAULT=/var/mail/bobdc
> MAILDIR=${HOME}/Mail
> SHELL=/usr/local/bin/ksh
> PATH=${HOME}/bin:/bin:/usr/bin:/usr/local/bin
> LOGFILE=${MAILDIR}/log
> SENDMAIL=/usr/sbin/sendmail
>
> :0w:
> * ^From:.*lexisnexis@prod.lexisnexis.com
> | /usr/www/users/bobdc/rss/bin/mail2rss2.sh
>
> :0w:
> * ^From:.*savedsearches@ebay.com
> | /usr/www/users/bobdc/rss/bin/ebaymail2atom.sh
>
> :0w:
> * ^Subject:.*potrzebie
> /usr/boxes/bobdc/snee.com/bob^/.imap/test1
>
>
> # anything with cyrillic characters is spam
> :0w:
> * ^From:.*[\x0400-\x04ff]
> /usr/boxes/bobd/snee.com/bob^/.imap/test1
>
> # end of .procmailrc
>
> # log entry after sending test:
>
>>From bobducharme@lexisnexis.com Sat Nov 05 17:28:00 2005
> Subject: potrzebie
> Folder: /usr/boxes/bobdc/snee.com/bob^/.imap/test1
> 1863
>
Bob,
Unfortunately, I do not understand what you posted here.
Enable Verbose logging (VERBOSE=on) The message was delivered into test1.
You seem to always use the lock file including when you are passing the
data to a script.
You also might be better off using the /bin/sh and not the ksh as the shell.
One way to make sure that procmail does not fall through waiting for the
lock is to check after every script if that was the case and if so
issue a hup or a TERM signal to the procmail pid ($$) i.e. kill -TERM
$$. This way procmail will exit abnormally and the delivery of the
message will be requeued.
AK
Re: procmail copying to folder, not moving
am 08.11.2005 02:56:01 von AK
bobdc wrote:
> OK, with verbose on and /bin/sh as my shell:
>
> procmail: [69202] Mon Nov 7 09:33:32 2005
> procmail: No match on "^From:.*lexisnexis@prod.lexisnexis.com"
> procmail: No match on "^From:.*savedsearches@ebay.com"
> procmail: Match on "^Subject:.*potrzebie"
> procmail: Locking "/usr/boxes/bobd/snee.com/bob^/.imap/test1.lock"
> procmail: Assigning
> "LASTFOLDER=/usr/boxes/bobd/snee.com/bob^/.imap/test1"
> procmail: Opening "/usr/boxes/bobd/snee.com/bob^/.imap/test1"
> procmail: Acquiring kernel-lock
> procmail: Unlocking "/usr/boxes/bobd/snee.com/bob^/.imap/test1.lock"
> procmail: Notified comsat:
> "bobd@3202:/usr/boxes/bobd/snee.com/bob^/.imap/test1"
>>From bobducharme@lexisnexis.com Mon Nov 07 14:33:32 2005
> Subject: potrzebie
> Folder: /usr/boxes/bobd/snee.com/bob^/.imap/test1
>
>
> A copy of the message ends up in the test1 folder and another one is in
> the inbox.
>
> Bob
>
Add the following right before your portzebie recipe.
:0wf
| formail -A -I "X-procmail-processing: entered"
Does the message in the inbox have that entry in the headers of the message?
If it does not, you likely have some other script delivering the
messages or that is your sendmail, postfix, exim setup. i.e. deliever a
copy into the inbox and process a copy through procmail.
All of the above are what I can think of based on the information you
provided.
AK
Re: procmail copying to folder, not moving
am 13.11.2005 14:46:31 von bobdc
It turns out that it was a qmail issue, and adding EXITCODE=99 in the
header of my .procmailrc file fixed it.
Thanks for your help!
Bob
Re: procmail copying to folder, not moving
am 15.11.2005 03:18:02 von AK
bobdc wrote:
> It turns out that it was a qmail issue, and adding EXITCODE=99 in the
> header of my .procmailrc file fixed it.
>
> Thanks for your help!
>
> Bob
>
FYI, setting EXITCODE 99 might result in email loss if something goes
wrong during the procmail processing.
What is in your .qmail file?
The .qmail file likely includes two directives. Process with qmail and
deliver into the inbox.
AK