[Dovecot] Dovecot as LDA issues - please help
I'm trying to get dovecot to work as an LDA with dspam; so I can run the dspam dovecot plugin for drag and drop spam/ham learning. Here is my config info:
Version 1.0.5 base_dir: /var/run/dovecot/ protocols: imap imaps pop3 pop3s ssl_cipher_list: ALL:!LOW login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_greeting: Welcome Mail. login_processes_count: 1 login_max_processes_count: 10 max_mail_processes: 20 verbose_proctitle: yes first_valid_uid: 1000 first_valid_gid: 1000 mail_extra_groups: mail mail_location: maildir:/usr/local/virtual/%d/%n mail_debug: yes maildir_copy_with_hardlinks: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): dspam mail_plugins(imap): dspam mail_plugins(pop3): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): outlook-idle pop3_no_flag_updates(default): no pop3_no_flag_updates(imap): no pop3_no_flag_updates(pop3): yes pop3_lock_session(default): no pop3_lock_session(imap): no pop3_lock_session(pop3): yes pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: mechanisms: plain login passdb: driver: sql args: /usr/local/etc/dovecot-sql.conf userdb: driver: prefetch userdb: driver: sql args: /usr/local/etc/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: vmail
dovecot-sql config: driver = mysql password_query = SELECT password, 1011 AS uid, 1011 AS gid FROM users WHERE userid = '%u' user_query = SELECT 1011 AS uid, 1011 AS gid FROM users WHERE userid = '%u'
dspam.conf (for delivery): TrustedDeliveryAgent "/usr/local/libexec/dovecot/deliver -d %u" UntrustedDeliveryAgent "/usr/local/libexec/dovecot/deliver -d %u" QuarantineAgent "/usr/local/libexec/dovecot/deliver -d %u -m Junk
The error I get when running /usr/local/libexec/dovecot/deliver -c dovecot.conf -d username Sep 19 22:55:57 pelorus dovecot: auth-worker(default): mysql: Connected to localhost (db) Sep 19 22:55:57 pelorus deliver(support): auth input: support Sep 19 22:55:57 pelorus deliver(support): auth input: uid=1011 Sep 19 22:55:57 pelorus deliver(support): auth input: gid=1011 Sep 19 22:55:57 pelorus deliver(support): chdir(/root) failed: Permission denied Sep 19 22:55:57 pelorus deliver(support): maildir: data=/usr/local/virtual//support Sep 19 22:55:57 pelorus deliver(support): maildir: root=/usr/local/virtual//support, index=/usr/local/virtual//support, control=, inbox=
maillog output when trying to deliver mail:
Sep 19 22:57:13 pelorus postfix/smtpd[38846]: connect from
py-out-1112.google.com[64.233.166.179]
Sep 19 22:57:14 pelorus postfix/smtpd[38846]: NOQUEUE: filter: RCPT from
py-out-1112.google.com[64.233.166.179]: user@domain.com: Recipient
address triggers FILTER dspam:unix:/var/run/dspam/dspam.sock;
from=user@gmail.com to=support@exotixboard.com proto=ESMTP
helo=
My virtual users directory (/usr/local/virtual) is chowned vmail:vmail is chmodded 0777 for testing purposes.
My question is, how can I get this to work? What is the "Sep 19 22:55:57 pelorus deliver(support): chdir(/root) failed: Permission denied"error from? Why doesn't the deliver work? Any help, input, or suggestions would be greatly appreciated.
On Wed, 2007-09-19 at 23:12 -0500, Placid Publishing, LLC wrote:
The error I get when running /usr/local/libexec/dovecot/deliver -c dovecot.conf -d username Sep 19 22:55:57 pelorus dovecot: auth-worker(default): mysql: Connected to localhost (db) Sep 19 22:55:57 pelorus deliver(support): auth input: support Sep 19 22:55:57 pelorus deliver(support): auth input: uid=1011 Sep 19 22:55:57 pelorus deliver(support): auth input: gid=1011 Sep 19 22:55:57 pelorus deliver(support): chdir(/root) failed: Permission denied
This probably happens because you have "HOME=/root" environment set while running deliver. v1.1's deliver clears the whole environment so this isn't a problem, but for now either unset it yourself, or add "home=/" (or something) to plugin {}.
Anyway this error message isn't fatal.
Sep 19 22:55:57 pelorus deliver(support): maildir: data=/usr/local/virtual//support Sep 19 22:55:57 pelorus deliver(support): maildir: root=/usr/local/virtual//support, index=/usr/local/virtual//support, control=, inbox=
So the messages stop here? There should have been something more..
*Sep 19 22:57:14 pelorus dspam[33675]: Delivery agent returned exit code 67: /usr/local/libexec/dovecot/deliver -d user@domain.com*
67 means "unknown user". I think this is different from the previous error. You could set auth_verbose=yes to make Dovecot log the user.
Timo Sirainen wrote:
On Wed, 2007-09-19 at 23:12 -0500, Placid Publishing, LLC wrote:
The error I get when running /usr/local/libexec/dovecot/deliver -c dovecot.conf -d username Sep 19 22:55:57 pelorus dovecot: auth-worker(default): mysql: Connected to localhost (db) Sep 19 22:55:57 pelorus deliver(support): auth input: support Sep 19 22:55:57 pelorus deliver(support): auth input: uid=1011 Sep 19 22:55:57 pelorus deliver(support): auth input: gid=1011 Sep 19 22:55:57 pelorus deliver(support): chdir(/root) failed: Permission denied
This probably happens because you have "HOME=/root" environment set while running deliver. v1.1's deliver clears the whole environment so this isn't a problem, but for now either unset it yourself, or add "home=/" (or something) to plugin {}.
Anyway this error message isn't fatal.
Ok, what exactly should home be? I dont have home directories for my virtual users, no need for them.
Sep 19 22:55:57 pelorus deliver(support): maildir: data=/usr/local/virtual//support Sep 19 22:55:57 pelorus deliver(support): maildir: root=/usr/local/virtual//support, index=/usr/local/virtual//support, control=, inbox=
So the messages stop here? There should have been something more..
Yes that was it, what else should there be and why isn't it there?
*Sep 19 22:57:14 pelorus dspam[33675]: Delivery agent returned exit code 67: /usr/local/libexec/dovecot/deliver -d user@domain.com*
67 means "unknown user". I think this is different from the previous error. You could set auth_verbose=yes to make Dovecot log the user.
ok, should it be user@domain.com or just user? I will turn verbose on.
Thanks for your reply, I'm very eager to get this working!
On Thu, 2007-09-20 at 15:55 -0500, Placid Publishing, LLC wrote:
Timo Sirainen wrote:
On Wed, 2007-09-19 at 23:12 -0500, Placid Publishing, LLC wrote:
The error I get when running /usr/local/libexec/dovecot/deliver -c dovecot.conf -d username Sep 19 22:55:57 pelorus dovecot: auth-worker(default): mysql: Connected to localhost (db) Sep 19 22:55:57 pelorus deliver(support): auth input: support Sep 19 22:55:57 pelorus deliver(support): auth input: uid=1011 Sep 19 22:55:57 pelorus deliver(support): auth input: gid=1011 Sep 19 22:55:57 pelorus deliver(support): chdir(/root) failed: Permission denied
This probably happens because you have "HOME=/root" environment set while running deliver. v1.1's deliver clears the whole environment so this isn't a problem, but for now either unset it yourself, or add "home=/" (or something) to plugin {}.
Anyway this error message isn't fatal.
Ok, what exactly should home be? I dont have home directories for my virtual users, no need for them.
Home directories would still be good to have. http://wiki.dovecot.org/VirtualUsers#homedirs
But anyway the point was to override the HOME=/root environment with something where chdir() doesn't fail. Like / or /tmp.
Sep 19 22:55:57 pelorus deliver(support): maildir: data=/usr/local/virtual//support Sep 19 22:55:57 pelorus deliver(support): maildir: root=/usr/local/virtual//support, index=/usr/local/virtual//support, control=, inbox=
So the messages stop here? There should have been something more..
Yes that was it, what else should there be and why isn't it there?
I'm not really sure, but your previous copy&pasting showed two different failures. I'd like to see both deliver's output and dspam's output for a single failed delivery.
participants (2)
-
Placid Publishing, LLC
-
Timo Sirainen