tonioo / sievelib

Client-side Sieve and Managesieve library written in Python.
MIT License
46 stars 25 forks source link

parse roundcube managesieve plugin comments #105

Open chongma opened 3 years ago

chongma commented 3 years ago

When editing rules using roundcube managesieve plugin it puts the rule names at the top of each rule in the format, e.g

# rule:[job]
if anyof (header :contains "from" "noreply@domain.tld")
{
    fileinto "Job";
}

Is there any way to preserve that format? And also if possible to search by the rule name?

chongma commented 3 years ago

Hi, can anyone help me use this lib?

tonioo commented 3 years ago

@chongma This library was not designed to read Roundcube generated files.

chongma commented 3 years ago

@tonioo Roundcube and sieve are quite popular have you considered adding support?

helmut2 commented 2 years ago

A sightly more general question: Is there a way to retain the comments of an input file in the output? I've just started to look at sievelib and ran "python parser.py -v --tosieve somefile.sieve", which removed all comments. Do I overlook some option or is it necessarily so?

chongma commented 2 years ago

@helmut2 thanks this is what i was really asking. if there is some way to retain the comments. and better still to generate comments in the output.