Re: [Dovecot] Dovecot sieve with postfix.

2012-11-27 Thread Ben Morrow
At 12PM -0800 on 26/11/12 /#!/JoePea wrote:
> Hi Ben,
> Indeed, the mailq command shows my test messages sitting there with "mail
> transport unavailable".
> 
> > ┌─[11:48:22/hypership/root/~]
> > └─╼ mailq
> > -Queue ID- --Size-- Arrival Time -Sender/Recipient---
> > 2DCCB580C01 1901 Mon Nov 26 11:45:02  trus...@gmail.com
> >   (mail transport
> > unavailable)
> >  trus...@bettafootwear.com
> >
> > B1449580C03 1895 Mon Nov 26 11:48:41  trus...@gmail.com
> >   (mail transport
> > unavailable)
> >  trus...@bettafootwear.com
> >
> > -- 5 Kbytes in 2 Requests.
> 
> I checked in /etc/syslog-ng/syslog-ng.conf and it shows destination d_mail
> { file("/var/log/mail.log"); }; but there is no such mail.log file so I
> created one.

I don't know how syslog-ng works, but you need to be able to see the
Postfix logs to have any chance of debugging this. Read your system
documentation and get that working before trying anything else.

> I logged in as mailman by doing su -s /bin/bash mailman then ran
> 
> /usr/lib/dovecot/dovecot-lda -f trus...@gmail.com -d
> trus...@bettafootwear.com  
> where /home/mailman/test_msg.txt contains a plain text sentence.

A single sentence is not a valid mail. Dovecot mostly doesn't care, but
you will see odd client behaviour if you deliver invalid mails...

> After doing that, mailq shows the new messages, but with the same "mail
> transport unavailable" message.

(I assume here that you only see the same list as before you attempted
the new delivery? Delivering to LDA by hand shouldn't go anywhere near
the Postfix queue.)

> However, in Roundcube I see a new blank message with no subject for each
> attempt of the dovecot-lda command.

...such as this. It looks like the 'mail' is being successfully
delivered; if you try with a proper mail, something like

From: root@localhost
To: root@localhost
Subject: testing dovecot-lda

1 2 3

it should show up properly in your client.

At this point I think this is a Postfix problem, not a Dovecot problem.
You can apparently successfully deliver mail using dovecot-lda, so
something in your Postfix config is not invoking it properly.

Ben



Re: [Dovecot] Dovecot sieve with postfix.

2012-11-26 Thread Николай Клименко

1. clear the log
2. Send message
3. show mail.log mail.err

you should add following in main.cf

dovecot_destination_recipient_limit = 1


27.11.12 1:15, /#!/JoePea пишет:

Hi, thanks for the reply,
What's the difference between dovecot-lda and deliver? Are they the 
same? The manpages are identical. I tried both and I also tried adding 
the -a ${recipient} argument but there was no change. It still doesn't 
work. Any other ideas?


*/#/!//*JoePea


On Mon, Nov 26, 2012 at 11:26 AM, Николай Клименко 
mailto:klimenk...@theitidea.ru>> wrote:


may be this is the best way


dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver  -f
${sender} -d ${recipient} -a ${recipient}

parameter-a $ {recipient}
allow to keep the recipient's address in the headers "from:"


19.11.12 21:04, Fi4IT - Daniel Fischer пишет:

Hello Joe,

i use this:
main.cf 
virtual_transport = dovecot

master.cf 
dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f
${sender} -d ${recipient}

/etc/dovecot/conf.d/15-lda.conf
protocol lda {
  log_path = /var/log/sieve.log
  mail_plugins = acl sieve
}

and that works fine with my tested clients (tb,outlook,roundcube)

daniel

Am 19.11.2012 15:17, schrieb /#!/JoePea:

Hi all,

I can't get dovecot working with postfix. If I leave
virtual_transport set
to "virtual", I can send and receive messages just fine in
roundcube. If I
set virtual_transport to "dovecot", I can only send
messages in roundcube,
but incoming messages never arrive. Seems I can't get
dovecot-lda to work.
I need dovecot-lda in order for sieve filters to work.

Any idea what I'm doing wrong?

Here's `doveconf -n`:
http://pastie.org/5401133

`postconf -n`:
http://pastie.org/5401157

and `postconf -M`:
http://pastie.org/5401177

Note: All I have to do is change virtual_transport =
dovecot to
virtual_transport
= virtual and all will be fine, except for that I won't
have sieve
filtering which is what I really want.

*/#!/*JoePea






Re: [Dovecot] Dovecot sieve with postfix.

2012-11-26 Thread /#!/JoePea
Hi Ben,
Indeed, the mailq command shows my test messages sitting there with "mail
transport unavailable".

> ┌─[11:48:22/hypership/root/~]
> └─╼ mailq
> -Queue ID- --Size-- Arrival Time -Sender/Recipient---
> 2DCCB580C01 1901 Mon Nov 26 11:45:02  trus...@gmail.com
>   (mail transport
> unavailable)
>  trus...@bettafootwear.com
>
> B1449580C03 1895 Mon Nov 26 11:48:41  trus...@gmail.com
>   (mail transport
> unavailable)
>  trus...@bettafootwear.com
>
> -- 5 Kbytes in 2 Requests.
>

I checked in /etc/syslog-ng/syslog-ng.conf and it shows destination d_mail
{ file("/var/log/mail.log"); }; but there is no such mail.log file so I
created one.

I logged in as mailman by doing su -s /bin/bash mailman then ran

/usr/lib/dovecot/dovecot-lda -f trus...@gmail.com -d
trus...@bettafootwear.com  wrote:

> At  2AM -0800 on 26/11/12 you (/#!/JoePea) wrote:
> > Hi, thanks for the reply. I'm new to all this. How can I tell if postfix
> is
> > deferring messages, or if it thinks they've been delieverd? Where is the
> > postfix log?
>
> You can tell if a message is still in the queue with 'mailq'. You can
> find out why by reading the log. If messages are being deferred they
> will eventually start bouncing, once Postfix decides they've spent too
> long in the queue.
>
> Postfix normally logs through the 'mail' facility of syslog.
>
> > How do I feed a message to dovecot-lda manually, as mailman?
>
> Something along the lines of
>
> sudo -u mailman /usr/lib/dovecot/dovecot-lda -f some@user
> -d some@user 
> as root should work, depending on your sudo setup. Otherwise you will
> need to use su, which can be more awkward.
>
> > How do I use LMTP instead of LDA?
>
> Read the wiki for the Dovecot end, and use
>
> virtual_transport = lmtp:unix:/path/to/lmtp/socket
>
> on the Postfix end. You will want to test the LMTP server is working
> manually (with nc -U or something) before trying to get Postfix to
> deliver to it.
>
> Ben
>
>


Re: [Dovecot] Dovecot sieve with postfix.

2012-11-26 Thread Николай Клименко

may be this is the best way

dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver  -f 
${sender} -d ${recipient} -a ${recipient}


parameter-a $ {recipient}
allow to keep the recipient's address in the headers "from:"


19.11.12 21:04, Fi4IT - Daniel Fischer пишет:

Hello Joe,

i use this:
main.cf
virtual_transport = dovecot

master.cf
dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f 
${sender} -d ${recipient}


/etc/dovecot/conf.d/15-lda.conf
protocol lda {
  log_path = /var/log/sieve.log
  mail_plugins = acl sieve
}

and that works fine with my tested clients (tb,outlook,roundcube)

daniel

Am 19.11.2012 15:17, schrieb /#!/JoePea:

Hi all,

I can't get dovecot working with postfix. If I leave 
virtual_transport set
to "virtual", I can send and receive messages just fine in roundcube. 
If I
set virtual_transport to "dovecot", I can only send messages in 
roundcube,
but incoming messages never arrive. Seems I can't get dovecot-lda to 
work.

I need dovecot-lda in order for sieve filters to work.

Any idea what I'm doing wrong?

Here's `doveconf -n`:
http://pastie.org/5401133

`postconf -n`:
http://pastie.org/5401157

and `postconf -M`:
http://pastie.org/5401177

Note: All I have to do is change virtual_transport = dovecot to
virtual_transport
= virtual and all will be fine, except for that I won't have sieve
filtering which is what I really want.

*/#!/*JoePea





Re: [Dovecot] Dovecot sieve with postfix.

2012-11-26 Thread Ben Morrow
At  2AM -0800 on 26/11/12 you (/#!/JoePea) wrote:
> Hi, thanks for the reply. I'm new to all this. How can I tell if postfix is
> deferring messages, or if it thinks they've been delieverd? Where is the
> postfix log?

You can tell if a message is still in the queue with 'mailq'. You can
find out why by reading the log. If messages are being deferred they
will eventually start bouncing, once Postfix decides they've spent too
long in the queue.

Postfix normally logs through the 'mail' facility of syslog. 

> How do I feed a message to dovecot-lda manually, as mailman?

Something along the lines of

sudo -u mailman /usr/lib/dovecot/dovecot-lda -f some@user 
-d some@user  How do I use LMTP instead of LDA?

Read the wiki for the Dovecot end, and use

virtual_transport = lmtp:unix:/path/to/lmtp/socket

on the Postfix end. You will want to test the LMTP server is working
manually (with nc -U or something) before trying to get Postfix to
deliver to it.

Ben



Re: [Dovecot] Dovecot sieve with postfix.

2012-11-26 Thread /#!/JoePea
Hi, I tried changing dovecot-lda to deliver in master.cf and also added the
acl plugin to the lda protocol like yours. It still won't work though.

*/#!/*JoePea


On Mon, Nov 19, 2012 at 9:04 AM, Fi4IT - Daniel Fischer
wrote:

> Hello Joe,
>
> i use this:
> main.cf
> virtual_transport = dovecot
>
> master.cf
> dovecot   unix  -   n   n   -   -   pipe
>   flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender}
> -d ${recipient}
>
> /etc/dovecot/conf.d/15-lda.**conf
> protocol lda {
>   log_path = /var/log/sieve.log
>   mail_plugins = acl sieve
> }
>
> and that works fine with my tested clients (tb,outlook,roundcube)
>
> daniel
>
> Am 19.11.2012 15:17, schrieb /#!/JoePea:
>
>> Hi all,
>>
>> I can't get dovecot working with postfix. If I leave virtual_transport set
>> to "virtual", I can send and receive messages just fine in roundcube. If I
>> set virtual_transport to "dovecot", I can only send messages in roundcube,
>> but incoming messages never arrive. Seems I can't get dovecot-lda to work.
>> I need dovecot-lda in order for sieve filters to work.
>>
>> Any idea what I'm doing wrong?
>>
>> Here's `doveconf -n`:
>> http://pastie.org/5401133
>>
>> `postconf -n`:
>> http://pastie.org/5401157
>>
>> and `postconf -M`:
>> http://pastie.org/5401177
>>
>> Note: All I have to do is change virtual_transport = dovecot to
>> virtual_transport
>> = virtual and all will be fine, except for that I won't have sieve
>> filtering which is what I really want.
>>
>> */#!/*JoePea
>>
>>
>
> --
>
> Fischer Daniel
> FI4IT - that's it
> Messerschmittstrasse 17
> 89231 Neu Ulm
>
> Email: dfisc...@fi4it.de
> Web: www.fi4it.de
> Telefon: 073180019370
> Fax: 073180019375
> Mobil: 01729230731
>
>


Re: [Dovecot] Dovecot sieve with postfix.

2012-11-26 Thread /#!/JoePea
Hi, thanks for the reply. I'm new to all this. How can I tell if postfix is
deferring messages, or if it thinks they've been delieverd? Where is the
postfix log?

How do I feed a message to dovecot-lda manually, as mailman?

How do I use LMTP instead of LDA?

*/#!/*JoePea


On Mon, Nov 19, 2012 at 8:47 AM, Ben Morrow  wrote:

> At  6AM -0800 on 19/11/12 you (/#!/JoePea) wrote:
> >
> > I can't get dovecot working with postfix. If I leave virtual_transport
> set
> > to "virtual", I can send and receive messages just fine in roundcube. If
> I
> > set virtual_transport to "dovecot", I can only send messages in
> roundcube,
> > but incoming messages never arrive. Seems I can't get dovecot-lda to
> work.
> > I need dovecot-lda in order for sieve filters to work.
> >
> > Any idea what I'm doing wrong?
> >
> > Here's `doveconf -n`:
> > http://pastie.org/5401133
> >
> > `postconf -n`:
> > http://pastie.org/5401157
> >
> > and `postconf -M`:
> > http://pastie.org/5401177
>
> The only obvious thing I can see wrong there is that you have
>
> mail_plugins = " sieve"
>
> in dovecot.conf, which should be
>
> mail_plugins = sieve
>
> but I don't know that that would prevent delivery.
>
> Is Postfix deferring the message, or does it think it's been delivered?
> What do you see in your logs when a message is delivered (since you've
> redirected Dovecot away from syslog, you'd need to look at both
> Postfix's and Dovecot's logs)?
>
> What happens if you feed a message to dovecot-lda manually, as
> 'mailman'? Check the exitcode of lda and the logs, as well as seeing if
> the message was delivered.
>
> Since you've set up a dedicated transport for Dovecot, it would probably
> be worth using LMTP instead of the LDA. It should be more efficient, and
> since you're only using a single virtual user you can tell dovecot to
> run the LMTP server as 'mailman' instead of root.
>
> Ben
>
>


Re: [Dovecot] Dovecot sieve with postfix.

2012-11-19 Thread Fi4IT - Daniel Fischer

Hello Joe,

i use this:
main.cf
virtual_transport = dovecot

master.cf
dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f 
${sender} -d ${recipient}


/etc/dovecot/conf.d/15-lda.conf
protocol lda {
  log_path = /var/log/sieve.log
  mail_plugins = acl sieve
}

and that works fine with my tested clients (tb,outlook,roundcube)

daniel

Am 19.11.2012 15:17, schrieb /#!/JoePea:

Hi all,

I can't get dovecot working with postfix. If I leave virtual_transport set
to "virtual", I can send and receive messages just fine in roundcube. If I
set virtual_transport to "dovecot", I can only send messages in roundcube,
but incoming messages never arrive. Seems I can't get dovecot-lda to work.
I need dovecot-lda in order for sieve filters to work.

Any idea what I'm doing wrong?

Here's `doveconf -n`:
http://pastie.org/5401133

`postconf -n`:
http://pastie.org/5401157

and `postconf -M`:
http://pastie.org/5401177

Note: All I have to do is change virtual_transport = dovecot to
virtual_transport
= virtual and all will be fine, except for that I won't have sieve
filtering which is what I really want.

*/#!/*JoePea




--

Fischer Daniel
FI4IT - that's it
Messerschmittstrasse 17
89231 Neu Ulm

Email: dfisc...@fi4it.de
Web: www.fi4it.de
Telefon: 073180019370
Fax: 073180019375
Mobil: 01729230731



Re: [Dovecot] Dovecot sieve with postfix.

2012-11-19 Thread Ben Morrow
At  6AM -0800 on 19/11/12 you (/#!/JoePea) wrote:
> 
> I can't get dovecot working with postfix. If I leave virtual_transport set
> to "virtual", I can send and receive messages just fine in roundcube. If I
> set virtual_transport to "dovecot", I can only send messages in roundcube,
> but incoming messages never arrive. Seems I can't get dovecot-lda to work.
> I need dovecot-lda in order for sieve filters to work.
> 
> Any idea what I'm doing wrong?
> 
> Here's `doveconf -n`:
> http://pastie.org/5401133
> 
> `postconf -n`:
> http://pastie.org/5401157
> 
> and `postconf -M`:
> http://pastie.org/5401177

The only obvious thing I can see wrong there is that you have

mail_plugins = " sieve"

in dovecot.conf, which should be

mail_plugins = sieve

but I don't know that that would prevent delivery.

Is Postfix deferring the message, or does it think it's been delivered?
What do you see in your logs when a message is delivered (since you've
redirected Dovecot away from syslog, you'd need to look at both
Postfix's and Dovecot's logs)?

What happens if you feed a message to dovecot-lda manually, as
'mailman'? Check the exitcode of lda and the logs, as well as seeing if
the message was delivered.

Since you've set up a dedicated transport for Dovecot, it would probably
be worth using LMTP instead of the LDA. It should be more efficient, and
since you're only using a single virtual user you can tell dovecot to
run the LMTP server as 'mailman' instead of root.

Ben