[Top][All Lists]

[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:49:01 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Julien Cubizolles <> writes:
>> Could anyone happy with gnus-agent-batch with an imap server post his
>> configuration ?
>> 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
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 ( ).

- I use an Org Babel-based modular init setup, so instead of having a
  .gnus.el, I have ~/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.


My crontab contains:

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

The `mail' shell script is:


if [ -f /tmp/.$USER-gnusflag ];
        then exit 0;
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 ""
             (nntp-open-connection-function nntp-open-tls-stream)
             (nntp-port-number 563)
             (nntp-address ""))
      '((nnimap ""
                (nnimap-server-port 993)
                (nnimap-stream ssl)
                (nnir-search-engine imap))
        (nnimap ""
                (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 ""
      user-full-name "William Gardella"
      message-alternative-emails ""
         (address "")
         (organization "University of Pittsburgh School of Law"))
         (X-Archive "encrypt"))) 
      tls-checktrust 'ask
      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
       "%4{%-20,20f%}" ;; name
       "  "
       "%3{│%}" "%1{%-20,25D%}" "%3{│%}" ;; date
       "  "
      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")

reply via email to

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