On 2012.03.19 02.34, mouss wrote:
Le 14/03/2012 03:53, b...@bitrate.net a écrit :
On Mar 13, 2012, at 17.01, mouss wrote:

Le 13/03/2012 19:07, b...@bitrate.net a écrit :
i've been experimenting with delivery for the virtual domain
class to dovecot via lmtp - e.g.

postconf virtual_transport
virtual_transport = lmtp:[localhost]:lmtp-deliver

this works fine.

out of curiosity, i wondered if the particulars could be
somehow moved into a service definition in master.cf - e.g.

virtual_transport = dovecot

yes, you can define a transport in master.cf and use it in
main.cf. so you can define

joerunsfast ... smtp -o var=val ...

and use that in main.cf:

foo_transport = joerunsfast

you can even define parameters for that transport:


joerunsfast_variable = value

in your main.cf, as far as "variable" applies to a transport
(transports inherit from: smtp, lmtp, pipe, ... )


$ cat master.cf ... # Dovecot LDA dovecot unix    -       n
n       -       -      pipe flags=DRhu user=_mailbox
argv=/usr/local/libexec/dovecot/deliver -d ${user}@${domain} -n
-m ${extension} ...

$ grep dovecot main.cf virtual_transport = dovecot
dovecot_destination_recipient_limit = 1 deliver_command =
/usr/local/libexec/dovecot/deliver …

yes, this part i think i understand - the difficulty i'm having is
with determining which parameters i can pass to lmtp to accomplish
this.  i'm effectively looking for what i would consider the
equivalent to virtual_transport=lmtp:[localhost]:lmtp-deliver - but
reading through the smtp/lmtp and others man pages and
experimenting a bit, i've not been able to figure out what
parameter might provide for this.


and then somehow in master.cf a parameter to the lmtp service
named dovecot, specifying [localhost]:lmtp-deliver


not that way:) it's transport:[nexthop], not
[nexthop]:transport... man smtp, lmtp, pipe, …

sorry, i probably should have been more literal here, given the
context.  [localhost] is the nexthop, and lmtp-deliver is the port
[10026 in this case, by way of the system's services database].  i
omitted the leading transport here [lmtp] in an attempt to
illustrate that the data would be a parameter passed to lmtp.


so far, given the various portions of the documentation i've
referenced and the iterations i've tried, the answer appears to
be no, but i wondered if i might be missing something.


I won't debate this now, but it seems to me that all this is
documented. anyway, postfix supports custom transports, and they
are used in many places. examples:

- spam filtering: things like: amavis ..... smtp -o blah=blah
...


- delivery: things like dovecot ... pipe -o blah=blah

therein lies my fundamental question, i guess.  having read the
documentation for lmtp(8), transport(5), master(5) and probably a
few others i'm forgetting - if i'm being blind to the relevant lmtp
parameters, i'm hopeful i might glean some enlightenment, or if
not, just a confirmation that this particular exercise isn't
possible.



as per http://www.postfix.org/lmtp.8.html you can specify lmtp_port
(default is 24). so you could do -o lmtp_port=10026


now, you'd better explain what real problem you are trying to solve.
describe it in in the "problem domain", not in the "solution domain"
(ideally, describe it in a postfix independent manner).

that actually is the real problem i'm trying to solve. right now, i'm using virtual_transport = lmtp:[localhost]:lmtp-deliver, and this works fine. i'm just curious if i can "move" the settings to master.cf. it's just an exercise in learning for me. if it isn't possible, it's fine, mail will still be delivered to localhost, on port 10026, via lmtp, as is.

Reply via email to