Hi,

* David T-G [05/16/02 19:04:13 CEST] wrote:
> ...and then Rocco Rutte said...
> % I just ask without much hope of success. I guess that there's
> % no way to hand some text over to mutt and force it to encrypt
> % it with a public key (uid is known)?
> % 
> % Okay, I knew it wouldn't work.

> I wouldn't give up yet.  I do think it would take some clever
> command-line switches and perhaps a little mime wrapping, though.

Sounds like overkill since the solution (below) is much
easier.

> % I need to send a file encrypted to an account via a cronjob.
> % Is there any chance doing it in mutt or do I really have to
> % write some default-headers to a file and append the encrypted
> % to text to be piped to some sort of sendmail?

> You might have to write these headers,

I know, but that isn't a problem typing the text actually will
take longer than thinking about what to type.

> % I guess this will work. Is there anything I have to pay
> % attention to when having encrypted text inline with content/
> % type: text/plain? Does mutt need anything special to correctly
> % recognize and decrypt it via $check_ppg_traditional?

> This is certainly a valid approach, and probably the easiest to implement.
> No, you shouldn't need anything special; a simple

>   cat file | gpg -ea -r 0xNNNNNNN | mutt -s "cron job" recipient

Looks good, thanks.

> will do, and then you can read it with an esc-P on the other end (still
> thinking about a message-hook that will automatically detect that and hit
> the esc-P for us...).  Note that mutt is used trivially here; you could
> use mailx just as well.

Or I could use 'mutt -x'.

> Above all, of course, is the question HAVE YOU TRIED IT FIRST? ;-)

No, I haven't tried it. I guess I'll have to play around and
try a few things. In fact, I need two different solutions. One
as the above to send out some files via cron. 

The second is a bit more complicated. The command will be
placed in /etc/aliases as an alias for a local user. All mail
to that user should be encrypted with one of my public keys
and forwarded to me. I've allready installed procmail which
seems to be a better solution than /etc/aliases.

Cheers, Rocco.

Reply via email to