Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. SRS failures when using chained Sieve redirects (double-forward)

SRS failures when using chained Sieve redirects (double-forward)

Scheduled Pinned Locked Moved Unsolved Support
4 Posts 4 Posters 356 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote last edited by d19dotca
    #1

    Today I ran into a problem when replacing Cloudron’s mailing list feature with Sieve filters. My setup was:

    • Mail arrives at info@{hostedDomainB} (mailbox).
    • Sieve filter on info@{hostedDomainB} redirects to alan@{hostedDomainB} and malcolm@{hostedDomainB}.
    • Both alan@{hostedDomainB} and malcolm@{hostedDomainB} mailboxes also have Sieve rules that redirect to their external {externalDomain} addresses.

    Expected:
    Messages should reach {externalDomain}.

    Observed:
    The second redirect (Alan/Malcolm → {externalDomain}) generates a malformed SRS MAIL FROM such as: SRS0=17e0=36={hostedDomainA}=dustin@{hostedDomainB}

    This string is invalid because it lacks the final @<srs-domain> (according to ChatGPT). The result is a permanent SMTP error: 550 5.1.0 … invalid address

    "550 5.1.0 <SRS0=17e0=36={hostedDomainA}=dustin@{hostedDomainB} invalid address '<SRS0=17e0=36={hostedDomainA}=dustin@{hostedDomainB}'"
    

    If I recreate info@{hostedDomainB} as a mailing list (what it used to be) instead of a mailbox with Sieve, forwarding works fine. So this seems to be a bug somehow in the way the filtering is handled when redirecting mail across multiple hops on Cloudron, where it seems to choke on the second hop.

    It looks like Haraka’s SRS plugin fails when a message is redirected twice via Sieve filters.

    Are we aware of any known issues on this? I couldn't find this in the forum posts earlier in a quick search but maybe I missed it. Ultimately if we have three mailboxes created, and one has a sieve filter to the other two mailboxes and those two mailboxes in-turn have a sieve filter each to send to the respective external addresses not hosted on Cloudron, then this is when the issue is seen.


    PS: (I was running low on time to send this into the forum here so used ChatGPT to format this quick summary as I was using it to help me troubleshoot earlier, so if it reads a little odd that's why, lol. Have to run but will be checking on this later today).

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    2
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote last edited by
      #2

      Thanks for reporting. Just leaving a note to myself to investigate this after 9.0 is out .

      1 Reply Last reply
      2
      • M Offline
        M Offline
        mattewwade06
        wrote last edited by
        #3

        it does look like the SRS handler is failing on the second redirect hop, producing a malformed “MAIL FROM” string and triggering a permanent SMTP error. The fact that using a mailing list instead of chained Sieve redirects works around it suggests the bug lies in how the filter chain is constructing or rewriting the SRS envelope.

        1 Reply Last reply
        2
        • avatar1024A Offline
          avatar1024A Offline
          avatar1024
          wrote last edited by
          #4

          There are a bunch posts on the forum reporting errors with forwards / redirect, and specifically when in come to double forward and SRS rewrite (hence very similar to this one). Would it be helpful to list them?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search