getmail and Dovecot LDA (deliver)
my first post in this forum. Hope it's the right place.
I'm having a problem running getmail together with Dovecot LDA for virtual users. To achive this I let getmail run under the user that owns the virtual email accounts-root. The problem is that getmail is running under the user vmail and therefore the emails received will be put into vmail's mailbox.
But the emails getmail collected are actually for a virtual Dovecot user which has its maildir in a subdirectory of vmails home.
The settings for the virtual users seem to be okay: I can login on Dovecot with virtual user account and I can send emails to Postfix for the virtual user. Postfix correctly uses devlier with the name of the virtual user and so the emails are going to the correct directory.
For me it seems that getmail always uses the username under which getmail is currently running. As this must be a local user, getmails always announces this local user to deliver and deliver therefore puts the emails into the wrong account.
My question is: How do I let deliver know that it should use a virtual user? I tried with the -d agrument in my getmail rc File, but deliver never accepts the parameter -d (always says unknown parameter -d). I tried as well to let getmail oder deliver to be run as root, but then the emails will be delivered to roots home, which is not the goal too...
Does anyone know a way how I can set getmail to handle emails for a virtual account properly?
Any hint is appreciated as it already costed me hours of try-and-error