]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/serv_smtpqueue.c
QUEUE-Rooms: give it an own view.
[citadel.git] / citadel / modules / smtp / serv_smtpqueue.c
index 72b73bf1a27580410c0739ebcdc3a3d2cde3b8e0..4853950445dd41cf3f607b1f8c969c24f01da98d 100644 (file)
  * The VRFY and EXPN commands have been removed from this implementation
  * because nobody uses these commands anymore, except for spammers.
  *
- * Copyright (c) 1998-2009 by the citadel.org team
+ * Copyright (c) 1998-2012 by the citadel.org team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
+ *  This program is open source software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3.
+ *  
+ *  
  *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  
+ *  
+ *  
  */
 
 #include "sysdep.h"
@@ -661,7 +661,8 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
        /*
         * Postpone delivery if we've already tried recently.
         */
-       if (((time(NULL) - MyQItem->ReattemptWhen) > 0) &&
+       if ((MyQItem->ReattemptWhen != 0) && 
+           (time(NULL) < MyQItem->ReattemptWhen) &&
            (run_queue_now == 0))
        {
                syslog(LOG_DEBUG, "SMTP client: Retry time not yet reached.\n");
@@ -903,7 +904,7 @@ void smtp_init_spoolout(void) {
         * Create the room.  This will silently fail if the room already
         * exists, and that's perfectly ok, because we want it to exist.
         */
-       CtdlCreateRoom(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1, 0, VIEW_MAILBOX);
+       CtdlCreateRoom(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1, 0, VIEW_QUEUE);
 
        /*
         * Make sure it's set to be a "system room" so it doesn't show up