Re: How to send PGP-encrypted mail non-interactively?

2007-05-10 Thread William Yardley
On Thu, May 10, 2007 at 04:58:12PM -0700, Darrin Chandler wrote:
> On Wed, May 09, 2007 at 12:34:33PM -0700, Darrin Chandler wrote:
> > On Wed, Nov 22, 2006 at 05:53:52PM +0100, Rene Tschirley wrote:
> > > I'd like to have a script which sends eMail Cron-triggered on a daily
> > > basis. So far no problem for mutt, but it has to be PGP-encrypted with
> > > gnupg.
> > 
> > Did you ever get this working? If so, I would be interested to know how
> > you did it!
> 
> For the archives, I've got a method working well, though it's not very
> elegant. Here's what I've got going, in a shell snippet:
> 
> --
> gpg --encrypt --armor --output foo.pgp $RECIPIENT < foo
> echo encrypted stuff attached | mutt -s Subject -a foo.pgp $RECIPIENT

I would probably just send the clearsigned PGP message (using mutt or
sendmail), rather than attaching a foo.pgp file.

I use a pgp command like this to send encrypted mail from within a
program - probably some of these options will be helpful to people doing
similar things:

 gpg -r 0x -ae --batch --yes --always-trust

using the "batch" option means that it'll never allow interactive
commands, --yes assumes yes on most questions, --always-trust prevents
gpg from barfing if the recipient isn't trusted (according to TFM on one
machine I'm on, this is deprecated in favor of "--trust-model always").

w


Re: Folder Format for my setup

2007-05-10 Thread jerojasro
On Wed, May 09, 2007 at 09:40:23PM -0300, Cleverson wrote:
> with Mutt. My CPU is an AMD Sempron 1500 mhz, 256 RAM. My filesystem is 
> ReiserFS 3.6.
I like Maildir.

try changing the reiserFS mount opts, specially noatime and nodiratime.
It made accessing my mailbox a bit faster, and check out too the cache
capabilities of mutt

-- 
Javier Rojas

GPG Key ID: 0xA1C57061


pgpFQohTmk0FC.pgp
Description: PGP signature


Re: How to send PGP-encrypted mail non-interactively?

2007-05-10 Thread jerojasro
On Thu, May 10, 2007 at 04:58:12PM -0700, Darrin Chandler wrote:
> should hold for any other gpg machinations, such as encrypt & sign. Of
> course anything that would cause prompting will cause problems in a
> batch situation such as cron, but that's not a problem for my usage.

in such cases, try using "expect" or "pexpect", an equivalent for
python. It rocks for automating such tasks

-- 
Javier Rojas

GPG Key ID: 0xA1C57061


pgpy85apy1R66.pgp
Description: PGP signature


Re: Folder Format for my setup

2007-05-10 Thread Wilkinson, Alex
0n Thu, May 10, 2007 at 05:03:38PM -0600, Kyle Wheeler wrote: 

>On Thursday, May 10 at 07:48 PM, quoth Cleverson:
>> Thank you very much for all of infos. I have yet another question:
>> Whatever format I choose, is it easy to convert the folders to the other 
>> one in case I want to give it a try?

http://batleth.sapienti-sat.org/projects/mb2md/
http://sageshome.net/oss/mbox2mdir.php

 -aW

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.



Re: How to send PGP-encrypted mail non-interactively?

2007-05-10 Thread Darrin Chandler
On Wed, May 09, 2007 at 12:34:33PM -0700, Darrin Chandler wrote:
> On Wed, Nov 22, 2006 at 05:53:52PM +0100, Rene Tschirley wrote:
> > I'd like to have a script which sends eMail Cron-triggered on a daily
> > basis. So far no problem for mutt, but it has to be PGP-encrypted with
> > gnupg.
> 
> Did you ever get this working? If so, I would be interested to know how
> you did it!

For the archives, I've got a method working well, though it's not very
elegant. Here's what I've got going, in a shell snippet:

--
gpg --encrypt --armor --output foo.pgp $RECIPIENT < foo
echo encrypted stuff attached | mutt -s Subject -a foo.pgp $RECIPIENT
--

This works fine. Note the .pgp on the attachment. It's needed to get
mutt to use the desired MIME type of application/pgp. The same methods
should hold for any other gpg machinations, such as encrypt & sign. Of
course anything that would cause prompting will cause problems in a
batch situation such as cron, but that's not a problem for my usage.

Hopefully this will save someone a couple of minutes. :)

-- 
Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
[EMAIL PROTECTED]   |  http://phxbug.org/  |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation


Re: Folder Format for my setup

2007-05-10 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thursday, May 10 at 07:48 PM, quoth Cleverson:
> Thank you very much for all of infos. I have yet another question:
> Whatever format I choose, is it easy to convert the folders to the other 
> one in case I want to give it a try?

It depends. Converting between the two is extremely simple (mutt can 
do it, and there are plenty of perl scripts out there that will also 
do it) in the physical sense. But in terms of getting all your 
non-mutt software happy about it at the same time, that may be more 
challenging.

~Kyle
- -- 
Selfishness is not living as one wishes to live, it is asking others 
to live as one wishes to live.
 -- Oscar Wilde
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFGQ6TKBkIOoMqOI14RAl1dAJ94fsgUB3Au2k0UZJZG/iO3BHEsZACfYv8K
VuZ+8/2LlE+ejnEM8cnCdOM=
=/1Dt
-END PGP SIGNATURE-


Re: Folder Format for my setup

2007-05-10 Thread Cleverson

Hello Kyle and all,

Thank you very much for all of infos. I have yet another question:
Whatever format I choose, is it easy to convert the folders to the other one 
in case I want to give it a try?


Cheers,
Cleverson

"Be realistic; ask for the impossible."

Kyle wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday, May  9 at 09:40 PM, quoth Cleverson:

I've just installed Gentoo Linux and now I intend to setup a mail
system with Mutt. My CPU is an AMD Sempron 1500 mhz, 256 RAM. My
filesystem is ReiserFS 3.6.


Well, ReiserFS is particularly well suited for Maildir, but...


Usually, I receive about 20 to 60 messages per day, depending on how
active I am at mailing lists.


For someone that's receiving such a small amount of mail, it really
doesn't matter either way.


I'd like to know, for example, wheter there are features that don't
exist or don't work well with one of the two folder formats,


Nope, the features are about the same. Depending on how you use 'em,
you may find the convenience of having each message in a separate file
useful, or you may not.

Mbox stores messages more efficiently, however, since in maildir
messages must be at least the minimum file size (usually 4k) where in
mbox messages are all concatenated together. But, unless you've got
massive amounts of email and/or are particularly worried about storage
efficiency, this isn't a big deal (and good filesystems have ways of
compensating).


if one of them have theoretically better performance in general,
what is the best format to manage messages (move, copy, save...),
either using Mutt or other programs.


If you're doing a lot of manipulation of the contents (and I mean a
*LOT*), Maildir will generally give you better performance. If you
have GIANT folders (containing tens of thousands of messages) that
don't change much (or ever), then mbox will give you better
performance.


Is it true that Maildir has better performance while loading folders?


Not usually; particularly for large folders, just the opposite is
true, especially when opening them for the first time. On the other
hand, if your client can cache things, like filenames and such, it may
be able to refresh folders without having to reread everything.


And about file corruption consequences for each one?


In MOST cases, that's not an issue. The problem, of course, is that
manipulating an mbox file requires you to lock it first, which means
that every program that will manipulate it has to use and obey the
same locking mechanism, which can be particularly tricky on NFS shares
(primarily on older NFS implementations). If you're worried about it,
Maildir is probably safer, but for most purposes, this is a solved
problem.

There is the possibility that a power outage might do something uglier
to an mbox than a Maildir, but with a journaling filesystem (like
ReiserFS), that's not a major issue.

So, really, either one will probably serve you in good stead.

Personally, I'm fond of Maildir, because the meta data is stored in
the filename rather than in the mail itself, and the fact that each
message is a separate file makes my archiving scripts much much
simpler (e.g. move all files older than X to the archive), but that's
just me. Other people prefer mbox for different reasons. I don't think
you can say that there's a definitively "better" one, particularly for
a low-traffic, massively over-powered system like yours.

~Kyle
- -- 
Man has the right to act in conscience and in freedom so as personally

to make moral decisions. "He must not be forced to act contrary to his
conscience. Nor must he be prevented from acting according to his
conscience, especially in religious matters."
-- Catholic Catechism 1782
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFGQoEcBkIOoMqOI14RAtreAJ9RMK9TzN6yuJP4qrSznONFfzWRBACfXmDe
+Ts0r1/hEaYbE4lifF3tTF4=
=GDWI
-END PGP SIGNATURE- 


Re: Charset issue?

2007-05-10 Thread Roland Hill
On Thu, 10 May 2007 or thereabouts, Alain Bench came forth with:

>  On Friday, May 4, 2007 at 10:44:00 +1200, Roland Hill wrote:

> > I did this [export LANG=en_NZ] and the 'garbled' message is still
> > garbled (/264 etc)

> So this can mean either that the en_NZ locale is broken or not
> installed (it must appear in "locale -a" list), or that Kyle is right
> (mislabelled mail). Could you please send me gzipped attached one
> iso-8859-1 mail, and one utf-8 from the ahum... garbling sender? ;-)


> > Kyle, I tried message-hooks as you suggested, 2 actually to deal with
> > utf-8 -> us-ascii and iso-8859-1 -> us-ascii, and all strange
> > characters are now question marks.

> Those characters are all above 128 (\200 octal), and as such are not
> part of US-Ascii. You forced them to be treated as US-Ascii, so Mutt
> considers them invalid, and ?-masks them. That's of course not the
> wanted result, and is not what Kyle suggested. He suggested to alias
> utf-8 -> Latin-1, in the hope the content is really Latin-1 under the
> utf-8 label. The said characters do exist in Latin-1 (as in won´t and
> ¨reply¨).

Hi Alain,

My guess is that the messages are labelled incorrectly, as, after much
review, and can read all 3 charset's correctly when sent from 99% of
people. As this particular sender sometimes sends in us-ascii, I thought
maybe that was the 'real' charset of the 'bad mails'. I was playing - I
don't know this subject well.

File is attached as requested. 1 'bad' message in Latin-1 and 1 in utf-8.

Thanks for your assistance with this.

-- 
Regards,

Roland

PGP Key 0xDA39319B = BCF0 1214 BAE9 5A3D 46FC 21A6 360D 9398 DA39 319B


badmail.gz
Description: GNU Zip compressed data


signature.asc
Description: Digital signature


Re: Extract URL's from message

2007-05-10 Thread Patrick Shanahan
* Trey Sizemore <[EMAIL PROTECTED]> [05-10-07 00:46]:
> Does anyone happen to know what the correct syntax is in
> url_handler.sh to get the URL's opened in new tabs in Firefox?  I've
> gotten as close as getting the first URL to open, but selecting a
> second results in:

my ~/.urlview works:

###
# Urlview configuration file.
# man urlview  
#
# The defaults are shown here:
#
# REGEXP  (((https?|ftp|gopher)://|(mailto|file|news):)[^' 
\t<>"]+|(www|web|w3)\.[-a-z0-9.]+)[^' \t.,;<>"\):]
# COMMAND url_handler.sh %s
#
COMMAND firefox -new-window %s&



-- 
Patrick Shanahan Plainfield, Indiana, USAHOG # US1244711
http://wahoo.no-ip.org Photo Album:  http://wahoo.no-ip.org/gallery2
OpenSUSE Linux   http://en.opensuse.org/
Registered Linux User #207535@ http://counter.li.org


Re: Charset issue?

2007-05-10 Thread Alain Bench
Hi Roland,

 On Friday, May 4, 2007 at 10:44:00 +1200, Roland Hill wrote:

> I did this [export LANG=en_NZ] and the 'garbled' message is still
> garbled (/264 etc)

So this can mean either that the en_NZ locale is broken or not
installed (it must appear in "locale -a" list), or that Kyle is right
(mislabelled mail). Could you please send me gzipped attached one
iso-8859-1 mail, and one utf-8 from the ahum... garbling sender? ;-)


> Kyle, I tried message-hooks as you suggested, 2 actually to deal with
> utf-8 -> us-ascii and iso-8859-1 -> us-ascii, and all strange
> characters are now question marks.

Those characters are all above 128 (\200 octal), and as such are not
part of US-Ascii. You forced them to be treated as US-Ascii, so Mutt
considers them invalid, and ?-masks them. That's of course not the
wanted result, and is not what Kyle suggested. He suggested to alias
utf-8 -> Latin-1, in the hope the content is really Latin-1 under the
utf-8 label. The said characters do exist in Latin-1 (as in won´t and
¨reply¨).


Bye!Alain.
-- 
Microsoft Outlook Express users concerned about readability: For much better
viewing quotes in your messages, check the little freeware program OE-QuoteFix
by Dominik Jain. It'll change your life. :-) Exists also for Outlook.
See http://home.in.tum.de/~jain/software/oe-quotefix/>.


Re: Help me upgrade from mutt-devel-1.5.13 to mutt-devel-1.5.15

2007-05-10 Thread Alain Bench
Hello Odhiambo,

 On Thursday, May 3, 2007 at 16:23:53 +0300, Odhiambo Washington wrote:

>| pattern.o: In function `mutt_which_case':
>| pattern.o(.text+0x68): undefined reference to `iswalpha'
>| pattern.o(.text+0x7d): undefined reference to `iswupper'
>| *** Error code 1

I assume that on FreeBSD 4.11 config.h declares no HAVE_ISWALPHA nor
HAVE_ISWUPPER, right? Mutt 1.5.13 didn't use those functions. Now
Mutt 1.5.15 makes use of iswalpha() and iswupper() in only
pattern.c:mutt_which_case(), but doesn't look like embedding any
fallback solution for when they are absent. I suppose this can be
considered as a Mutt portability bug, that you should report to
http://bugs.mutt.org/>.


Bye!Alain.
-- 
Everything about locales on Sven Mascheck's excellent site at new
location http://www.in-ulm.de/~mascheck/locale/>. The little tester
utility is at http://www.in-ulm.de/~mascheck/locale/checklocale.c>.


Re: Best way to handle DOS newlines

2007-05-10 Thread Alain Bench
Hello Markus, Ray,

 On Tuesday, May 8, 2007 at 7:48:18 +0200, Markus Maria Miedaner wrote:

> On Mon, May 07, 2007 at 05:59:43PM -0700, you (Ray Van Dolson) wrote:
>> DOS/Windows newlines instead of Unix ones. All the text shows up as
>> one large line interspersed with ^M^M's.

Are you sure those are not Mac newlines? DOS newlines display lines
ending in one ^M.


>> However, if I hit reply to this message, everything shows up in vim
>> in the original format

Indeed $display_filter acts only on pager display, not on the quoted
template passed to $editor when replying.


> my suggestion is to use iconv instead of your script.

Iconv is a tool to convert characters encoding (AKA charsets), not
EOL encoding. I fear that won't do it, unfortunately.


Bye!Alain.
-- 
How to Report Bugs Effectively
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>


Re: New mutters 1st aid clues

2007-05-10 Thread Alain Bench
Hi Rado!

 On Friday, May 4, 2007 at 19:05:04 +0200, Rado Smiljanic wrote:

>> « if you believe users read manuals until end, I've got a bridge to sell 
>> you. »
> If I'm too psychological there, we can change it to the "plainlogical"
> order.

No need: I believe you (and my sig) convinced me. Each order better
targets one population, and less well another. And the reverse. My
"plainlogical" order would better suit the same users which would
probably browse the 4 links anyway. So your "psychological" order may be
more efficient for such a document, I finally agree. ;-)


Bye!Alain.
-- 
When you want to reply to a mailing list, please avoid doing so from a
digest. This often builds incorrect references and breaks threads.