info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Agent in batch mode for imap


From: William Gardella
Subject: Re: Agent in batch mode for imap
Date: Fri, 04 Jan 2013 17:12:42 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Could anyone happy with gnus-agent-batch with an imap server post his
> configuration ?
>
> Julien.

Julien, 

I believe you also asked about my config for using gnus-agent-batch as a
cron job on the GNU Emacs help mailing list (or the gnu.emacs.help
newsgroup, as the case may be), so here it is.  I use  `GNU Emacs 24.2.1
(i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-09 on biber,
modified by Debian' and `Gnus v5.13', and I haven't experienced the
phantom duplicate messages phenomenon yet.

Other probably irrelevant details:

I am running a persistent Debian Live system based on Debian Sid and
Grml ( http://grml.org/ ).

I use an Org Babel-based modular init setup, so instead of having a
.gnus.el, I have ~/org/init-gnus.org, of which the tangled contents
(init-gnus.el) are set out below.

Perhaps it is relevant that I no longer use the Gnus demon to get
informed immediately after the cron job does its thing, but I don't
recall seeing the issue you describe when I did.

-WGG

My crontab contains:

*/12 * * * * $HOME/bin/mail

The `mail' shell script is:

#!/bin/sh
PATH=/usr/bin:/bin

if [ -f /tmp/.$USER-gnusflag ];
        then exit 0;
fi
touch /tmp/.$USER-gnusflag
emacs -batch -l "$HOME/org/init-gnus.el" -f gnus-agent-batch >> /dev/null 2>&1
rm -f /tmp/.$USER-gnusflag

My Gnus config is as follows:

(setq gnus-select-method
      '(nntp "news.gmane.org"
             (nntp-open-connection-function nntp-open-tls-stream)
             (nntp-port-number 563)
             (nntp-address "news.gmane.org"))
      gnus-secondary-select-methods
      '((nnimap "imap.pitt.edu"
                (nnimap-server-port 993)
                (nnimap-stream ssl)
                (nnir-search-engine imap))
        (nnimap "imap.gmail.com"
                (nnimap-server-port 993)
                (nnimap-stream ssl)
                (nnir-search-engine imap)))
      message-send-mail-function 'message-send-mail-with-sendmail
      message-sendmail-envelope-from 'header
      message-sendmail-f-is-evil nil
      sendmail-program "~/bin/msmtp-stub"
      user-mail-address "gardellawg@gmail.com"
      user-full-name "William Gardella"
      message-alternative-emails "pitt.edu"
      gnus-posting-styles
      '(("pitt.edu"
         (address "wgg2@pitt.edu")
         (organization "University of Pittsburgh School of Law"))
        ("gmane.*"
         (X-Archive "encrypt"))) 
      tls-checktrust 'ask
      tls-program '("gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt 
-p %p %h"
                    "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt 
-p %p %h --protocols ssl3"
                    "openssl s_client -connect %h:%p -CAfile 
/etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof")
      gnus-agent-synchronize-flags t
      gnus-agent-queue-mail 'always
      gnus-agent-prompt-send-queue t
      gnus-asynchronous t
      gnus-agent-go-online t
      mm-text-html-renderer 'gnus-w3m
      gnus-summary-line-format
      (concat
       "%0{%U%R%z%}"
       "%4{%-20,20f%}" ;; name
       "  "
       "%3{│%}" "%1{%-20,25D%}" "%3{│%}" ;; date
       "  "
       "%1{%B%}"
       "%s\n")
      gnus-summary-display-arrow t
      gnus-completing-read-function 'gnus-ido-completing-read
      mail-user-agent 'gnus-user-agent
      read-mail-command 'gnus
      gnus-treat-display-smileys nil)
(autoload 'sendmail-send-it "sendmail")

-- 
I use grml (http://grml.org/)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]