On Mon, 17 Mar 2025 10:41:47 +0100
Benny Pedersen via Postfix-users <postfix-users@postfix.org> wrote:

> Paul Neuwirth via Postfix-users skrev den 2025-03-17 09:16:
> 
> > 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
> >  
> 
> https://dovecot.dovecot.narkive.com/BcwsH9DF/getmail-and-lda-deliver
> 
> then fetchmail works aswell if mda is used in fetchmailrc
> 
got it. needed some debugging, dovecot-lda didn't want to deliver to
the user running as vscan, tried to change auth, group. but ended up
using sudo.

so commands are now:
/usr/bin/fetchmail -f /etc/mail/.fetchmailrc -a -s -n --folder
LearnAsHam -m '/bin/bash -c "/usr/bin/tee >(/usr/bin/sa-learn --ham
--single 1>&2)|/usr/bin/spamc|/usr/bin/sudo -u USERNAME
/usr/lib/dovecot/deliver -k -d USERNAME -m INBOX"'
and
/usr/bin/fetchmail -f /etc/mail/.fetchmailrc -a -s -n --folder
LearnAsSpam -m '/bin/bash -c "/usr/bin/tee >(/usr/bin/sa-learn --spam
--single 1>&2)|/usr/bin/spamc|/usr/bin/sudo -u USERNAME
/usr/lib/dovecot/deliver -k -d USERNAME -m INBOX"'

all original headers stay intact.

thank you all :-)
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to