Uberspace / manual

This manual documents how to use the basic features of Uberspace 7.
https://manual.uberspace.de/
Other
49 stars 109 forks source link

fetchmail mda config to deliver to mail user's sieve #530

Open quite opened 7 months ago

quite commented 7 months ago

I'm migrating from old maildrop based setup. I'm using fetchmail and I don't manage to set the correct mda in its config. I'd like mails to be delivered to dovecot and ideally pass through my user's sieve filters. I tried with mda "/usr/libexec/dovecot/dovecot-lda" and with various flags, but can't get it to work at all.

I can provide a guide for lab.uberspace once I get it working :)

quite commented 6 months ago

For now I tried using the fetchmail option smtpname me@example.com to have it deliver to my email address (hosted on my uberspace). But fetchmail often gets:

fetchmail: SMTP error: 451 4.7.1 Try again later
fetchmail:  not flushed

Perhaps due to rate-limiting. So it's not a great option. Feels like there should be some way using the dovecot mda, instead of using the above and causing invocation of postfix as MTA.

fetchmail is running locally, has fetched an email from some IMAP/POP3 server, and just needs to drop it in a folder on local disk, well ideally by way of the sieve filters.

quite commented 6 months ago

OK, by carefully reading /opt/uberspace/etc/spamfolder.template which is included by ~/.spamfolder I came up with something that seems to be working. This is an example mda line for the fetchmail config, which passes the fetched mail through dovecot/sieve:

mda "/usr/libexec/dovecot/dovecot-lda -e -a %T -f %F -o mail_home=/home/UBERSPACE_USER/users/MAIL_USER -o mail_location='maildir:~/'"

I don't close this issue in case you wanna document this somewhere first.