aderrose

  • Sep 14, 2024
  • Joined Oct 21, 2021
  • 2 discussions
  • 7 posts
  • 0 best answers
  • Post posted... wait what?
  • 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.

  • 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.

  • 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.

  • [deleted] Hi,

    No, I never found a resolution to pulling the mail with mailcow and filtering, so I’m relying on the source to push mail to mailcow and having a filter sort the mail, which works well enough.

    The problem I was getting is that any spam messages which arrived at the source account were being forwarded along with the good mail but rspamd was rejecting the forwarded spam and sending an error message back to the source account, after enough failed attempts to deliver the spam message the source account gave up on forwarding to mailcow.

    Turning on spam filtering at the source seems to work fairly well, and most of the spam isn’t forwarded and occasional failures to deliver messages doesn’t seem to upset the source account. I would prefer to have everything handled by mailcow, but that doesn’t seem possible.

  • Is it possible to filter messages received via a sync job?

    Currently, I’m relying on a third-party account to forward messages to a mailcow account and using sieve in SOGo to move it to a specific folder, this works well but not all messages are being forwarded from the third-party.

    I’m looking into pulling mail from mailcow via Sync Jobs but sieve filters don’t seem to be applied to mail received this way, I’ve tried pre-filter which stops a sync job from pulling mail and a post filter which fetches mail but doesn’t seem to do any filtering.

    My attempt at a filter is as follows:

    require ["fileinto", "editheader", "variables"];
    
    if address "To" "pneu*****@*****media.com" {
    	if header :matches "Subject" "*" {
    		set "subject" "$(1)";
    	}
    
    	deleteheader "Subject:";
    	addheader :last "Subject" "[VM] $(subject)";
    	fileinto "INBOX/Pneu*****";
    }

    The idea is to change the subject so third-party messages can be identified and move it to a different folder.

    Any help would be appreciated.

  • Hi Felix, thanks for getting back to my question. I appreciate the time you’ve put in already with Borgmatic and thanks to it’s de-duped backups I can keep many more snapshots and still use less disc space than before.

    I had a look into adding the extra bits as new sources and I can’t remember which it was but one would always end up getting stuck during a backup run while the other two would add fine.

    While I’d say I know enough about running a mail server, I didn’t feel confident with the changes I made so I stuck with Borgmatic using your guide and I still use the “official” script to backup postfix, rspamd and redis.

  • I’ve just set up Borgmatic to back up my Mailcow as per the instructions at mailcow.email Icon mailcow: dockerized - Blog

    and I’ve completed a restore to a new virtual machine and all seems okay.

    I’ve noticed that Borgmatic is set to back up the vmail and crypt volumes and the database, but it doesn’t back up postfix, rspamd, or redis like the official backup script does.

    Is this a problem? Do I need to continue backing these up via the official script?