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
  • 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. What is the intention of /home/yellowtent/boxdata/mail/spamd ?

What is the intention of /home/yellowtent/boxdata/mail/spamd ?

Scheduled Pinned Locked Moved Solved Support
spamassassinspam
34 Posts 3 Posters 4.3k Views 3 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 on last edited by girish
      #1

      I was just browsing around the file system out of curiosity and interest, and found /home/yellowtent/boxdata/mail/spamd and didn't see any references to this in the forum or documentation so figured it'd be a good chance to learn how that part of the Cloudron server works. I assume this is where SpamAssassin does it's learning from Spam mailboxes and stores it's Bayes tokens and such?

      In my case, I saw a ton of folders in there and oddly enough for many mailboxes that don't exist such as my username@differentDomain.tld and I suspect this may have to do with a long time ago when I setup a bunch of aliases in Rainloop to quickly switch to different domains hosted on my server for postmaster/webmaster, etc. I changed tactics a long time ago though and so unsure if this is just old left-over cruft. And if so, is it safe for me to remove those to clean it out a bit?

      --
      Dustin Dauncey
      www.d19.ca

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

        Yes, correct. /home/yellowtent/boxdata/mail/spamd contains:

        • per-user spamassassin training information. Each spam directory contains bayes_seen and bayes_tok files (bayes is the algorithm for filtering spam).
        • custom spamassassin rules in custom.cf
        • spam blacklist in acl.cf

        You can safely delete the random mailbox directories.

        d19dotcaD 2 Replies Last reply
        1
        • girishG girish

          Yes, correct. /home/yellowtent/boxdata/mail/spamd contains:

          • per-user spamassassin training information. Each spam directory contains bayes_seen and bayes_tok files (bayes is the algorithm for filtering spam).
          • custom spamassassin rules in custom.cf
          • spam blacklist in acl.cf

          You can safely delete the random mailbox directories.

          d19dotcaD Offline
          d19dotcaD Offline
          d19dotca
          wrote on last edited by
          #3

          @girish Perfect! Thanks so much for the speedy and detailed reply. 🙂

          --
          Dustin Dauncey
          www.d19.ca

          1 Reply Last reply
          0
          • girishG girish

            Yes, correct. /home/yellowtent/boxdata/mail/spamd contains:

            • per-user spamassassin training information. Each spam directory contains bayes_seen and bayes_tok files (bayes is the algorithm for filtering spam).
            • custom spamassassin rules in custom.cf
            • spam blacklist in acl.cf

            You can safely delete the random mailbox directories.

            d19dotcaD Offline
            d19dotcaD Offline
            d19dotca
            wrote on last edited by
            #4

            @girish In looking through the directory in more detail, I see what seems like a lot of duplicates, with the expected mailbox and then the same mailbox but at the primary domain of the server. Is that as designed? Seems strange, and not 100% across all of them, but many of them.

            Also what would be the worst case if I emptied that directory, would it just be that it has to re-learn the spam stuff from the users spam folders?

            --
            Dustin Dauncey
            www.d19.ca

            girishG 1 Reply Last reply
            0
            • robiR Offline
              robiR Offline
              robi
              wrote on last edited by
              #5

              is it using a lot of space?
              is it causing some other filtering issue?

              Conscious tech

              d19dotcaD 1 Reply Last reply
              0
              • d19dotcaD d19dotca

                @girish In looking through the directory in more detail, I see what seems like a lot of duplicates, with the expected mailbox and then the same mailbox but at the primary domain of the server. Is that as designed? Seems strange, and not 100% across all of them, but many of them.

                Also what would be the worst case if I emptied that directory, would it just be that it has to re-learn the spam stuff from the users spam folders?

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @d19dotca said in What is the intention of /home/yellowtent/boxdata/mail/spamd ?:

                Also what would be the worst case if I emptied that directory, would it just be that it has to re-learn the spam stuff from the users spam folders?

                Yes, it just loses training data, that's all.

                Can you give me an example of what you mean by "the expected mailbox and then the same mailbox but at the primary domain of the server" ?

                d19dotcaD 1 Reply Last reply
                0
                • robiR robi

                  is it using a lot of space?
                  is it causing some other filtering issue?

                  d19dotcaD Offline
                  d19dotcaD Offline
                  d19dotca
                  wrote on last edited by
                  #7

                  @robi Not causing any real issues to my knowledge but I like having a “clean” system where I can. And am interested in how those directories get handled under different situations (like when a mailbox is deleted) in case not all use-cases are accounted for. Because it seems to me there are a lot of old mailbox references here not to mention the seemingly duplicates for several of them too (duplicate first part but different domain where they don’t actually have a mailbox on that domain). Thus the questions. 🙂

                  --
                  Dustin Dauncey
                  www.d19.ca

                  1 Reply Last reply
                  1
                  • girishG girish

                    @d19dotca said in What is the intention of /home/yellowtent/boxdata/mail/spamd ?:

                    Also what would be the worst case if I emptied that directory, would it just be that it has to re-learn the spam stuff from the users spam folders?

                    Yes, it just loses training data, that's all.

                    Can you give me an example of what you mean by "the expected mailbox and then the same mailbox but at the primary domain of the server" ?

                    d19dotcaD Offline
                    d19dotcaD Offline
                    d19dotca
                    wrote on last edited by d19dotca
                    #8

                    @girish Okay perfect, I may just delete most of them then at some point to sort of “reset” them. I’ll perhaps send you a listing of the folder over email because I’d like to protect their privacy. But as an example:

                    Let’s say I have a mailbox on example.com, the listing in this directory will have two in some cases for my mailbox:

                    • dustin@example.com
                    • dustin@<primaryDomainOfCloudronServer>

                    And I’m unsure why that is. There’s also a few that were never mailboxes so I have no idea how or why they were created. I can recognize most of them but there’s one or two I have absolutely no idea what it’s referencing as it was never a mailbox nor a name I even recognize. So it’s seem quite odd. I’ll email you a listing though and won’t delete anything yet in case you want to look into it on why and how they could have been created and such.

                    --
                    Dustin Dauncey
                    www.d19.ca

                    robiR 1 Reply Last reply
                    0
                    • d19dotcaD d19dotca

                      @girish Okay perfect, I may just delete most of them then at some point to sort of “reset” them. I’ll perhaps send you a listing of the folder over email because I’d like to protect their privacy. But as an example:

                      Let’s say I have a mailbox on example.com, the listing in this directory will have two in some cases for my mailbox:

                      • dustin@example.com
                      • dustin@<primaryDomainOfCloudronServer>

                      And I’m unsure why that is. There’s also a few that were never mailboxes so I have no idea how or why they were created. I can recognize most of them but there’s one or two I have absolutely no idea what it’s referencing as it was never a mailbox nor a name I even recognize. So it’s seem quite odd. I’ll email you a listing though and won’t delete anything yet in case you want to look into it on why and how they could have been created and such.

                      robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #9

                      @d19dotca is this a very old cloudron that went through lots of upgrades?

                      Conscious tech

                      d19dotcaD 1 Reply Last reply
                      0
                      • robiR robi

                        @d19dotca is this a very old cloudron that went through lots of upgrades?

                        d19dotcaD Offline
                        d19dotcaD Offline
                        d19dotca
                        wrote on last edited by
                        #10

                        @robi It's maybe 1.5 years old, so it's been through a decent amount but nothing crazy, no.

                        --
                        Dustin Dauncey
                        www.d19.ca

                        1 Reply Last reply
                        0
                        • girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #11

                          @d19dotca We had a bug a year or so ago where spam detection was being done with incorrect addresses. It has the symptoms you mention. You will see random addresses, cc addresses etc there. You can safely delete them, they won't reappear. If they reappear, let us know.

                          d19dotcaD 2 Replies Last reply
                          1
                          • girishG girish

                            @d19dotca We had a bug a year or so ago where spam detection was being done with incorrect addresses. It has the symptoms you mention. You will see random addresses, cc addresses etc there. You can safely delete them, they won't reappear. If they reappear, let us know.

                            d19dotcaD Offline
                            d19dotcaD Offline
                            d19dotca
                            wrote on last edited by
                            #12

                            @girish Oh that's good to know, sounds good then. I'll just go ahead and empty that folder (minus a couple of mailboxes) to make it easier since it'll just regenerate what's needed/used too.

                            --
                            Dustin Dauncey
                            www.d19.ca

                            1 Reply Last reply
                            0
                            • girishG girish

                              @d19dotca We had a bug a year or so ago where spam detection was being done with incorrect addresses. It has the symptoms you mention. You will see random addresses, cc addresses etc there. You can safely delete them, they won't reappear. If they reappear, let us know.

                              d19dotcaD Offline
                              d19dotcaD Offline
                              d19dotca
                              wrote on last edited by
                              #13

                              @girish Just a quick question: When would the folders get re-generated by Cloudron?

                              For context: I moved all the files inside of that directory to /home/ubuntu/spamd-backup/ just so I had it in case I needed to restore. So the directory was then empty, and I restarted the mail service and it auto-generated the acl.cf and custom.cf files, but I don't yet see any user mailbox folders in there. Is that expected?

                              --
                              Dustin Dauncey
                              www.d19.ca

                              1 Reply Last reply
                              0
                              • d19dotcaD Offline
                                d19dotcaD Offline
                                d19dotca
                                wrote on last edited by
                                #14

                                Okay I see a couple of mailboxes regenerated in there now so that's good. I feel less scared. haha. Still not sure when it gets generated though, I had tried for example moving one email to my own spam folder and checked but didn't see it generated. Any insight there?

                                --
                                Dustin Dauncey
                                www.d19.ca

                                1 Reply Last reply
                                0
                                • girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #15

                                  They get created when the spam filter learnt something about the address. This can happen because of user action - user marked spam or ham (moving in and out of Spam folder). There is also nightly cron job that learns from recent mail (mail of last 3 days) of each user.

                                  d19dotcaD 1 Reply Last reply
                                  1
                                  • girishG girish

                                    They get created when the spam filter learnt something about the address. This can happen because of user action - user marked spam or ham (moving in and out of Spam folder). There is also nightly cron job that learns from recent mail (mail of last 3 days) of each user.

                                    d19dotcaD Offline
                                    d19dotcaD Offline
                                    d19dotca
                                    wrote on last edited by d19dotca
                                    #16

                                    @girish Is it expected to see forwarding addresses created in there? For example, I have one directory created in there for an email that doesn't reside on my server and is used in forwarding only from a mailing list in Cloudron (not from a mailbox). Seems strange that'd be in there, no?

                                    --
                                    Dustin Dauncey
                                    www.d19.ca

                                    1 Reply Last reply
                                    0
                                    • girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #17

                                      @d19dotca Yes, you shouldn't see forwarding addresses in spamd directory. Do you know if this address was a mailbox before? If so, can you also double check if /home/yellowtent/boxdata/mail/vmail/<forwardingaddress> exists ?

                                      d19dotcaD 1 Reply Last reply
                                      0
                                      • girishG girish

                                        @d19dotca Yes, you shouldn't see forwarding addresses in spamd directory. Do you know if this address was a mailbox before? If so, can you also double check if /home/yellowtent/boxdata/mail/vmail/<forwardingaddress> exists ?

                                        d19dotcaD Offline
                                        d19dotcaD Offline
                                        d19dotca
                                        wrote on last edited by d19dotca
                                        #18

                                        @girish I’ll check in the morning for sure, I’ll double check if it exists somehow in vmail. It shouldn’t though as it’s an @me.com address (Apple-owned) so it’s never been something I could even host at all in the first place.

                                        Though now that I think about it, back before Cloudron allowed mailing list to external addresses, it was a mailbox on their business domain and then a forwarding rule assigned to their @me.com address. But that mailbox was removed soon after mailing lists could forward externally and is just a mailing list since the. So maybe there’s still something in there?

                                        I’ll update tomorrow 🙂

                                        --
                                        Dustin Dauncey
                                        www.d19.ca

                                        1 Reply Last reply
                                        0
                                        • girishG Offline
                                          girishG Offline
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #19

                                          Oh, the vmail and spamd directories should only ever contain addresses that are hosted on Cloudron. If you see anything not belonging to Cloudron, you can delete it . If they "re-appear", please report here, because that is some bug. I thought we fixed this bug a long time ago. I quickly checked atleast 5 Cloudrons that I could get hold of and none of them have external mailboxes (anymore).

                                          d19dotcaD 2 Replies Last reply
                                          0
                                          • girishG girish

                                            Oh, the vmail and spamd directories should only ever contain addresses that are hosted on Cloudron. If you see anything not belonging to Cloudron, you can delete it . If they "re-appear", please report here, because that is some bug. I thought we fixed this bug a long time ago. I quickly checked atleast 5 Cloudrons that I could get hold of and none of them have external mailboxes (anymore).

                                            d19dotcaD Offline
                                            d19dotcaD Offline
                                            d19dotca
                                            wrote on last edited by
                                            #20

                                            @girish I think that’s the thing though, the one I’m mentioning I see in spamd is the @me.com address, so I guess that’s a bug then eh?

                                            --
                                            Dustin Dauncey
                                            www.d19.ca

                                            girishG 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