<<< Date Index >>>     <<< Thread Index >>>

How to send PGP-encrypted mail non-interactively?



Hi!


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.

The private key does not contain a passphrase, the machine which has the
key and shall send the eMail is well secured. The mail content is
created by a script, default PGP encryption is activated:

set pgp_use_gpg_agent=yes
set pgp_autosign=yes
set pgp_autoencrypt=yes
set crypt_autopgp=yes
set crypt_autosign=yes
set crypt_autoencrypt=yes

I tried

  mutt -s "Test" -a <attachment> -i <body> <to_addr>

but Mutt started interactively and wanted me to acknowledge every single
process. I tried

  mutt -s "Test" -a <attachment> -i <body> <to_addr> < /dev/null

and

  mutt -x <to_addr>-s "Test" -a <attachment> < <body>

but Mutt sends the eMail unsigned and uncrypted.


Any idea how I could get my mail sent?


Thanks in advance,
Rene