Hi, I'm a newbie having some trouble getting deliver to log anything. Related to this, there are no return values unless the -d is missing. I'm using LDAP to store virtual domain and user account information. Test #1: /usr/lib/dovecot/deliver -e -f mpapet at yahoo.com -d zed at mailswansong.dom < bad.mail Expected result: supposed to fail, there's no zed account via ldap lookup and supposed to get a return code per the wiki at http://wiki2.dovecot.org/LDA. Supposed to log too. Actual result: nothing gets delivered, no return code, nothing is logged. Test #2: /usr/lib/dovecot/deliver -f mpapet at yahoo.com -d dude at mailswansong.dom < good.mail Expected result: deliver to dude and return 0. Actual result: delivers, but no return code. Nothing logged. The wiki is vague about the difficulties of getting deliver LDA to log, but I thought I had it covered in my config. I even opened permissions up wide (777) on my log files specified below. Nothing gets logged. The ONLY thing changed in 15-lda.conf is as follows. protocol lda { # Space separated list of plugins to load (default is global mail_plugins). #mail_plugins = $mail_plugins log_path = /var/log/dovecot/lda.log info_log_path = /var/log/dovecot/lda-info.log service auth { unix_listener auth-client { mode = 0600 user = vmail } } I'm running plain Debian Testing and used dovecot from Debian's repository. The end-goal is to write a qpsmtpd queue plugin, but I need to figure out what's the matter first. Thanks in advance. mpapet
On Mon, 2012-01-02 at 22:48 -0800, Michael Papet wrote:> Hi, > > I'm a newbie having some trouble getting deliver to log anything. Related to this, there are no return values unless the -d is missing. I'm using LDAP to store virtual domain and user account information. > > Test #1: /usr/lib/dovecot/deliver -e -f mpapet at yahoo.com -d zed at mailswansong.dom < bad.mail > Expected result: supposed to fail, there's no zed account via ldap lookup and supposed to get a return code per the wiki at http://wiki2.dovecot.org/LDA. Supposed to log too. > Actual result: nothing gets delivered, no return code, nothing is logged.As in return code is 0? Something's definitely wrong there then. First check that deliver at least reads the config file. Add something broken in there, such as: "foo=bar" at the beginning of dovecot.conf. Does deliver fail now? Also running deliver via strace could show something useful.
I did some testing on a Debian testing VM. I built 2.0.17 from sources and copied the config straight over from the malfunctioning machine. LDA logging worked. So, it could be something about my system. But, running /usr/lib/dovecot/deliver still doesn't return a value on the command line as documented on the wiki. I've attached strace files from both the malfunctioning Debian packages machine and the built from sources VM. Unfortunately, I'm a new strace user, so I don't know what it all means. Michael --- On Tue, 1/3/12, Timo Sirainen <tss_no_spam at iki.fi> wrote:> From: Timo Sirainen <tss_no_spam at iki.fi> > Subject: Re: [Dovecot] Newbie: LDA Isn't Logging > To: "Michael" <mpapet_no_spam at yahoo.com> > Cc: dovecot at dovecot.org > Date: Tuesday, January 3, 2012, 4:15 AM > On Mon, 2012-01-02 at 22:48 -0800, > Michael wrote: > > Hi, > > > > I'm a newbie having some trouble getting deliver to > log anything.? Related to this, there are no return > values unless the -d is missing.? I'm using LDAP to > store virtual domain and user account information. > > > > Test #1: /usr/lib/dovecot/deliver -e -f mpapet at yahoo.com > -d zed at mailswansong.dom > < bad.mail > > Expected result: supposed to fail, there's no zed > account via ldap lookup and supposed to get a return code > per the wiki at http://wiki2.dovecot.org/LDA.? > Supposed to log too. > > Actual result: nothing gets delivered, no return code, > nothing is logged. > > As in return code is 0? Something's definitely wrong there > then. > > First check that deliver at least reads the config file. > Add something > broken in there, such as: "foo=bar" at the beginning of > dovecot.conf. > Does deliver fail now? > > Also running deliver via strace could show something > useful. > > >-------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sources_2.0.17_strace.txt URL: <http://dovecot.org/pipermail/dovecot/attachments/20120108/8d513007/attachment-0012.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: malfunctioning_debian_strace.txt URL: <http://dovecot.org/pipermail/dovecot/attachments/20120108/8d513007/attachment-0013.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sources_2.0.17_no-user.txt URL: <http://dovecot.org/pipermail/dovecot/attachments/20120108/8d513007/attachment-0014.txt>
On 9.1.2012, at 7.34, Michael Papet wrote:> LDA logging worked. So, it could be something about my system. But, running /usr/lib/dovecot/deliver still doesn't return a value on the command line as documented on the wiki. > > I've attached strace files from both the malfunctioning Debian packages machine and the built from sources VM. Unfortunately, I'm a new strace user, so I don't know what it all means.The last line in the malfunctioning deliver: exit_group(67) = ? So Dovecot exits with value 67, which means EX_NOUSER. Looks like everything is working correctly. Are you maybe running a wrapper script that hides the exit code? Or in some other way checking it wrong..