This documentation is for Dovecot v1.x, see wiki2 for v2.x documentation.
Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2009-10-18 17:51:55
Size: 1771
Editor: ppp91-77-133-0
Comment:
Revision 6 as of 2009-12-23 06:06:30
Size: 1970
Editor: ppp91-78-85-68
Comment: Russian topic url added
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
1. Add to '''''zmailer/sm.conf''''': 1. Add to {{{zmailer/sm.conf}}}:
Line 9: Line 9:
2. Change '''''zmailer/scheduler.conf''''' like this: 2. Change {{{zmailer/scheduler.conf}}}:
Line 11: Line 11:
Go '''''local/file*''''' and '''''local/pipe*''''' thru "mailbox" delivery agent: Set '''local/file*''' and '''local/pipe*''' to use "mailbox" delivery agent:
Line 16: Line 16:
        # zmailer local delivery transport agent         # ZMailer local delivery transport agent
Line 20: Line 20:
and after that go all other '''''local/*''''': and all the other '''local/*''' to use Dovecot LDA:
Line 24: Line 24:
        # DOVECOT as the local delivery agent:
        command="sm -8c $channel dovecot"
        # Dovecot as the local delivery agent:
        command="sm -8Hc $channel dovecot"
Line 28: Line 28:
This makes all deliveries to local users go via Dovecot LDA, but users can also run pipes or store to files in their {{{.forward}}} files. (This is why there are tag-matchers for "local/file*" and "local/pipe*" before "local/*" in the {{{scheduler.conf}}} file; those are for the cases that must not go via Dovecot LDA.)
Line 29: Line 30:
Then all deliveries to local users will go thru dovecot LDA, AND
if users want to run pipes / store to files thru their .forward
files, they can do that too. (That is why there are tag-matchers
for "local/file*" and "local/pipe*" before "local/*" in that
scheduler.conf file; those are for cases which must not run thru
dovecot LDA.)
If you're going to use deliver's {{{-e}}} parameter you'll need to patch either Dovecot or ZMailer sources. When deliver wants to reject mails, it exits with EX_NOPERM code, but ZMailer thinks this isn't normal and logs "(this is abnormal, investigate!)".
Line 36: Line 32:
But little problem now: if you will start use "-e" deliver param,
Zmailer start complain on reject case: "(this is abnormal, investigate!)".

Fix Zmailer: in '''''zmailer/transports/libta/diagnostic.c''''':
ZMailer fix in {{{zmailer/transports/libta/diagnostic.c}}}:
Line 54: Line 47:
Or fix Dovecot: in '''''dovecot-1.2.6/src/deliver/deliver.c''''': Or Dovecot fix in {{{dovecot-1.2.6/src/deliver/deliver.c}}}:
Line 60: Line 53:

Russian topic at [[http://kocmuk.ru/2009/10/18/dovecot-lda-vs-zmailer-lda/|http://kocmuk.ru/2009/10/18/dovecot-lda-vs-zmailer-lda/]]

Dovecot LDA as local delivery agent for ZMailer

1. Add to zmailer/sm.conf:

# dovecot LDA
dovecot SPfne  /usr/local/libexec/dovecot/deliver  deliver -e -n -d $u

2. Change zmailer/scheduler.conf:

Set local/file* and local/pipe* to use "mailbox" delivery agent:

local/file*
local/pipe*
        ...
        # ZMailer local delivery transport agent
        command="mailbox -8HS -l ${LOGDIR}/mailbox"

and all the other local/* to use Dovecot LDA:

local/*
        ...
        # Dovecot as the local delivery agent:
        command="sm -8Hc $channel dovecot"

This makes all deliveries to local users go via Dovecot LDA, but users can also run pipes or store to files in their .forward files. (This is why there are tag-matchers for "local/file*" and "local/pipe*" before "local/*" in the scheduler.conf file; those are for the cases that must not go via Dovecot LDA.)

If you're going to use deliver's -e parameter you'll need to patch either Dovecot or ZMailer sources. When deliver wants to reject mails, it exits with EX_NOPERM code, but ZMailer thinks this isn't normal and logs "(this is abnormal, investigate!)".

ZMailer fix in zmailer/transports/libta/diagnostic.c:

-      case EX_NOPERM:
       case EX_PROTOCOL:
       case EX_USAGE:
               strcat(message,
                      " (this is abnormal, investigate!)");
               s += strlen(s);
               /* fall through */
+      case EX_NOPERM:
       case EX_NOUSER:
       case EX_NOHOST:
       case EX_UNAVAILABLE:

Or Dovecot fix in dovecot-1.2.6/src/deliver/deliver.c:

                if (stderr_rejection)
-                       return EX_NOPERM;
+                       return EX_UNAVAILABLE;

Russian topic at http://kocmuk.ru/2009/10/18/dovecot-lda-vs-zmailer-lda/

None: LDA/ZMailer (last edited 2009-12-23 06:06:30 by ppp91-78-85-68)