On Mon, 17 Mar 2025 08:13:24 +0100
Robert Schetterer via Postfix-users <postfix-users@postfix.org> wrote:

> Am 17.03.25 um 07:21 schrieb Paul Neuwirth via Postfix-users:
> > On Sun, 16 Mar 2025 17:29:00 +0100
> > Jaroslaw Rafa via Postfix-users <postfix-users@postfix.org> wrote:
> >   
> >> Dnia 16.03.2025 o godz. 15:51:42 Paul Neuwirth via Postfix-users
> >> pisze:  
> >>> Yes that's the problem. It should work like that (and does now -
> >>> see further below): I manually identify false-spam and move the
> >>> mail to LearnAsHam folder. The cron should make spamassassin
> >>> learn it as ham and (after re-spam-checking to get rid of
> >>> X-Spam-Flag) send it again to me.  
> >>
> >> Why send the mail again to you instead of just moving it from
> >> LearnAsHam folder to your main inbox folder? If you are using
> >> Maildir format for mail storage (which is recommended and de facto
> >> standard nowadays), then you can do that with a simple "mv"
> >> command.  
> > 
> > I use imap/dovecot. if there's another way to fetch mail and then
> > move it would be nice.
> > Don't know enough about the storage mechanism. I have ~/mail
> > directories, but all mails of a folder seem to be in one file.
> > _______________________________________________
> > Postfix-users mailing list -- postfix-users@postfix.org
> > To unsubscribe send an email to postfix-users-le...@postfix.org  
> 
> i.e use getmail via
> 
> https://pyropus.ca./software/getmail/
> 
> /etc/crontab
> 
> 10,30,50  * * * * root /root/.getmail/getmail-rc.sh
> 
> /root/.getmail/getmail-rc.sh
> 
> #/bin/sh
> filelist=`/bin/ls /root/.getmail/*.rc`
> for i in $filelist
> do
> /usr/bin/getmail -q --rcfile=$i
> done
> 
> 
> 
> 
> [options]
>   verbose = 0
>   message_log = /var/log/getmail.log
>   read_all = false
>   delivered_to = false
>   delete = false
> 
>   [retriever]
>   type = SimplePOP3Retriever
>   server = mail.beispiel.com
>   username = u...@beispiel.com
>   password = .....
> 
> [filter-1]
> allow_root_commands = True
> type = Filter_classifier
> path = /usr/bin/clamdscan
> arguments = ("--stdout", "--no-summary", "-")
> exitcodes_drop = (1, )
> 
> [filter-2]
> allow_root_commands = True
> type = Filter_external
> path = /usr/bin/spamc
> arguments = ("-s", " 250000", "-u", "u...@server.com")
> 
> [destination]
> type = MDA_external
> path = /usr/lib/dovecot/deliver
> arguments = ("-d", "u...@server.com")
> user = vmail
> group = vmail
> 
> /etc/spamassassin/local.cf
> 
> ...
> bayes_ignore_header X-Bogosity
> bayes_ignore_header X-Spam-Flag
> bayes_ignore_header X-Spam-Status
> bayes_ignore_header X-getmail-filter-classifier
> ...
> 
> 

thank you for the suggestion.
I found this thread in a forum, which seems to be exactly my use-case:
https://forums.gentoo.org/viewtopic-t-829416-start-0.html

but I see that the mail gets also re-delivered, by a dovecot command.
what are the benefits of using that instead of sendmail?
and couldn't I just take that command in my existing cron?
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to