bk99.de entertain the web since 1997

Migrating procmail rules to Sieve with a real parser

Summary

Manuel Schmitt replaces an unreliable procmail-to-Sieve converter with his own parser with a deliberately limited scope. The earlier converter was partly based on free scripts, including earlier work from Dovecot. The new converter was rewritten completely in-house.

Ideas

  • A parser understands rule structures more reliably than a series of simple text replacements.
  • Rare nested procmail blocks deliberately remain outside the supported scope.
  • A migration may leave out expert cases if it clearly states these limits.

Insights

  • Good converters gain trust through precise limits rather than pretended completeness.
  • Old mail filters are executable operational logic and deserve tests like other source code.

Facts

  • Nested blocks with curly braces are not translated automatically.

Recommendations

  • Test converted rules with a representative corpus of messages.
  • Keep the procmail rules and document every manual Sieve adjustment.

References

Read the original article on Hostblogger

Search the Web Archive