Re: [Dovecot] Duplicate Email with Dovecot Sieve

2011-08-22 Thread Holden Hao

 General Qmail log:

 @40004e4d1d7b2965966c info msg 1337024: bytes 2257 from 
 testu...@gmail.com qp 15984 uid 113
 @40004e4d1d7b2965a60c starting delivery 62510: msg 1337024 to local
 u...@xx.org
 @40004e4d1d7b2965b5ac status: local 1/10 remote 0/100
 @40004e4d1d7b390469a4 delivery 62510: success: did_1+0+1/
 @40004e4d1d7b3905119c status: local 0/10 remote 0/100
 @40004e4d1d7b39058ab4 end msg 1337024


Upon reading up on understanding qmail logs, I found out that the

did_1+0+1

in my logs means that Qmail was successful in delivering to Maildir (first
1) and also it was able to pass the email to an external program (last 1; in
this case Dovecot's deliver).  So I guess that is why I am getting 2 emails.
 However, I do not know why qmail still delivered to Maildir when it should
have passed on the delivery to Dovecots deliver program.  As I understand it
the correct delivery should log

did_0+0+1

which means that qmail handed the email to an external program successfully
and did not deliver the email to Maildir itself.  Is this what is to be
expected?

Thank you for some pointers.



Holden


Re: [Dovecot] Duplicate Email with Dovecot Sieve

2011-08-22 Thread Holden Hao


 As I suspected, this is an MTA issue. Apparently, you have two parallel
 local delivery transports configured. I have no idea how this is configured
 in Qmail and what exactly you may have done wrong.

 Although other people on this list probably do have knowledge of Qmail
 configuration, MTA-related questions are mostly off-topic, so you may not
 get an answer here. I suggest you contact the guys at qmail.


Thank you very much for your reply.  I have also sent an email to the Qmail
list.

I will report back if I resolve this issue.

Regards,


Holden


Re: [Dovecot] Duplicate Email with Dovecot Sieve

2011-08-18 Thread Holden Hao

  Hmm, odd. The above log only shows one delivery. I would expect a
 duplicate entry there when Dovecot is causing this. You can enable
 mail_debug to see whether that shows more. Also, the user log
 (~/.dovecot.sieve.log) could contain other info. But, I don't expect much
 more from that.


Thank you for your reply.  However, there are no relevant information in
dovecot.log (general log file for dovecot) and from ~/dovecot.sieve.log
(nothing specific to the transaction)


 Are you perhaps doing something interesting at MTA level?


I am not sure as I just took over management of the server and it is not
documented.  But if it helps here are some log entries from qmail:

General Qmail log:

@40004e4d1d7b2965966c info msg 1337024: bytes 2257 from 
testu...@gmail.com qp 15984 uid 113
@40004e4d1d7b2965a60c starting delivery 62510: msg 1337024 to local
u...@xx.org
@40004e4d1d7b2965b5ac status: local 1/10 remote 0/100
@40004e4d1d7b390469a4 delivery 62510: success: did_1+0+1/
@40004e4d1d7b3905119c status: local 0/10 remote 0/100
@40004e4d1d7b39058ab4 end msg 1337024

--
Qmail SMTP log:

@40004e4d1d7b0db7cd7c tcpsvd: info: start 15966
mail.xx.org:xxx.xx.xx.xxx
:mail-gx0-f182.google.com:xxx.xx.xxx.xxx:36540
@40004e4d1d7b0dc8adcc qmail-smtpd 15966: connection from xxx.xx.xxx.xxx
(mail-gx0-f182.google.com) to mail.xx.org
@40004e4d1d7b0dc8c924 qmail-smtpd 15966: enabled options: starttls
sanitycheck sendercheck rcptcheck smtp-auth qmailqueue /var/qmail/bin/
qmail-scanner-queue.pl
@40004e4d1d7b0ef4b664 qmail-smtpd 15966: remote ehlo:
mail-gx0-f182.google.com
@40004e4d1d7b13dc6384 qmail-smtpd 15966: remote ehlo:
mail-gx0-f182.google.com
@40004e4d1d7b15089714 qmail-smtpd 15966: mail from: testu...@gmail.com
@40004e4d1d7b1508f8bc qmail-smtpd 15966: sender verify, sender not in
goodmailaddr
@40004e4d1d7b16316b5c qmail-smtpd 15966: rcpt to: u...@xxx.org
@40004e4d1d7b16318e84 qmail-smtpd 15966: recipient verify, recipient not
in goodmailaddr
@40004e4d1d7b16319a3c qmail-smtpd 15966: recipient verify, recipient is
local
@40004e4d1d7b1646b87c qmail-verfiy: verifying u...@xxx.org
@40004e4d1d7b165e3434 qmail-smtpd 15966: recipient verify OK
@40004e4d1d7b19e73bb4 qmail-smtpd 15966: go ahead
@40004e4d1d7b28fd762c qmail-smtpd 15966: message queued: 1313676657 qp
15968 size 1227 bytes
@40004e4d1d992a04b4cc qmail-smtpd 15966: quit, closing connection
@40004e4d1d992a051674 tcpsvd: info: end 15966 exit 0
@40004e4d1d992a05222c tcpsvd: info: status 0/20

Any more ideas?


Holden


[Dovecot] Duplicate Email with Dovecot Sieve

2011-08-17 Thread Holden Hao
I am trying to use Dovecot Sieve after upgrading Dovecot from 1.0.15 to
1.2.17.  I used the same config file from the old version but I added some
entries to make sieve work.  In my initial tests, sieve works and is able to
do the actions that I set it to do.  However, I get 2 copies of incoming
emails.  The inbox would always preserve a copy even if the sieve filter is
set to transfer emails to another folder or redirect it to another address.
 The logs do not seem to report any issues.  I don't know what causes the
problem and I would appreciate some pointers.

Here are some more details of my setup:

OS: Linux 2.6.24.2
Dovecot: 1.2.17
Dovecot Sieve:0.1.19
Manage Sieve:0.11.13
MTA: Qmail 1.03

dovecot -n

# 1.2.17: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.24.2 i686 Debian lenny/sid
log_path: /var/log/dovecot.log
log_timestamp:
protocols: imap pop3 imaps pop3s managesieve
ssl_cert_file: /var/dir/etc/certificates/server.crt
ssl_key_file: /var/dir/etc/certificates/server.key
disable_plaintext_auth: no
login_dir: /usr/local/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_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login
login_greeting: Welcome
login_process_size: 32
verbose_proctitle: yes
first_valid_uid: 1000
mail_location: maildir:~/Maildir
mail_debug: 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_executable(managesieve): /usr/local/libexec/dovecot/managesieve
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugins(managesieve):
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
mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve
imap_client_workarounds(default): outlook-idle
imap_client_workarounds(imap): outlook-idle
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): UID%u-%v
pop3_uidl_format(managesieve): %08Xu%08Xv
managesieve_logout_format(default): bytes=%i/%o
managesieve_logout_format(imap): bytes=%i/%o
managesieve_logout_format(pop3): bytes=%i/%o
managesieve_logout_format(managesieve): bytes ( in=%i : out=%o )
namespace:
  type: private
  separator: .
  prefix: INBOX.
  location: maildir:~/Maildir
  inbox: yes
  list: yes
  subscriptions: yes
lda:
  postmaster_address: postmas...@xx.org
  mail_plugin_dir: /usr/local/lib/dovecot/lda
  mail_plugins: quota sieve
  sendmail_path: /var/qmail/bin/sendmail
  log_path: /var/log/dovecot-deliver-errors.log
  info_log_path: /var/log/dovecot-deliver.log
auth default:
  verbose: yes
  passdb:
driver: checkpassword
args: /var/qmail/bin/auth_pop
  userdb:
driver: prefetch
plugin:
  quota: maildir
  sieve: ~/.dovecot.sieve
  sieve_dir: ~/sieve


from: dovecot-deliver.log

deliver(user): Info: Loading modules from directory:
/usr/local/lib/dovecot/lda
deliver(user): Info: Module loaded:
/usr/local/lib/dovecot/lda/lib10_quota_plugin.so
deliver(user): Info: Module loaded:
/usr/local/lib/dovecot/lda/lib90_sieve_plugin.so
deliver(user): Info: Quota root: name= backend=maildir args=
deliver(user): Info: Namespace: type=private, prefix=INBOX., sep=.,
inbox=yes, hidden=no, list=1, subscriptions=yes
deliver(user): Info: maildir: data=/home/user/Maildir
deliver(user): Info: maildir++: root=/home/user/Maildir, index=, control=,
inbox=/home/user/Maildir
deliver(user): Info: sieve: using sieve path for user's script:
/home/user/.dovecot.sieve
deliver(user): Info: sieve: opening script /home/user/.dovecot.sieve
deliver(user): Info: sieve: executing compiled script
/home/user/.dovecot.sieve
deliver(user): Info: sieve: msgid=
cajnnnymqpmeopfft3+_qhvxyxf3v-4bzv9ojjqgfrtcddnt...@mail.gmail.com: stored
mail into mailbox 'Inbox.Test'

Thanks in advance for your replies.


Holden