Placid Publishing, LLC
2007-Sep-20 04:12 UTC
[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 at domain.com>: Recipient
address triggers FILTER dspam:unix:/var/run/dspam/dspam.sock;
from=<user at gmail.com> to=<support at exotixboard.com> proto=ESMTP
helo=<py-out-1112.google.com>
Sep 19 22:57:14 pelorus postfix/smtpd[38846]: B868B6CF83:
client=py-out-1112.google.com[64.233.166.179]
Sep 19 22:57:14 pelorus postfix/cleanup[38853]: B868B6CF83:
message-id=<436c6f2f0709192057w17904ae5m83655736dc01929a at
mail.gmail.com>
Sep 19 22:57:14 pelorus postfix/qmgr[33660]: B868B6CF83:
from=<user at gmail.com>, size=2040, nrcpt=1 (queue active)
*Sep 19 22:57:14 pelorus dspam[33675]: Delivery agent returned exit code
67: /usr/local/libexec/dovecot/deliver -d user at domain.com*
Sep 19 22:57:14 pelorus postfix/lmtp[38854]: B868B6CF83:
to=<user at domain.com>,
relay=mail2.domain.com[/var/run/dspam/dspam.sock],
delay=1, delays=1/0/0/0.02, dsn=4.3.0, status=deferred (host
mail2.exotixboard.com[/var/run/dspam/dspam.sock] said: 421 4.3.0
<user at domain.com> Auto-Whitelisted (in reply to end of DATA command))
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 deniedThis 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=, inboxSo 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 at 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070920/b0770ada/attachment-0002.bin>
Placid Publishing, LLC
2007-Sep-20 20:55 UTC
[Dovecot] Dovecot as LDA issues - please help
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 at 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 at domain.com or just user? I will turn verbose on. Thanks for your reply, I'm very eager to get this working!