Re: Sieve, and general configuration
Дилян Палаузов <[email protected]> Fri, 14 Mar 2025 19:32:08 +0200
| Newsgroups | gmane.mail.imap.cyrus |
|---|---|
| Message-ID | <[email protected]> |
Hello,
if sieveshell does not give error, then the script is uploaded. It can be found in plain text in the #sieve mailbox of the user on the file system, and in bytecode under sievedir as in imapd.conf . This bytecode can be kind of decompiled with sieved. Older Cyrus versions put both bytecode and source under the sievedir directory, there is no #sieve mailbox. So first step is to find what script is actually on the server.
If the redirect action fails, it might be because sendmail in imapd.conf is not configured properly. I suggest to use a different action, like fileinto: if a criterion for the incoming email is matched ( require "fileinto"; if header :contains "Subject" "ufufaf" { fileinto :flags "\\Seen" "uhu"; } ) then put the email in a specific folder - here uhu - which existed before the email arrived. The folder/mailbox separator in Sieve scripts (if a sub-sub mailbox is targeted, as aha under uhu)
depends on a setting in imapd.conf .
The log action does send a message to syslog with INFO type, see imap/lmtp_sieve.c:sieve_log() . This is clearly stated at https://www.cyrusimap.org/imap/reference/admin/sieve.html#log . So messages unlikely go to <configdirectory>/log/smtpclient.smtp_backend .
Greetings
Дилян
-----Original Message-----
From: whitepj via Info <[email protected]>
Reply-To: Info <[email protected]>
To: Info <[email protected]>
Subject: Sieve, and general configuration
Date: 13/03/25 12:43:41
Hi All,
Apologies for posting what are probably basic FAQs - please point me to relevant HOWTO webpages if available. Background: After an embarrassingly "more than 2 days", I have finally got a basic instance of Cyrus IMAP working. I am now able to receive emails, and to view messages in a client. My next test involves enabling sieve scripts -- but I don't seem to be able to find a lot of info about how to set up, test, administer and maintain. That said, I have never used sieve scripts before.
There are a couple of posts on this list that I've found:
https://cyrus.topicbox.com/groups/info/T9b1dfc1611f58964
https://cyrus.topicbox.com/groups/info/Tbfa58387b6aa5356
The 1st appearing the most helpful -- but I haven't been able to use this info to resolve the issue. Like the original poster, I find that there is sparse information appearing to help me debug the issue, and point to where I have gone wrong.
My sieve script is below (I've tried two versions: plain, and then with the attempted debugging as per previous thread). This was then uploaded and installed using the following cmd.
> sieveshell --user=<user> --realm=<virtual_domain> --password=<pass> 192.168.1.2
> > put test.sieve
> > activate test.sieve
> > list
> test.sieve <- active script
> > quit
test email then submitted via exim, delivered through lmtp, and viewed in email client. However, I am not receiving any copy email forwarded by the sieve. Don't know whether this is because the sieve is not being run, or if it is, but cannot send. Syslog only shows the lmtpunix lines 'Delivered:', and 'USAGE'.
As a side issue (included only because it may indicate something relevant, not as a plea for help), I have gyrus installed on a separate laptop. Whilst I can log in as 'cyrus' (designated as an admin, with no mailbox set up), it shows almost nothing. Users is 'greyed out' with a count of zero, as is most everything else. Logging in as a regular user with a mailbox gives the same result.
Can anyone give pointers on how I complete this, and get working please?
test.sieve
> require "vnd.cyrus.log";
> log "Script starting!";
> if true {
> redirect "user@another_domain.com";
> keep;
> }
> log "Script ending.";
Cyrus / Info / seediscussions +participants +delivery options
Permalink
------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T81451bd9b40fd943-Meadc159af30cad51674f835e
Delivery options: https://cyrus.topicbox.com/groups/info/subscription