[#6509] Time period - vacation error
Summary Time period - vacation error
Queue Ingo
Queue Version 1.2-RC2
Type Bug
State Assigned
Priority 2. Medium
Owners Matt Selsky <selsky (at) columbia (dot) edu>
Requester linuxbox (at) wavenet (dot) at
Created 03/20/2008 (52 days ago)
Due 03/20/2008 (52 days ago)
Updated 05/06/2008 (5 days ago)
Assigned 05/06/2008 (5 days ago)
Resolved
Attachments procmail.patch Download
Milestone
Patch

History
05/06/2008 Matt Selsky Comment #9
New Attachment: procmail.patch Download
Reply to this comment
Please try this patch.  If you can get more feedback from your procmail experts on what's wrong with our generated .procmailrc that would be great.
05/06/2008 Chuck Hagenbuch State ⇒ Assigned
Assigned to Matt Selsky
 
05/06/2008 linuxbox (at) wavenet (dot) at Comment #8 Reply to this comment
Hi Mat!

Thank you for your work.

I patched procmail.php and it produces the file on the bottom but
does not send an reply email (find the log also on the bottom) -
BUT
it generates a file named ":0" in my home directory - output
you can find also at the bottom

lg
Martin

.procmailrc
-----------------------------------------------------
##### Abwesenheit #####
:0
{
  FILEDATE=`test -f '.vacation.martin.hochreiter' && ls -lcn --time-style=+%s '.vacation.martin.hochreiter' | awk '{ print $6 + (172800) }'`
  DATE=`date +%s`
  DUMMY=`test -f '.vacation.martin.hochreiter' && test $FILEDATE -le $DATE && rm '.vacation.martin.hochreiter'`
  START=1210024800
  END=1210111200

  :0 Whc: vacation.lock
  * ? test $DATE -gt $START && test $END -gt $DATE
  :0 Whaf
  * ^TO_martin.hochreiter
  * !^X-Loop: martin.hochreiter
  * !^X-Spam-Flag: YES
  * !^From.*root@xxx.xx
  * !^From.*webmaster@xxx.xx
  * !^From.*log@xxx.xx,
  * !^FROM_DAEMON
  | formail -rD 8192 .vacation.martin.hochreiter
    :0 ehc
    | (formail -rI"Precedence: junk" \
       -a"From: <martin.hochreiter>" \
       -A"X-Loop: martin.hochreiter" \
       -i"Subject: Urlaubsmeldung" \
       -i"Content-Transfer-Encoding: quoted-printable" \
       -i"Content-Type: text/plain; charset=UTF-8" ; \
-----------------------------------------------------


procmail log:
--------------------------------------------------------------
procmail: Skipped "Whaf"
procmail: Skipped "* ^TO_martin.hochreiter"
procmail: Skipped "* !^X-Loop: martin.hochreiter"
procmail: Skipped "* !^X-Spam-Flag: YES"
procmail: Skipped "* !^From.*root@xxx.xx"
procmail: Skipped "* !^From.*webmaster@xxx.xx"
procmail: Skipped "* !^From.*log@xxx.xx,"
procmail: Skipped "* !^FROM_DAEMON"
procmail: Skipped "| formail -rD 8192 .vacation.martin.hochreiter"
procmail: Skipped "Whaf"
procmail: Skipped "* ^TO_martin_hochreiter"
procmail: Skipped "* !^X-Loop: martin_hochreiter"
procmail: Skipped "* !^X-Spam-Flag: YES"
procmail: Skipped "* !^From.*root@xxx.xx"
procmail: Skipped "* !^From.*webmaster@xxx.xx"
procmail: Skipped "* !^From.*log@xxx.xx,"
procmail: Skipped "* !^FROM_DAEMON"
procmail: Skipped "| formail -rD 8192 .vacation.martin_hochreiter"
From martin.hochreiter@yyy.yy  Tue May  6 13:35:10 2008
Subject: test
  Folder: /home/martin_hochreiter/Maildir/new/1210073710.10309_2.linux     4155
--------------------------------------------------------------

produced file :0   :
------------------------------------------------------------------
From martin.hochreiter@yyy.yy  Tue May  6 13:35:10 2008
Return-Path: <martin.hochreiter@yyy.yy>
X-Original-To: martin_hochreiter@mail.xxx.xx
Delivered-To: martin_hochreiter@mail.xxx.xx
Received: from localhost (localhost [127.0.0.1])
        by mail.xxx.xx (Postfix) with ESMTP id 3B931B96FB
        for <martin_hochreiter@mail.xxx.xx>; Tue,  6 May 2008 13:35:10 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.xxx.xx
Received: from mail.xxx.xx ([127.0.0.1])
        by localhost (mail.xxx.xx [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id DRGpnCaxqS5q
        for <martin_hochreiter@mail.xxx.xx>;
        Tue,  6 May 2008 13:35:07 +0200 (CEST)
Received: from scalix.yyy.yy (scalix.yyy.yy [195.202.144.3])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (No client certificate requested)
        by mail.xxx.xx (Postfix) with ESMTPS id 6BD44B96F5
        for <martin.hochreiter@xxx.xx>; Tue,  6 May 2008 13:35:06 +0200 (CEST)
MailScanner-NULL-Check: 1210678495.59215@UHHnSw//utRH4988ysGNag
Received: from scalix.yyy.yy (localhost [127.0.0.1])
        by scalix.yyy.yy (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id m46BYtqa026770
        for <martin.hochreiter@xxx.xx>; Tue, 6 May 2008 13:34:55 +0200
Received: from [10.222.0.240] (fwint.yyy.yy [195.202.144.1])
    by scalix.yyy.yy (Scalix SMTP Relay 11.3.0.11339)
    via ESMTP; Tue, 06 May 2008 13:34:20 +0200 (CEST)
Date: Tue, 6 May 2008 13:34:23 +0200
From: Martin Hochreiter <martin.hochreiter@yyy.yy>
To: martin.hochreiter@xxx.xx
Message-ID: <4820423F.3010008@yyy.yy>
Subject: test
x-scalix-Hops: 1
User-Agent: Thunderbird 2.0.0.12 (X11/20080227)
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="------------070109070806060504000007"
X-FH-StP-MailScanner-Information: Please contact the ISP for more information
X-MailScanner-ID: m46BYtqa026770
X-FH-StP-MailScanner: Found to be clean
X-FH-StP-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
        score=-104.264, required 3, autolearn=not spam, ALL_TRUSTED -1.80,
        BAYES_00 -2.60, HTML_50_60 0.13, HTML_MESSAGE 0.00,
        USER_IN_WHITELIST -100.00)
X-FH-StP-MailScanner-From: martin.hochreiter@yyy.yy

From martin.hochreiter@yyy.yy  Tue May  6 13:35:10 2008
Return-Path: <martin.hochreiter@yyy.yy>
X-Original-To: martin_hochreiter@mail.xxx.xx
Delivered-To: martin_hochreiter@mail.xxx.xx
Received: from localhost (localhost [127.0.0.1])
        by mail.xxx.xx (Postfix) with ESMTP id 3B931B96FB
        for <martin_hochreiter@mail.xxx.xx>; Tue,  6 May 2008 13:35:10 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.xxx.xx
Received: from mail.xxx.xx ([127.0.0.1])
        by localhost (mail.xxx.xx [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id DRGpnCaxqS5q
        for <martin_hochreiter@mail.xxx.xx>;
        Tue,  6 May 2008 13:35:07 +0200 (CEST)
Received: from scalix.yyy.yy (scalix.yyy.yy [195.202.144.3])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (No client certificate requested)
        by mail.xxx.xx (Postfix) with ESMTPS id 6BD44B96F5
        for <martin.hochreiter@xxx.xx>; Tue,  6 May 2008 13:35:06 +0200 (CEST)
MailScanner-NULL-Check: 1210678495.59215@UHHnSw//utRH4988ysGNag
Received: from scalix.yyy.yy (localhost [127.0.0.1])
        by scalix.yyy.yy (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id m46BYtqa026770
        for <martin.hochreiter@xxx.xx>; Tue, 6 May 2008 13:34:55 +0200
Received: from [10.222.0.240] (fwint.yyy.yy [195.202.144.1])
    by scalix.yyy.yy (Scalix SMTP Relay 11.3.0.11339)
    via ESMTP; Tue, 06 May 2008 13:34:20 +0200 (CEST)
Date: Tue, 6 May 2008 13:34:23 +0200
From: Martin Hochreiter <martin.hochreiter@yyy.yy>
To: martin.hochreiter@xxx.xx
Message-ID: <4820423F.3010008@yyy.yy>
Subject: test
x-scalix-Hops: 1
User-Agent: Thunderbird 2.0.0.12 (X11/20080227)
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="------------070109070806060504000007"
X-FH-StP-MailScanner-Information: Please contact the ISP for more information
X-MailScanner-ID: m46BYtqa026770
X-FH-StP-MailScanner: Found to be clean
X-FH-StP-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
        score=-104.264, required 3, autolearn=not spam, ALL_TRUSTED -1.80,
        BAYES_00 -2.60, HTML_50_60 0.13, HTML_MESSAGE 0.00,
        USER_IN_WHITELIST -100.00)
X-FH-StP-MailScanner-From: martin.hochreiter@yyy.yy
--------------------------------------------------------------

05/04/2008 Matt Selsky Comment #7
State ⇒ Feedback
Taken from Ben Chavet
Reply to this comment
03/27/2008 Jan Schneider State ⇒ Assigned
Assigned to Ben Chavet
 
03/27/2008 linuxbox (at) wavenet (dot) at Comment #6 Reply to this comment
Hi jan,

So .. I am a little bit the man in the middle:
That's what I got from the procmail list to the
code Ingo generates:

--------------------------------------------------------------------------------------------
:0 Whc: vacation.lock
| /bin/sh -c 'if [ $DATE -gt $START ]; then if [ $END -gt $DATE ]; then true; else false;fi;fi;'
--------------------------------------------------------------------------------------------
This will never work...
It should be:

    :0 Whc: vacation.lock
    * ? test $DATE -gt $START && test $END -gt $DATE
   
--------------------------------------------------------------------------------------------
03/25/2008 Jan Schneider Comment #5
State ⇒ Resolved
Reply to this comment
> I installed ingo from scratch - without any advancments (see procmail.log).

That's not true, the error message that you reported is gone, as expected.

> Additionally the sender gets a mail returned with:
>
> ---------------------------------------------------------------------------------------
> <foo@bar.rk-lilienfeld.at>: Host or domain name not found. Name service error
>     for name=bar.rk-lilienfeld.at type=AAAA: Host not found
> ---------------------------------------------------------------------------------------

This has nothing to do with Ingo, this is either a misconfigured mail server, or some invalid email address being used.

> procmail.log
> ---------------------------------------------------------------------------------------
>   Folder: /home/office/Maildir//.SPAM/new/1206436443.4314_0.linux1   
>      1821
> procmail: Error while writing to " /bin/sh -c 'if [ $DATE -gt $START
> ]; then if [ $END -gt $DATE ]; then true; else false;fi;fi;'"

This error message is not very helpful because it doesn't say what exactly the error is. This still is not an Ingo issue, but probably a problem with your procmail setup. Try running that code manually and see what happens. For further help ask on the Ingo or Procmail mailing list.
03/25/2008 linuxbox (at) wavenet (dot) at Comment #4 Reply to this comment
Hi Jan,

I installed ingo from scratch - without any advancments (see procmail.log).
Additionally the sender gets a mail returned with:

---------------------------------------------------------------------------------------
<foo@bar.rk-lilienfeld.at>: Host or domain name not found. Name service error
    for name=bar.rk-lilienfeld.at type=AAAA: Host not found
---------------------------------------------------------------------------------------

Maybe there is missing a package or something on Suse?

procmail.log
---------------------------------------------------------------------------------------
  Folder: /home/office/Maildir//.SPAM/new/1206436443.4314_0.linux1         1821
procmail: Error while writing to " /bin/sh -c 'if [ $DATE -gt $START ]; then if [ $END -gt $DATE ]; then true; else false;fi;fi;'"
  Folder: /home/martin_hochreiter/Maildir/new/1206436500.4359_2.linux1     1782
procmail: Error while writing to " /bin/sh -c 'if [ $DATE -gt $START ]; then if [ $END -gt $DATE ]; then true; else false;fi;fi;'"
procmail: Error while writing to " /bin/sh -c 'if [ $DATE -gt $START ]; then if [ $END -gt $DATE ]; then true; else false;fi;fi;'"
---------------------------------------------------------------------------------------
03/22/2008 linuxbox (at) wavenet (dot) at Comment #3 Reply to this comment
> Are you sure you are using 1.2-RC2? Because this has been fixed in RC2.

Thats what the horde configuration page says:
Filter (ingo)  H3 (1.2-RC2)

I'll try to install a full version of ingo (I used the patch)- I did had
troubles with paching dimp too, if I use the "full" version it worked.

I'll report afterwards
lg

lg


03/21/2008 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Are you sure you are using 1.2-RC2? Because this has been fixed in RC2.
03/20/2008 linuxbox (at) wavenet (dot) at Comment #1
Patch ⇒
Milestone ⇒
Queue ⇒ Ingo
Due ⇒ 03/20/2008
Summary ⇒ Time period - vacation error
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Reply to this comment
Hi!

If you set up a starting an ending time in the prebuild vacation rule of ingo then you got the following error message in the procmail.log (and no vacation answer mail of course)

/bin/sh: line 0: [: 1177587873-gt: unary operator expected
procmail: Error while writing to " /bin/sh -c 'if [ $DATE-gt $START ]; 
then if [ $END -gt $DATE ]; then true; else false;fi;fi;

I am using the latest RC Versions of Horde, Imp and Ingo on a Suse 10.1 Linux (Kernel 2.6.16.54-0.2.5)

Package Versions
Procmail 3.22-56
postfix 2.2.9-10
courier-imap 4.1.2-47.1
php 5.1.2-29.50
apache 2.2.6-4.2
mysql  5.0.26-12.16