Hello community, please help me with the following issue:
I have currently set up mailcow to be less dependent on the available storage space and restrictions of some mail providers. My goal is to import mails from e.g. web.de or gmail into my inbox directory via “sync job”. The sync job itself works without problems, but I would like to run rspamd during the sync, so that rspamd can proccess the imported mails. Does anyone know how I can do this?

Translated with www.DeepL.com/Translator (free version)

please let me know if you need further informations, or maybe if I didn’t clearly enough describe the problem - thank you in advance

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

6 months later
  • [deleted]

Is there already a solution how I still route the mails through RSPAMD when syncing?

No, that cannot be done by Rspamd. Because that works only with the MTA (postfix).
An IMAP sync job works directly with dovecot.
So you need to either take care of the source mailbox that its spam free, or use an external scanner, that scans the source mailbox for spam, like this for example:
How to setup Spamassassin to remotely remove spam messages from an IMAP account, and trigger KMail to update its cached IMAP folders - verot.net

    esackbauer Thanks for that reply, I put a post on the forum a while back to ask a similar question and had already thought that the sync job feature was bypassing rspamd etc. and delivering messages directly to Dovecot, but confirmation is always good.

    I like the remote spam assassin idea, I’ll look into that further.

    You could use an external instance of Fetchmail to retrieve the mails from your external mail accounts and deliver them to mailcow via SMTP.

      thn80 Thanks, that’s also an interesting way of doing it, possibly slightly better as it will go through one set of filters, spam and antivirus checking (all via mailcow) and doesn’t need spam assassin training as well.

      There are a few different posts all surrounding the same idea and the hope that it could all be done via the mailcow UI which provides all the features that myself and the others posting need but not quite in the correct pipeline.

      a year later

      Did you find a solution with fetchmail? I like to do the same … fetching mails from gmx to my mailcow with checking of spam and antivirus and filters

        Ambo Hi Ambo, no, I never sorted a solution that put imported mail through rspamd. The account I was trying to import from was an old account that was being replaced with one I was hosting via mailcow so it was a low volume import (just to make sure emails to the old address were captured) and had basic antispam and antivirus at the provider’s end, so I decided the risk was okay in the short term, and I’ve now stopped importing mail from this account.

        No one is typing