SIEVE, CYRUS, POSTFIX: Problems with SIEVE

From: Manu (no email)
Date: Tue Jun 18 2002 - 07:02:49 EDT


Hi,

on my search for an excellent Imap Server, I finally landed on CyrusImap. I
compiled CyrusSASL 2.1.4 with the following:

./configure --enable-plain --disable-krb4 --with-sasldb
--with-openssl-dir=/usr/local/ssl --enable-login

Then I compiled the CyrusIMAP Server 2.1.4 with the following options:

export <Path to BerkeleyDB>
./configure --with-sasl=/usr/local/lib --with-perl

Everything went fine. Then I tested it and it worked. Then I compiled
Postfix from scratch and configured it as followed:

in MAIN.CF I added the following points:
myhostname = <my FQHN>
mydomain = <my FQHN>
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain $mydomain
mynetworks_style = subnet
mynetworks = 10.0.0.0/24, 127.0.0.0/8
relayhost = smtprelay.t-online.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mailbox_transport = cyrus (also tried with lmtp:unix:/var/imap/socket/lmtp)
fallback_transport = cyrus (also tried with lmtp:unix:/var/imap/socket/lmtp)

the rest ist standard.

MASTER.CF

lmtp unix - - n - - lmtp
cyrus unix - n n - - pipe
  flags=R user=cyrus argv=/usr/cyrus/bin/deliver -r ${sender} -m
${extension} ${user}

the rest is standard.
In the file ALIASES, I made an entry like "root: cyrus"

Mailing works as you can see (because this mail is posted through postfix.

Ok, lets go on with CYRUS.CONF
# standard standalone server implementation
START {
  # do not delete this entry!
  recover cmd="ctl_cyrusdb -r"
# snmp cmd="tugowar"
# acappush cmd="acap_push"
# ptloader cmd="doptclient"
  # this is only necessary if using idled for IMAP IDLE
# idled cmd="idled"
}
# UNIX sockets start with a slash and are put into /var/imap/sockets
SERVICES {
  # add or remove based on preferences
  imap cmd="imapd" listen="imap" prefork=5
  pop3 cmd="pop3d" listen="pop3" prefork=1
  sieve cmd="timsieved" listen="sieve" prefork=0
  # at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=1
  lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=1
  # this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp"
prefork=1
}
EVENTS {
  # this is required
  checkpoint cmd="ctl_cyrusdb -c" period=30
  # this is only necessary if using duplicate delivery suppression
  delprune cmd="ctl_deliver -E 3" period=1440
  # this is only necessary if caching TLS sessions
  tlsprune cmd="tls_prune" period=1440
}

Lets go on with my IMAPD.CONF
postmaster: postmaster
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus
sasl_pwcheck_method: auxprop
allowplaintext: yes
servername: <my FQHN>
quotawarn: 95
timeout: 30
poptimeout: 10
allowanonymouslogin: no
sendmail: /usr/sbin/sendmail
sievedir: /usr/sieve
sieveusehomedir: false
lmtpsocket: /var/imap/socket/lmtp

This is my configuration. But I fetch my mails from several pop3
mailaccounts and pass them through to postfix. Let me show you how i did this.

.FORWARD (located in root)
"|IFS=' ' && p=/usr/bin/procmail && test -f $p && exec $p -Yf- || exit 75
#root"

.FETCHMAILRC (located in root)
poll pop.gmx.de
proto pop3
user ""
password xxxxx
mda "/usr/bin/procmail -p /root/procmail.common CYUSER=ich"
fetchall

My virtual (not present as unix-user) Cyrus account is named "ich" as you
can see. Now let me show you my PROCMAIL.COMMON:

SHELL=/bin/sh
DELIVERMAIL=/usr/cyrus/bin/deliver
:0:$CYUSER.lock
| $DELIVERMAIL -a $CYUSER -m user.$CYUSER

Now you nearly know everything about my configuration. But let me show you
my jawmail.script file:

require "fileinto";
 if header :contains "subject" "123" { fileinto "INBOX.Drafts";
}

Ok, now the problem is that mails won't get filtered. All my mails are
placed in INBOX. But as you can see from the script above, I want to place all
messages with the subject "123" placed in INBOX.Drafts.
When I have a look in the mailheader, there is a line like "X-Sieve(?):
Sieve2.1.4" so the mail went through Sieve.
There is a link called default pointing to the jawmail.script in the right
directory (usr/sieve/i/ich/) and it is checked against the sieve test program
and it says me that it would place it in Drafts.

So I think my mistake is in the .forward, the procmail.common or the
fetchmailrc file. Please help me finding out, what I did wrong. I would be
very
pleased.

Thanx for your patience, Bye








Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD