martin f krafft <[EMAIL PROTECTED]> writes: >i keep getting a message from my POP3s daemon (courier) about headerless >emails, so i went VERBOSE on procmail and inspected postfix logs to >discover one such instance: ... >the message had size 3181 and was delivered to procmail. > >now the procmail log: ... > 1010359038.5306_1.seamus" > Folder: /home/madduck/mass/Mail/mass/new/1010359038.5306_1.seamus 0 > > >notice the 0 at the end of the last line. the file written into the >Maildir is of size 0. but postfix did deliver it correctly... > >okay, so while writing this message, i noticed the PGP matching. that's >this recipe: > ># handle old-style pgp messages >:0 >* !^Content-Type: message/ >* !^Content-Type: multipart/ >* !^Content-Type: application/pgp >{ > :0 fBw > * ^-----BEGIN PGP MESSAGE----- > * ^-----END PGP MESSAGE----- > | formail -i "Content-Type: application/pgp; format=text; x-action=encrypt" > > :0 fBw > * ^-----BEGIN PGP SIGNED MESSAGE----- > * ^-----BEGIN PGP SIGNATURE----- > * ^-----END PGP SIGNATURE----- > | formail -i "Content-Type: application/pgp; format=text; x-action=sign" >}
Both those nested recipes only need to change the message header, so you should use the 'h' flag to tell procmail to only run the header through the command, ala: :0 fhBw ...etc However, for this particular use of formail, that should only be an efficiency gain and not critical to the effectiveness of the recipe. >which is pretty much verbatim from e.g. [1] > > 1. http://www.linuxdoc.org/HOWTO/Mutt-GnuPG-PGP-HOWTO-8.html > >is this thing kaputt? i mean it's designated to be a filter through the >f flag, but don't i need that in the top-level :0 as well? The recipe in section 8.3 of that webpage is wrong, as the MIME Content-Type: header field it inserts is syntactically illegal (the trailing semicolon is not allowed), but the ones you're using, from section 8.2 are fine. As for the 'f' flag, you don't need to put it on the top-level recipe. Doing so will provoke a warning from procmail in your log, as the 'f' flag has no meaning on nested block recipes. Looking again at your procmail log excerpt, I see the following 'odd' entry: >procmail: Executing " formail -i "Content-Type: application/pgp; format=text; >x-action=sign"" >procmail: Assigning >"LASTFOLDER=/home/madduck/mass/.maildir/new/1010359038.5306_0.seamus" >procmail: Assigning "INCLUDERC=/home/madduck/mass/.procmail/rc.daemon" What recipe is generating that LASTFOLDER assignment? Does that file contain the complete message or is also zero length? Also, it would be useful to know what version of procmail you're using and on what platform. (I'm going to send a gzipped copy of this message directly to Martin's address.) Philip Guenther