On Thu, 28 Nov 2024, Carlos E. R. via Alpine-info wrote:

On Linux, you can use a tool to download email, like fetchmail. This handles the mail to an MTA, this to a sorting tool, like procmail, which calls spamassassin as a part of the process, then finally Alpine.

  Yes, I sort of second this approach. But there may be caveats.

But you loose the immediacy of imap.

  True. I have a ~5 min delay (the time interval between my fetchmail
  runs, controlled bu crontab). What you gain is that e-mail is stored
  forever on your local machine, and not on anybody else's computer.

  Of course you can't access the mail on the local computer from another
  computer unless:

  - you ssh onto your local computer and run alpine there (what I do now)

  - you run a local IMAP server (I did it long ago when travelling)

I precise the "sort of" and caveats above.

------

In the past (quite som years ago) my institution managed its own sendmail on a server. This might deliver to the user local machine. We had spamassassin on the server, trained on our ham-and-spam message base. We had also a daily crontab warning each user about quarantined messages (we had global quarantine, not user's spam directories).

I also had procmail privately on my machine, with a further tier of spam filters (and also sorting-in-folders-per-subject).

We had very few false negatives and false positives. I mean I received very few true spam, and almost never had to recover good messages marked incorrectly as spam in the quarantine.

------
Then my institution moved to Gsuite (gmail).

I arranged fetchmail to get my Gsuite inbox (then it was easy, today is not so easy) every 5 min, so I could run all my procmail filters, sorting by subject etc.

For Gsuite Spam folder I instructed alpine to (then easy) to access it, which I did once per day. I found a bit more false positives (good messages marked as spam by the wondeful Google filters). At the time what I did was then to use the Gsuite web interface and tag the messages as "not spam". I hoped that would uinstuct the filters, but this is NOT the cass. so I gave up. Now if I find a false positive in Gsuite Spam folder when looking at it with alpine, I just save (mov) it to my local inbox.

------
Recent complication with Gsuite.

They disabled support to "less secure apps" (they call fetchmail or alpine so, apparently because of refusal to pay a bribe, to say it in a politically uncorrect way), forced 2FA and/or OAUTH2, etc.

There are two ways to overcome that:

 - one is to use an "app password" (different from the normal user
   personal password) for alpine and fetchmail

 - another one is to instruct Gsuite to forward all mail (not marked
   as spam) to as third provider, which is more firendly to alpine and
   fetchmail

I tried both and finally arranged for a mixture. Now I have 5 (or 6) destinations (or transit points).

 0) all my local folders with old mail (used by alpine)

 1) my local INBOX (populated by procmail/fetchmail and used by alpine)

 2) an incoming folder (Gsuite INBOX accessible by alpine via app
    password). Normally entirely empty because mail is either good
    and delivered nearly instantly to third party, or pseudo-spam
    (see 4 below)

 3) an incoming folder (third party INBOX accessible by alpine and
    fetchmail). Good messages (for both Gsuite and third party
    filters) remain thetre transiently, no more than 5 min, after
    which they are fetched to 1. I can occasionally see them by
    alpine while transiting (e.g. for "access confirmation" messages).
    if i'm in real hurry to see them.

 4) a folder collection corresponding to all Gsuite folders except
    the INBOX. What is not empty there for me are Spam and Bin.
    Once per day I access them, purge Bin and retrieve the rare
    false positives (incorrectly marked as Spam). Manually in alpine.

 5) a folder collection corresponding to all third party folders.
    What used to be non-empty there was the third party Spam folder,
    which, since the main spam filtering had already occurred in
    Gsuite, contained only some false positives.

    I got fed up to use the third party web interface to tell they
    are "not spam" (they would be moved to 3 and fetched automatically,
    but this does not instruct the filters), so I arranged fetchmail
    to fetch the Sapm folder as well as 3 every 5 min.

So in general one should not trust providers' spam filters (they are good in filtering spam but have too many false positives, and cannot be trained).

In principle a good approach is therefore to use fetchmail to get both the provider and spam folder and run one's own spam filtering (just procmail, or procmail+spamassassin).

In my situation I have no need to run a personal spamassassin.

In practice using the approach above with gmail and fetchmail requirs to overcome two problems. One is to use app password, the other is to find the syntax fpr gmail Spam folders (their implementation is quite non-standard). Never tackled the latter, but should be doable somehow.


Curiosity: with respect to the time we ran our own spamassassin, Gsuite has more false positives, while a number of real spam which was quarantined by our own spamassassin are nowhere to be seen. I suspect they are filtered out in a more drastic manner.

--
The Great Dumbening(tm) started the day smartphone internet traffic overtook that of desktop PCs.
(user moonbat on https://forum.palemoon.org 12 Aug 2024 04:21)
_______________________________________________
Alpine-info mailing list
Alpine-info@u.washington.edu
http://mailman12.u.washington.edu/mailman/listinfo/alpine-info

Reply via email to