Re: Aw: Re: problem with lda

2018-01-27 Thread Stephan Bosch
Op 1/25/2018 om 2:07 PM schreef Infoomatic:
> Stephan: I don't know, and and it even does not work when I use deliver -f 
> "postmaster@ourdomain.internal" - I get the same error message.

Are you sure about that? I don't get an error here; well only when I
omit the domain. Did you try this from command line?


Regards,

Stephan.

>
> A part of the mail I got when using 2.2.23:
>
> Return-Path: 
> Delivered-To: user1@ourdomain.internal
> Received: from localhost (localhost [127.0.0.1])
>   by hosting.ourdomain.internal (Postfix) with ESMTP id 8E985424C7
>   for ; Thu, 25 Jan 2018 12:36:59 +0100 (CET)
> Content-Type: multipart/report; report-type=delivery-status;
>
> That's strange. Any ideas, anyone?
>
> Regards,
> infoomatic
>
>
>> Gesendet: Donnerstag, 25. Januar 2018 um 09:35 Uhr
>> Von: "Stephan Bosch" 
>> An: Infoomatic , dovecot@dovecot.org
>> Betreff: Re: problem with lda
>>
>> Op 1/24/2018 om 5:30 PM schreef Infoomatic:
>>> Hello,
>>>
>>> I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I 
>>> have a strange problem with lda.
>>> We use bounce mails for internal users if they try to send virus/spammails. 
>>> The exact same config works with 2.2.23, but not with 2.3.0.
>>>
>>> The relevant postfix/master.cf part:
>>> dovecot   unix  -   n   n   -   -   pipe
>>>   flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver -d 
>>> ${recipient} -f ${sender}
>>>
>>> On the same machine, with 2.2.23 I get a bounce mail when trying to send a 
>>> virus, with the subject "VIRUS in message apparently from you 
>>> (Eicar-Test-Signature)", to both the users inbox as well as to the mailbox 
>>> of virusalert@ourdomain.internal
>>>
>>> With 2.3.0, in the logs I get an error:
>>>
>>> relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced 
>>> (command line usage error. Command output: lda: Fatal: Invalid -f 
>>> parameter: Missing domain 
>>>
>>> and the alert message is only sent to virusalert@ourdomain.internal, but 
>>> not to the user who tried to send the mail.
>>>
>>> The relevant part of our dovecot.conf:
>>> protocol lda {
>>>   mail_plugins = " quota zlib sieve acl mail_log notify"
>>>   postmaster_address = postmaster@ourdomain.internal
>>> }
>>>
>>> Does anyone know how to solve this problem? Or is there a workaround via 
>>> postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!
>> Apparently, the ${sender} has no @domain part. Why?
>>
>> Regards,
>>
>> Stephan.
>>



Aw: Re: problem with lda

2018-01-27 Thread Infoomatic
My workaround for this issue was to use lmtp which now works flawlessly.

Regards,
infoomatic



> Gesendet: Donnerstag, 25. Januar 2018 um 14:07 Uhr
> Von: Infoomatic 
> An: "Stephan Bosch" , "Dovecot ML" 
> Betreff: Aw: Re: problem with lda
>
> thanks for your input.
> 
> Bill: deliver is just a symlink to dovecot-lda
> Stephan: I don't know, and and it even does not work when I use deliver -f 
> "postmaster@ourdomain.internal" - I get the same error message.
> 
> A part of the mail I got when using 2.2.23:
> 
> Return-Path: 
> Delivered-To: user1@ourdomain.internal
> Received: from localhost (localhost [127.0.0.1])
>   by hosting.ourdomain.internal (Postfix) with ESMTP id 8E985424C7
>   for ; Thu, 25 Jan 2018 12:36:59 +0100 (CET)
> Content-Type: multipart/report; report-type=delivery-status;
> 
> That's strange. Any ideas, anyone?
> 
> Regards,
> infoomatic
> 
> 
> > Gesendet: Donnerstag, 25. Januar 2018 um 09:35 Uhr
> > Von: "Stephan Bosch" 
> > An: Infoomatic , dovecot@dovecot.org
> > Betreff: Re: problem with lda
> >
> > Op 1/24/2018 om 5:30 PM schreef Infoomatic:
> > > Hello,
> > >
> > > I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I 
> > > have a strange problem with lda.
> > > We use bounce mails for internal users if they try to send 
> > > virus/spammails. The exact same config works with 2.2.23, but not with 
> > > 2.3.0.
> > >
> > > The relevant postfix/master.cf part:
> > > dovecot   unix  -   n   n   -   -   pipe
> > >   flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver 
> > > -d ${recipient} -f ${sender}
> > >
> > > On the same machine, with 2.2.23 I get a bounce mail when trying to send 
> > > a virus, with the subject "VIRUS in message apparently from you 
> > > (Eicar-Test-Signature)", to both the users inbox as well as to the 
> > > mailbox of virusalert@ourdomain.internal
> > >
> > > With 2.3.0, in the logs I get an error:
> > >
> > > relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced 
> > > (command line usage error. Command output: lda: Fatal: Invalid -f 
> > > parameter: Missing domain 
> > >
> > > and the alert message is only sent to virusalert@ourdomain.internal, but 
> > > not to the user who tried to send the mail.
> > >
> > > The relevant part of our dovecot.conf:
> > > protocol lda {
> > >   mail_plugins = " quota zlib sieve acl mail_log notify"
> > >   postmaster_address = postmaster@ourdomain.internal
> > > }
> > >
> > > Does anyone know how to solve this problem? Or is there a workaround via 
> > > postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!
> > 
> > Apparently, the ${sender} has no @domain part. Why?
> > 
> > Regards,
> > 
> > Stephan.
> > 
> 


Re: Aw: Re: problem with lda

2018-01-26 Thread Bill Shirley

Right, I figured out the symlink after I sent my response.

Did you try the command switches from my post?

Bill


On 1/25/2018 8:07 AM, Infoomatic wrote:

thanks for your input.

Bill: deliver is just a symlink to dovecot-lda
Stephan: I don't know, and and it even does not work when I use deliver -f 
"postmaster@ourdomain.internal" - I get the same error message.

A part of the mail I got when using 2.2.23:

Return-Path: 
Delivered-To: user1@ourdomain.internal
Received: from localhost (localhost [127.0.0.1])
by hosting.ourdomain.internal (Postfix) with ESMTP id 8E985424C7
for ; Thu, 25 Jan 2018 12:36:59 +0100 (CET)
Content-Type: multipart/report; report-type=delivery-status;

That's strange. Any ideas, anyone?

Regards,
infoomatic



Gesendet: Donnerstag, 25. Januar 2018 um 09:35 Uhr
Von: "Stephan Bosch" 
An: Infoomatic , dovecot@dovecot.org
Betreff: Re: problem with lda

Op 1/24/2018 om 5:30 PM schreef Infoomatic:

Hello,

I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I have a 
strange problem with lda.
We use bounce mails for internal users if they try to send virus/spammails. The 
exact same config works with 2.2.23, but not with 2.3.0.

The relevant postfix/master.cf part:
dovecot   unix  -   n   n   -   -   pipe
   flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver -d 
${recipient} -f ${sender}

On the same machine, with 2.2.23 I get a bounce mail when trying to send a virus, with 
the subject "VIRUS in message apparently from you (Eicar-Test-Signature)", to 
both the users inbox as well as to the mailbox of virusalert@ourdomain.internal

With 2.3.0, in the logs I get an error:

relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced (command 
line usage error. Command output: lda: Fatal: Invalid -f parameter: Missing 
domain

and the alert message is only sent to virusalert@ourdomain.internal, but not to 
the user who tried to send the mail.

The relevant part of our dovecot.conf:
protocol lda {
   mail_plugins = " quota zlib sieve acl mail_log notify"
   postmaster_address = postmaster@ourdomain.internal
}

Does anyone know how to solve this problem? Or is there a workaround via 
postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!

Apparently, the ${sender} has no @domain part. Why?

Regards,

Stephan.





Aw: Re: problem with lda

2018-01-25 Thread Infoomatic
thanks for your input.

Bill: deliver is just a symlink to dovecot-lda
Stephan: I don't know, and and it even does not work when I use deliver -f 
"postmaster@ourdomain.internal" - I get the same error message.

A part of the mail I got when using 2.2.23:

Return-Path: 
Delivered-To: user1@ourdomain.internal
Received: from localhost (localhost [127.0.0.1])
by hosting.ourdomain.internal (Postfix) with ESMTP id 8E985424C7
for ; Thu, 25 Jan 2018 12:36:59 +0100 (CET)
Content-Type: multipart/report; report-type=delivery-status;

That's strange. Any ideas, anyone?

Regards,
infoomatic


> Gesendet: Donnerstag, 25. Januar 2018 um 09:35 Uhr
> Von: "Stephan Bosch" 
> An: Infoomatic , dovecot@dovecot.org
> Betreff: Re: problem with lda
>
> Op 1/24/2018 om 5:30 PM schreef Infoomatic:
> > Hello,
> >
> > I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I 
> > have a strange problem with lda.
> > We use bounce mails for internal users if they try to send virus/spammails. 
> > The exact same config works with 2.2.23, but not with 2.3.0.
> >
> > The relevant postfix/master.cf part:
> > dovecot   unix  -   n   n   -   -   pipe
> >   flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver -d 
> > ${recipient} -f ${sender}
> >
> > On the same machine, with 2.2.23 I get a bounce mail when trying to send a 
> > virus, with the subject "VIRUS in message apparently from you 
> > (Eicar-Test-Signature)", to both the users inbox as well as to the mailbox 
> > of virusalert@ourdomain.internal
> >
> > With 2.3.0, in the logs I get an error:
> >
> > relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced 
> > (command line usage error. Command output: lda: Fatal: Invalid -f 
> > parameter: Missing domain 
> >
> > and the alert message is only sent to virusalert@ourdomain.internal, but 
> > not to the user who tried to send the mail.
> >
> > The relevant part of our dovecot.conf:
> > protocol lda {
> >   mail_plugins = " quota zlib sieve acl mail_log notify"
> >   postmaster_address = postmaster@ourdomain.internal
> > }
> >
> > Does anyone know how to solve this problem? Or is there a workaround via 
> > postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!
> 
> Apparently, the ${sender} has no @domain part. Why?
> 
> Regards,
> 
> Stephan.
> 


Re: problem with lda

2018-01-25 Thread Stephan Bosch
Op 1/24/2018 om 5:30 PM schreef Infoomatic:
> Hello,
>
> I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I have 
> a strange problem with lda.
> We use bounce mails for internal users if they try to send virus/spammails. 
> The exact same config works with 2.2.23, but not with 2.3.0.
>
> The relevant postfix/master.cf part:
> dovecot   unix  -   n   n   -   -   pipe
>   flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver -d 
> ${recipient} -f ${sender}
>
> On the same machine, with 2.2.23 I get a bounce mail when trying to send a 
> virus, with the subject "VIRUS in message apparently from you 
> (Eicar-Test-Signature)", to both the users inbox as well as to the mailbox of 
> virusalert@ourdomain.internal
>
> With 2.3.0, in the logs I get an error:
>
> relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced (command 
> line usage error. Command output: lda: Fatal: Invalid -f parameter: Missing 
> domain 
>
> and the alert message is only sent to virusalert@ourdomain.internal, but not 
> to the user who tried to send the mail.
>
> The relevant part of our dovecot.conf:
> protocol lda {
>   mail_plugins = " quota zlib sieve acl mail_log notify"
>   postmaster_address = postmaster@ourdomain.internal
> }
>
> Does anyone know how to solve this problem? Or is there a workaround via 
> postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!

Apparently, the ${sender} has no @domain part. Why?

Regards,

Stephan.


Re: problem with lda

2018-01-24 Thread Bill Shirley

Shouldn't the executable be dovecot-lda?:
/usr/libexec/dovecot/dovecot-lda -d ${user}@${domain} -a {recipient} -f 
${sender} -m ${extension}

Bill

On 1/24/2018 11:30 AM, Infoomatic wrote:

Hello,

I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I have a 
strange problem with lda.
We use bounce mails for internal users if they try to send virus/spammails. The 
exact same config works with 2.2.23, but not with 2.3.0.

The relevant postfix/master.cf part:
dovecot   unix  -   n   n   -   -   pipe
   flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver -d 
${recipient} -f ${sender}

On the same machine, with 2.2.23 I get a bounce mail when trying to send a virus, with 
the subject "VIRUS in message apparently from you (Eicar-Test-Signature)", to 
both the users inbox as well as to the mailbox of virusalert@ourdomain.internal

With 2.3.0, in the logs I get an error:

relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced (command 
line usage error. Command output: lda: Fatal: Invalid -f parameter: Missing 
domain

and the alert message is only sent to virusalert@ourdomain.internal, but not to 
the user who tried to send the mail.

The relevant part of our dovecot.conf:
protocol lda {
   mail_plugins = " quota zlib sieve acl mail_log notify"
   postmaster_address = postmaster@ourdomain.internal
}

Does anyone know how to solve this problem? Or is there a workaround via 
postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!

Regards,
infoomatic




problem with lda

2018-01-24 Thread Infoomatic
Hello,

I am currently testing the upgrade from our dovecot v2.2.23 to 2.3.0. I have a 
strange problem with lda.
We use bounce mails for internal users if they try to send virus/spammails. The 
exact same config works with 2.2.23, but not with 2.3.0.

The relevant postfix/master.cf part:
dovecot   unix  -   n   n   -   -   pipe
  flags=DRhu user=vmail:vmail argv=/opt/dovecot/libexec/dovecot/deliver -d 
${recipient} -f ${sender}

On the same machine, with 2.2.23 I get a bounce mail when trying to send a 
virus, with the subject "VIRUS in message apparently from you 
(Eicar-Test-Signature)", to both the users inbox as well as to the mailbox of 
virusalert@ourdomain.internal

With 2.3.0, in the logs I get an error:

relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=5.3.0, status=bounced (command 
line usage error. Command output: lda: Fatal: Invalid -f parameter: Missing 
domain 

and the alert message is only sent to virusalert@ourdomain.internal, but not to 
the user who tried to send the mail.

The relevant part of our dovecot.conf:
protocol lda {
  mail_plugins = " quota zlib sieve acl mail_log notify"
  postmaster_address = postmaster@ourdomain.internal
}

Does anyone know how to solve this problem? Or is there a workaround via 
postfix/amavis/spamassassin? Any hints are highly appreciated, thanks!

Regards,
infoomatic


Re: [Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-23 Thread Dmitry

> Now you could filter using header_checks  
> (http://www.postfix.org/header_checks.5.html)
> /From: .*@domain1/ FILTER transport1:[1.1.1.1]


Big thanks for idea!
I don't really like it, but I have not found anything better...

I made
10025 inet  n   -   n   -   -   smtpd
  -o cleanup_service_name=clup_ar
clup_ar   unix  n   -   n   -   0   cleanup
  -o header_checks=regexp:/etc/postfix/header_checks
in postfix for auto-reply
submission_host = 10.10.10.10:10025
in dovecot
and this really work

Best Regards
Dmitry





Re: [Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-22 Thread Andreas Schulze


Zitat von Dmitry :


Users imap - 10.10.10.10:143
User smtp - 10.10.10.10:25
10.10.10.10:25 - postfix with
sender_dependent_relayhost_maps = hash:$config_directory/relayhost_maps


Dmitry,

just an untested idea:

leave the RFC5321.MAILFROM empty. That's fine as it avoid loops.
let the user set a RFC5322.From via sieve:

vacation :addresses "user@domain1 :from "user@domain1"
"vacation message"

Now you could filter using header_checks  
(http://www.postfix.org/header_checks.5.html)

/From: .*@domain1/ FILTER transport1:[1.1.1.1]
...


Andreas



Re: [Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-22 Thread Dmitry

> you should try to explain your problem and not how to implement a solution

Sorry. I know English bad.
I tried to describe the problem in the first letter.
I'll try again.

My Dovecot receive mail from many different domains (around 30) from many 
different machines.
1.1.1.1 - domain1
2.2.2.2 - domain2
3.3.3.3 - domain3
...
with different postfix with
virtual_transport = lmtp:10.10.10.10:24
in their main.cf
10.10.10.10 - machine with my dovecot.

Users imap - 10.10.10.10:143
User smtp - 10.10.10.10:25
10.10.10.10:25 - postfix with 
sender_dependent_relayhost_maps = hash:$config_directory/relayhost_maps

in relayhost_maps
@domain1[1.1.1.1]
@domain2[2.2.2.2]
@domain3[3.3.3.3]

for example user@domain2 receive mail:
inet -> 2.2.2.2:25 -> 10.10.10.10:24 -> saved to disk 
user@domain2 connect to 10.10.10.10:143 and read it.

for example user@domain2 sends mail:
user@domain2 connect to 10.10.10.10:25
because in relayhost_maps written
@domain2[2.2.2.2]
postfix sends it in 2.2.2.2
10.10.10.10:25 -> 2.2.2.2:25 -> inet

Everything works fine until the case comes to vacation auto-reply with 
dovecot-pigeonhole plugin :(
Because the domain of the sender is unknown, postfix 10.10.10.10 does not 
understand where to forward mail. Where relay for domain2.

I do not know what to do ...






On Wed, 22 Jan 2014 15:46:52 +0100
Reindl Harald  wrote:

> do not mix the "From: header address of MAILER-DAEMON" with the envelope
> from= would be the problem described below
> why in the world do you need "sender_dependent_relayhost_maps" for vacation?
> 
> you should try to explain your problem and not how to implement a solution
> http://www.catb.org/~esr/faqs/smart-questions.html
> 
> Am 22.01.2014 15:39, schrieb Dmitry:
> > Thanks for your quick reply.
> > 
> > Can I least make dovecot write from=?
> > How can I make "sender_dependent_relayhost_maps" works in postfix?
> > 
> > On Wed, 22 Jan 2014 14:18:26 +0100
> > Reindl Harald  wrote:
> > 
> >> Am 22.01.2014 13:39, schrieb Dmitry:
> >>> My problem is that when vacation auto-reply sent the field from=<>
> >>> Because of this does not work "sender_dependent_relayhost_maps" in postfix
> >>
> >> <> is correct in case of auto-responders
> >>
> >> why?
> >> to prevent mail-loops if both sides have a responder
> >>
> >> well, there are special headers too for this but they
> >> rely on be respected by the final destination while
> >> null sender never get bounces and replies
> >>
> >> http://en.wikipedia.org/wiki/Bounce_message
> >>
> >> Bounce messages in SMTP are sent with the envelope sender address <>,
> >> known as the null sender address. They are frequently sent with a From:
> >> header address of MAILER-DAEMON at the recipient site.
> 


Re: [Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-22 Thread Reindl Harald
do not mix the "From: header address of MAILER-DAEMON" with the envelope
from= would be the problem described below
why in the world do you need "sender_dependent_relayhost_maps" for vacation?

you should try to explain your problem and not how to implement a solution
http://www.catb.org/~esr/faqs/smart-questions.html

Am 22.01.2014 15:39, schrieb Dmitry:
> Thanks for your quick reply.
> 
> Can I least make dovecot write from=?
> How can I make "sender_dependent_relayhost_maps" works in postfix?
> 
> On Wed, 22 Jan 2014 14:18:26 +0100
> Reindl Harald  wrote:
> 
>> Am 22.01.2014 13:39, schrieb Dmitry:
>>> My problem is that when vacation auto-reply sent the field from=<>
>>> Because of this does not work "sender_dependent_relayhost_maps" in postfix
>>
>> <> is correct in case of auto-responders
>>
>> why?
>> to prevent mail-loops if both sides have a responder
>>
>> well, there are special headers too for this but they
>> rely on be respected by the final destination while
>> null sender never get bounces and replies
>>
>> http://en.wikipedia.org/wiki/Bounce_message
>>
>> Bounce messages in SMTP are sent with the envelope sender address <>,
>> known as the null sender address. They are frequently sent with a From:
>> header address of MAILER-DAEMON at the recipient site.



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-22 Thread Dmitry
Thanks for your quick reply.

Can I least make dovecot write from=?
How can I make "sender_dependent_relayhost_maps" works in postfix?

Best Regards
Dmitry


On Wed, 22 Jan 2014 14:18:26 +0100
Reindl Harald  wrote:

> Am 22.01.2014 13:39, schrieb Dmitry:
> > My problem is that when vacation auto-reply sent the field from=<>
> > Because of this does not work "sender_dependent_relayhost_maps" in postfix
> 
> <> is correct in case of auto-responders
> 
> why?
> to prevent mail-loops if both sides have a responder
> 
> well, there are special headers too for this but they
> rely on be respected by the final destination while
> null sender never get bounces and replies
> 
> http://en.wikipedia.org/wiki/Bounce_message
> 
> Bounce messages in SMTP are sent with the envelope sender address <>,
> known as the null sender address. They are frequently sent with a From:
> header address of MAILER-DAEMON at the recipient site.
> 


Re: [Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-22 Thread Reindl Harald
Am 22.01.2014 13:39, schrieb Dmitry:
> My problem is that when vacation auto-reply sent the field from=<>
> Because of this does not work "sender_dependent_relayhost_maps" in postfix

<> is correct in case of auto-responders

why?
to prevent mail-loops if both sides have a responder

well, there are special headers too for this but they
rely on be respected by the final destination while
null sender never get bounces and replies

http://en.wikipedia.org/wiki/Bounce_message

Bounce messages in SMTP are sent with the envelope sender address <>,
known as the null sender address. They are frequently sent with a From:
header address of MAILER-DAEMON at the recipient site.



signature.asc
Description: OpenPGP digital signature


[Dovecot] Problem with LDA. When vacation auto-reply sent, the field from=<>.

2014-01-22 Thread Dmitry
Hi,

My problem is that when vacation auto-reply sent the field from=<>
Because of this does not work "sender_dependent_relayhost_maps" in postfix.

My scheme is:
There are several postfix on different machines
1.1.1.1 - domain1
2.2.2.2 - domain2
3.3.3.3 - domain3
All they send messages to one server
virtual_transport = lmtp:10.10.10.10:24
where mail is stored.
In 10.10.10.10 installed dovecot 2.2.9, dovecot-pigeonhole 0.4.2 and another 
posfix

In postfix
inet_interfaces = 10.10.10.10
sender_dependent_relayhost_maps = hash:$config_directory/relayhost_maps

relayhost_maps
@domain1[1.1.1.1]
@domain2[2.2.2.2]
@domain3[3.3.3.3]

Sieve script make from Roundcube

require ["vacation"];
# rule:[autoreply]
if true
{
vacation :days 1 :subject "Test." "Test.";
}

(if add [":from" string] nothing changes)

The letter comes, script fulfills, vacation auto-reply sent. But either
/usr/sbin/sendmail -i -f <> -- user@senddomain
or, if write in 15-lda.conf
submission_host = 10.10.10.10:25
postfix log
Jan 1 00:00:00 mail pf-OUT/cleanup[6098]: 4CD104A8A4: 
message-id=
Jan 1 00:00:00 mail pf-OUT/qmgr[5950]: 4CD104A8A4: from=<>, size=693, nrcpt=1 
(queue active)

How to make dovecot and dovecot-pigeonhole write in field MAIL FROM:?


Also, I noticed that does not work
protocol lda {
 ..
  # remember to give proper permissions for these files as well
  log_path = /var/log/dovecot-lda-errors.log
  info_log_path = /var/log/dovecot-lda.log
}
from
http://wiki2.dovecot.org/LDA
Logs are not written.


Thanks and regards,
Dmitry


Re: [Dovecot] Problem with LDA reject message

2013-05-11 Thread Simone Caruso
On 10/05/2013 14:47, Davide wrote:
> Hi to all, i have a problem with LDA when users are quota-full.
> My setup is Vpopmail + dovecot + lda; if i send a messagge internally to a
> user with quota full i receive correctly a messagge but in the header ( i
> attacch a snip)
>
> From - Fri May 10 14:42:27 2013
> X-Mozilla-Status: 0001
> X-Mozilla-Status2: 
> X-Mozilla-Keys:
> Return-Path: <"<>"@mail.cgilfe.it>
>
> i receive this strange Return-Path.
> I the messagge is sent outside other servers reply with this messagge:
>
Autodelivey and bounce must have empty return-path


-- 
Simone Caruso
IT Consultant
http://it.linkedin.com/in/simonecaruso/



[Dovecot] Problem with LDA reject message

2013-05-10 Thread Davide

Hi to all, i have a problem with LDA when users are quota-full.
My setup is Vpopmail + dovecot + lda; if i send a messagge internally to 
a user with quota full i receive correctly a messagge but in the header 
( i attacch a snip)


From - Fri May 10 14:42:27 2013
X-Mozilla-Status: 0001
X-Mozilla-Status2: 
X-Mozilla-Keys:
Return-Path: <"<>"@mail.cgilfe.it>

i receive this strange Return-Path.
I the messagge is sent outside other servers reply with this messagge:

Subject: failure notice

Hi. This is the qmail-send program at mail.cgilfe.it.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

:
Connected to 80.207.169.234 but sender was rejected.
Remote host said: 501 Address Syntax Error in <"<>"@mail.cgilfe.it>

this is my .qmail-default file:

|/var/qmail/bin/preline -f /usr/local/libexec/dovecot/dovecot-lda -d $EXT@$USER | 
/home/vpopmail/bin/vdelivermail "" bounce-no-mailbox

Thanks in advance.


--
*Davide Marchi*
*T*eorema *F*errara *Srl*
Via Spronello, 7 - Ferrara - 44121
Tel. *0532783161* Fax. *0532783368*
E-m@il: *davide.mar...@mail.cgilfe.it*
Skype: *davide.marchi73*
Web: *http://www.cgilfe.it*

*CONFIDENZIALITA'*
*Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute 
in questo messaggio sono riservate ed a uso esclusivo del 
destinatario/dei destinatari. Qualora il messaggio in parola Le fosse 
pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a non 
inoltrarlo a terzi, dandocene gentilmente comunicazione.*


*Per favore, pensa all'ambiente. Stampa questa email solo se necessario.*


Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-09 Thread Tobi


Am 09.05.2013 02:30, schrieb Ben Morrow:

At  9PM +0200 on  8/05/13 you (Tobi) wrote:

Am 08.05.2013 19:21, schrieb Ben Morrow:

At  6PM +0200 on  7/05/13 you (Tobi) wrote:

I tried with removing the base_dir definition from my config, restartet
dovecot and checked with the commands you provided below:
<<
root@nordkap:~# doveconf -d base_dir
base_dir = /usr/local/var/run/dovecot
root@nordkap:~# doveconf base_dir
base_dir = /usr/local/var/run/dovecot
root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
base_dir = /usr/local/var/run/dovecot
   >>
for me it seems that all is build with /usr/local

OK, that's odd. I was wondering if you had some permission problem which
was stopping the lda from reading the config file, but apparently not.

Sorry my subject is a bit misleading ;-)

I wasn't confused by the subject: IIRC if LDA can't read a config file,
it will simply ignore it (on the grounds that it is often running as an
ordinary user and so might not be supposed to), meaning that if the
permissions on the config file were too restrictive the LDA running as
vmail might not have seen the base_dir setting. Apparently that's not
the case...


As I updated today to wheezy anyway I built dovecot again with the
following options:
<<
./configure --prefix=/usr/local --localstatedir=/usr/local/var
--with-mysql --with-sql
make && make install
  >>
but as well with those after starting dovecot and postfix the errors of
the lda looking in /var/run occured again.

OK... interesting choice, now you understand why /usr/local/var is not
usually used, but anyway...

this localstatedir option was just a "test" to see if lda looks in the 
localstatedir specified with configure. At least in my case it is not. 
After that test I built again with localstatedir=/var (as suggested by 
Christian) and like that it works fine without the symlink

But after removing the symlink and restarting dovecot I get the errors again
<<
May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup:
connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred.
Refer to server log for more information.
   >>

Are you sure you're running the right copy of dovecot-lda? I think you
mentioned xthread that you have a Debian-provided version installed as
well?

Yes I had the version from apt as well, but removed it today after
upgrading to wheezy. The lda is called from postfix by these lines in
master.cf
<<
dovecot unix-   n   n   -   -   pipe
   flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f
${sender} -d ${user}@${nexthop}
  >>
so according to the path prefix it should be the correct copy of
deliver. Is there a switch to get the version from deliver? I tried the
usual -v and --version but no success. But even without the version I'm
99.99873% sure that the correct binary is used :-)

OK. So the next step is to try running deliver by hand, as vmail,
feeding it a mail from stdin, to see if that fails the same way. If it
does then I would next run it under strace, to see exactly what it's
trying to do and what files it's looking at.

You could also run ldd on deliver, just to make sure it's picking up the
right versions of the dovecot libraries. The hardcoded base_dir path
appears to be baked into libdovecot.so.0, so if you run

 strings /path/to/libdovecot.so.0 | grep /var

As I actually built with localstatedir=/var all the paths are correct
<<
ldd /usr/local/libexec/dovecot/deliver
...
libdovecot.so.0 => /usr/local/lib/dovecot/libdovecot.so.0 
(0x7fc41bcd9000)

...
>>
and
<<
root@nordkap:~# strings /usr/local/lib/dovecot/libdovecot.so.0 | grep /var
/var/lib/dovecot/instances
/var/run/dovecot/config
/var/run/dovecot
/var/lib/dovecot
/var/run
/var/tmp
>>
I will built dovecot again with localstatedir=/usr/local/var and 
re-check the paths with the commands above.


Thanks for all the help here, really a great list

tobi


Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-08 Thread Ben Morrow
At  9PM +0200 on  8/05/13 you (Tobi) wrote:
> Am 08.05.2013 19:21, schrieb Ben Morrow:
> > At  6PM +0200 on  7/05/13 you (Tobi) wrote:
> >> I tried with removing the base_dir definition from my config, restartet
> >> dovecot and checked with the commands you provided below:
> >> <<
> >> root@nordkap:~# doveconf -d base_dir
> >> base_dir = /usr/local/var/run/dovecot
> >> root@nordkap:~# doveconf base_dir
> >> base_dir = /usr/local/var/run/dovecot
> >> root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
> >> base_dir = /usr/local/var/run/dovecot
> >>   >>
> >> for me it seems that all is build with /usr/local
> > OK, that's odd. I was wondering if you had some permission problem which
> > was stopping the lda from reading the config file, but apparently not.
> Sorry my subject is a bit misleading ;-)

I wasn't confused by the subject: IIRC if LDA can't read a config file,
it will simply ignore it (on the grounds that it is often running as an
ordinary user and so might not be supposed to), meaning that if the
permissions on the config file were too restrictive the LDA running as
vmail might not have seen the base_dir setting. Apparently that's not
the case...

> As I updated today to wheezy anyway I built dovecot again with the 
> following options:
> <<
> ./configure --prefix=/usr/local --localstatedir=/usr/local/var 
> --with-mysql --with-sql
> make && make install
>  >>
> but as well with those after starting dovecot and postfix the errors of 
> the lda looking in /var/run occured again.

OK... interesting choice, now you understand why /usr/local/var is not
usually used, but anyway...

> >> But after removing the symlink and restarting dovecot I get the errors 
> >> again
> >> <<
> >> May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup:
> >> connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
> >> May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred.
> >> Refer to server log for more information.
> >>   >>
> > Are you sure you're running the right copy of dovecot-lda? I think you
> > mentioned xthread that you have a Debian-provided version installed as
> > well?
> Yes I had the version from apt as well, but removed it today after 
> upgrading to wheezy. The lda is called from postfix by these lines in 
> master.cf
> <<
> dovecot unix-   n   n   -   -   pipe
>   flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f 
> ${sender} -d ${user}@${nexthop}
>  >>
> so according to the path prefix it should be the correct copy of 
> deliver. Is there a switch to get the version from deliver? I tried the 
> usual -v and --version but no success. But even without the version I'm 
> 99.99873% sure that the correct binary is used :-)

OK. So the next step is to try running deliver by hand, as vmail,
feeding it a mail from stdin, to see if that fails the same way. If it
does then I would next run it under strace, to see exactly what it's
trying to do and what files it's looking at.

You could also run ldd on deliver, just to make sure it's picking up the
right versions of the dovecot libraries. The hardcoded base_dir path
appears to be baked into libdovecot.so.0, so if you run

strings /path/to/libdovecot.so.0 | grep /var

with the appropriate full path to the library ldd says deliver is using,
you can see which path got baked in.

Ben


Ben



Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-08 Thread Tobi

Am 08.05.2013 19:21, schrieb Ben Morrow:

At  6PM +0200 on  7/05/13 you (Tobi) wrote:

I tried with removing the base_dir definition from my config, restartet
dovecot and checked with the commands you provided below:
<<
root@nordkap:~# doveconf -d base_dir
base_dir = /usr/local/var/run/dovecot
root@nordkap:~# doveconf base_dir
base_dir = /usr/local/var/run/dovecot
root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
base_dir = /usr/local/var/run/dovecot
  >>
for me it seems that all is build with /usr/local

OK, that's odd. I was wondering if you had some permission problem which
was stopping the lda from reading the config file, but apparently not.

Sorry my subject is a bit misleading ;-)
As I updated today to wheezy anyway I built dovecot again with the 
following options:

<<
./configure --prefix=/usr/local --localstatedir=/usr/local/var 
--with-mysql --with-sql

make && make install
>>
but as well with those after starting dovecot and postfix the errors of 
the lda looking in /var/run occured again.

But after removing the symlink and restarting dovecot I get the errors again
<<
May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup:
connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred.
Refer to server log for more information.
  >>

Are you sure you're running the right copy of dovecot-lda? I think you
mentioned xthread that you have a Debian-provided version installed as
well?
Yes I had the version from apt as well, but removed it today after 
upgrading to wheezy. The lda is called from postfix by these lines in 
master.cf

<<
dovecot unix-   n   n   -   -   pipe
 flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f 
${sender} -d ${user}@${nexthop}

>>
so according to the path prefix it should be the correct copy of 
deliver. Is there a switch to get the version from deliver? I tried the 
usual -v and --version but no success. But even without the version I'm 
99.99873% sure that the correct binary is used :-)


tobi



Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-08 Thread Ben Morrow
At  6PM +0200 on  7/05/13 you (Tobi) wrote:
> 
> I tried with removing the base_dir definition from my config, restartet 
> dovecot and checked with the commands you provided below:
> <<
> root@nordkap:~# doveconf -d base_dir
> base_dir = /usr/local/var/run/dovecot
> root@nordkap:~# doveconf base_dir
> base_dir = /usr/local/var/run/dovecot
> root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
> base_dir = /usr/local/var/run/dovecot
>  >>
> for me it seems that all is build with /usr/local

OK, that's odd. I was wondering if you had some permission problem which
was stopping the lda from reading the config file, but apparently not.

> But after removing the symlink and restarting dovecot I get the errors again
> <<
> May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup: 
> connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
> May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred. 
> Refer to server log for more information.
>  >>

Are you sure you're running the right copy of dovecot-lda? I think you
mentioned xthread that you have a Debian-provided version installed as
well?

Ben



Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-08 Thread Christian Wiese
Hi Tobi,

> my problem is not why /usr/local is used
> I choose this prefix intentionally so that I have the new dovecot 
> separeted from the "old" one from debian backports.

As I tried to say in my mailing list post '/usr/local' is the right
choice to avoid conflicts with binary packages provided by your
favorite distribution.

> My problem is more: why does the lda search in /var/run when all the 
> rest of dovecot correctly uses /usr/local/var/run
> The problem is only the lda part. All other stuff from dovecot looks
> in the correct location (login, plugins etc)
> I wait until debian has 2.2 dovecot in repo and then this symlink is
> not needed anymore ;-)

It seems you didn't read my mail carefully ;)
You do not have to wait for debian providing a dovecot 2.2 binary
package.

To solve your "symlink issue" right now, you do not even have to
uninstall your current 2.2 installation, because you simply need to
reconfigure your source tree using exactly the same configure options
like before, only adding '--localstatedir=/var'.

So if you used something like './configure --prefix=/usr/local' you
simply need to run:
--%<---
./configure --prefix=/usr/local --localstatedir=/var'
--%<---

Of course you also need to run 'make' and before running 'make install'
you should remove your current '/var/run/dovecot' symlink.

After restarting your dovecot service everything should be fine without
the need to create that symlink.

That's all what needs to be done.

Cheers,
Chris

Am Tue, 7 May 2013 18:24:07 +0200
schrieb Christian Wiese :

> Hi Tobi,
> 
> take a look at the output from 'configure --help'.
> The problem is the imo stupid default of '--localstatedir'.
> %<--
> --localstatedir=DIR modifiable single-machine data [PREFIX/var]
> %<--
> 
> Because you are obviously not specifying a prefix the default prefix
> '/usr/local' is used, thus your localstatedir is '/usr/local/var'.
> 
> When examining the output of 'configure --help' we will also find:
> %<--
> --with-rundir=DIR   Runtime data directory
> (LOCALSTATEDIR/run/dovecot)
> %<--
> 
> I guess now you see what your problem is.
> 
> AS you are compiling dovecot on your own (not using any prebuilt
> package) it is of course perfectly fine to use the default prefix
> (/usr/local), but you might want to simply specify
> '--localstatedir=/var' when running configure.
> Then there should be no need for you symlink ;)
> 
> Hope that helps.
> 
> Cheers,
> Chris
> 


Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-07 Thread Tobi

Hi Robert

yes all these users/groups are currently present (and were so before 
compiling)
But as I could "fix" the problem with a symlink I won't spend much more 
time in finding the root cause. It works and I'm happy. It's just my 
private server where I know the only customer very well ;-)



Cheers

tobi

Am 07.05.2013 08:49, schrieb Robert Schetterer:

Am 07.05.2013 07:39, schrieb Tobi:

Am 07.05.2013 02:21, schrieb Ben Morrow:

At  8PM +0200 on  6/05/13 Tobi wrote:

<<
2013 May  6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer
to server log for more information.
May  6 18:37:59 nordkap dovecot: lda: Error: userdb lookup:
connect(/var/run/dovecot/auth-userdb) failed: Connection refused
May  6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred.
Refer to server log for more information.
   >>

i hope you did not forget
to add the needed users with compile from source i.e with


adduser --system --group --no-create-home --disabled-login
--force-badname dovenull

adduser --system --group --no-create-home --disabled-login
--force-badname dovecot

adduser --no-create-home --disabled-login --gecos vmail vmail








Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-07 Thread Christian Wiese
Hi Tobi,

take a look at the output from 'configure --help'.
The problem is the imo stupid default of '--localstatedir'.
%<--
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
%<--

Because you are obviously not specifying a prefix the default prefix
'/usr/local' is used, thus your localstatedir is '/usr/local/var'.

When examining the output of 'configure --help' we will also find:
%<--
--with-rundir=DIR   Runtime data directory
(LOCALSTATEDIR/run/dovecot)
%<--

I guess now you see what your problem is.

AS you are compiling dovecot on your own (not using any prebuilt
package) it is of course perfectly fine to use the default prefix
(/usr/local), but you might want to simply specify
'--localstatedir=/var' when running configure.
Then there should be no need for you symlink ;)

Hope that helps.

Cheers,
Chris

Am Tue, 07 May 2013 18:07:22 +0200
schrieb Tobi :

> hi Ben
> 
> I tried with removing the base_dir definition from my config,
> restartet dovecot and checked with the commands you provided below:
> <<
> root@nordkap:~# doveconf -d base_dir
> base_dir = /usr/local/var/run/dovecot
> root@nordkap:~# doveconf base_dir
> base_dir = /usr/local/var/run/dovecot
> root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
> base_dir = /usr/local/var/run/dovecot
>  >>
> for me it seems that all is build with /usr/local
> But after removing the symlink and restarting dovecot I get the
> errors again <<
> May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup: 
> connect(/var/run/dovecot/auth-userdb) failed: No such file or
> directory May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error
> occurred. Refer to server log for more information.
>  >>
> I checked all the configs again for any path to /usr/local and found 
> nothing (which is not commented out) that  would affect basedir
> <<
> root@nordkap:~# find /usr/local/etc/dovecot/ -type f -exec grep -H 
> /usr/local/ {} \;
> /usr/local/etc/dovecot/README:/usr/local/share/doc/dovecot/example-config/
> /usr/local/etc/dovecot/dovecot.conf:!include_try 
> /usr/local/share/dovecot/protocols.d/*.protocol
> /usr/local/etc/dovecot/dovecot.conf:#base_dir
> = /usr/local/var/run/dovecot/ 
> /usr/local/etc/dovecot/conf.d/10-mail.conf:#mail_plugin_dir
> = /usr/local/lib/dovecot/modules
> /usr/local/etc/dovecot/conf.d/90-quota.conf:#  executable = script 
> /usr/local/bin/quota-warning.sh
>  >>
> So dovecot should use the default path /var/run if I understood you 
> right. But it does not do so in my case.
> Is there any information which I could provide to help narrow down
> the problem? On the other side it's not really important as it works
> like charm with a symlink ;-)
> 
> Cheers
> 
> tobi
> 
> > Probably your Dovecot binaries are built with a default base_dir of
> > /var/run/dovecot. What do the following give you?
> >
> >  doveconf -d base_dir(as root)
> >  doveconf base_dir   (as root)
> >  doveconf base_dir   (as vmail:vmail)
> >
> >> Would it might be a "fix" to symlink /usr/local/var/run/dovecot to
> >> /var/run/dovecot ? Or would that break something with dovecot?
> > It probably won't break anything, but why don't you just use
> > /var/run/dovecot in the first place and take that base_dir
> > definition out of dovecot.conf?
> >
> > Ben
> >
> 



-- 
Kind regards,
Mit freundlichen Grüßen,
Christian Wiese

Follow us on Facebook:


Follow us on Twitter:


-
Securepoint GmbH
Christian Wiese
Salzstr. 1
D-21335 Lueneburg
http://www.securepoint.de
Tele: ++49 4131 2401-0 Fax: ++49 4131 2401-50
Lueneburg HRB 1776
-

CONFIDENTIALITY :
This e-mail and any attachments are confidential and may be privileged.
If you are not a named recipient, please notify the sender immediately
and do not disclose the contents to another person, use it for any
purpose or store or copy the information in any medium.

GEHEIMHALTUNGSPFLICHT :
Dieses E-Mail und alle damit verbundenen Anlagen sind vertraulich
und dürfen nur bestimmten Personen zugänglich gemacht werden.
Sofern Sie nicht zu den angegebenen Empfängern gehören, benachrichtigen
Sie bitte unverzüglich den Absender. Der Inhalt darf weder an Dritte
weitergegeben noch zu anderen Zwecken verwendet werden. Die
Informationen dürfen auch nicht auf einem Datenträger gespeichert
oder auf einen Datenträger kopiert werden.


Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-07 Thread Tobi

hi Ben

I tried with removing the base_dir definition from my config, restartet 
dovecot and checked with the commands you provided below:

<<
root@nordkap:~# doveconf -d base_dir
base_dir = /usr/local/var/run/dovecot
root@nordkap:~# doveconf base_dir
base_dir = /usr/local/var/run/dovecot
root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
base_dir = /usr/local/var/run/dovecot
>>
for me it seems that all is build with /usr/local
But after removing the symlink and restarting dovecot I get the errors again
<<
May  7 17:47:57 nordkap dovecot: lda: Error: userdb lookup: 
connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
May  7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred. 
Refer to server log for more information.

>>
I checked all the configs again for any path to /usr/local and found 
nothing (which is not commented out) that  would affect basedir

<<
root@nordkap:~# find /usr/local/etc/dovecot/ -type f -exec grep -H 
/usr/local/ {} \;

/usr/local/etc/dovecot/README:/usr/local/share/doc/dovecot/example-config/
/usr/local/etc/dovecot/dovecot.conf:!include_try 
/usr/local/share/dovecot/protocols.d/*.protocol

/usr/local/etc/dovecot/dovecot.conf:#base_dir = /usr/local/var/run/dovecot/
/usr/local/etc/dovecot/conf.d/10-mail.conf:#mail_plugin_dir = 
/usr/local/lib/dovecot/modules
/usr/local/etc/dovecot/conf.d/90-quota.conf:#  executable = script 
/usr/local/bin/quota-warning.sh

>>
So dovecot should use the default path /var/run if I understood you 
right. But it does not do so in my case.
Is there any information which I could provide to help narrow down the 
problem? On the other side it's not really important as it works like 
charm with a symlink ;-)


Cheers

tobi


Probably your Dovecot binaries are built with a default base_dir of
/var/run/dovecot. What do the following give you?

 doveconf -d base_dir(as root)
 doveconf base_dir   (as root)
 doveconf base_dir   (as vmail:vmail)


Would it might be a "fix" to symlink /usr/local/var/run/dovecot to
/var/run/dovecot ? Or would that break something with dovecot?

It probably won't break anything, but why don't you just use
/var/run/dovecot in the first place and take that base_dir definition
out of dovecot.conf?

Ben





Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-06 Thread Robert Schetterer
Am 07.05.2013 07:39, schrieb Tobi:
> Am 07.05.2013 02:21, schrieb Ben Morrow:
>> At  8PM +0200 on  6/05/13 Tobi wrote:
>>> <<
>>> 2013 May  6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer
>>> to server log for more information.
>>> May  6 18:37:59 nordkap dovecot: lda: Error: userdb lookup:
>>> connect(/var/run/dovecot/auth-userdb) failed: Connection refused
>>> May  6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred.
>>> Refer to server log for more information.
>>>   >> 

i hope you did not forget
to add the needed users with compile from source i.e with


adduser --system --group --no-create-home --disabled-login
--force-badname dovenull

adduser --system --group --no-create-home --disabled-login
--force-badname dovecot

adduser --no-create-home --disabled-login --gecos vmail vmail



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-06 Thread Tobi

Am 07.05.2013 02:21, schrieb Ben Morrow:

At  8PM +0200 on  6/05/13 Tobi wrote:

<<
2013 May  6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer
to server log for more information.
May  6 18:37:59 nordkap dovecot: lda: Error: userdb lookup:
connect(/var/run/dovecot/auth-userdb) failed: Connection refused
May  6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred.
Refer to server log for more information.
  >>

For me it looks odd because the auth-userdb is defined as
<<
base_dir = /usr/local/var/run/dovecot/

Why are you trying to put this under /usr/local? /usr/local/var is not a
usual place to put things on Unix systems: generally speaking programs
installed under /usr/local use /var just like those installed under
/usr.

Ah this would explain why always /var/run is used.

service auth {
unix_listener auth-userdb {
  mode = 0777

This probably shouldn't be world-readable.
I just set world-writeable to see which file under /var/run or 
/usr/local/var/run is affected. So was just for testing purposes.

  user = vmail
  group = vmail
}

  >>

The rights on the file should be correct according to the config above
<<
ls -al /usr/local/var/run/dovecot/auth-userdb
srwxrwxrwx 1 vmail vmail 0 May  6 20:11
/usr/local/var/run/dovecot/auth-userdb
  >>

I cannot explain why the lda tries to access
<<
Error: userdb lookup: connect(/var/run/dovecot/auth-userdb)
  >>
I grepped through all the configfiles but could not find the "wrong"
path from the error message above.

Probably your Dovecot binaries are built with a default base_dir of
/var/run/dovecot. What do the following give you?

 doveconf -d base_dir(as root)
 doveconf base_dir   (as root)
 doveconf base_dir   (as vmail:vmail)


Would it might be a "fix" to symlink /usr/local/var/run/dovecot to
/var/run/dovecot ? Or would that break something with dovecot?
Yesterday I "fixed" it with a symlink. But I think better doing as you 
described and use /var/run/
I will remove my definition this evening and see if everything works 
fine if only using /var/run
I just thought I "have" to use /usr/local/var/run because /usr/local is 
the prefix while building dovecot from source.

It probably won't break anything, but why don't you just use
/var/run/dovecot in the first place and take that base_dir definition
out of dovecot.conf?

Ben


Thanks for your help I will try this evening


Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-06 Thread Ben Morrow
At  8PM +0200 on  6/05/13 Tobi wrote:
> 
> <<
> 2013 May  6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer 
> to server log for more information.
> May  6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: 
> connect(/var/run/dovecot/auth-userdb) failed: Connection refused
> May  6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. 
> Refer to server log for more information.
>  >>
> 
> For me it looks odd because the auth-userdb is defined as
> <<
> base_dir = /usr/local/var/run/dovecot/

Why are you trying to put this under /usr/local? /usr/local/var is not a
usual place to put things on Unix systems: generally speaking programs
installed under /usr/local use /var just like those installed under
/usr.

> service auth {
>unix_listener auth-userdb {
>  mode = 0777

This probably shouldn't be world-readable.

>  user = vmail
>  group = vmail
>}
> 
>  >>
> 
> The rights on the file should be correct according to the config above
> <<
> ls -al /usr/local/var/run/dovecot/auth-userdb
> srwxrwxrwx 1 vmail vmail 0 May  6 20:11 
> /usr/local/var/run/dovecot/auth-userdb
>  >>
> 
> I cannot explain why the lda tries to access
> <<
> Error: userdb lookup: connect(/var/run/dovecot/auth-userdb)
>  >>
> I grepped through all the configfiles but could not find the "wrong" 
> path from the error message above.

Probably your Dovecot binaries are built with a default base_dir of
/var/run/dovecot. What do the following give you?

doveconf -d base_dir(as root)
doveconf base_dir   (as root)
doveconf base_dir   (as vmail:vmail)

> Would it might be a "fix" to symlink /usr/local/var/run/dovecot to 
> /var/run/dovecot ? Or would that break something with dovecot?

It probably won't break anything, but why don't you just use
/var/run/dovecot in the first place and take that base_dir definition
out of dovecot.conf?

Ben



Re: [Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-06 Thread Noel Butler
On Mon, 2013-05-06 at 20:24 +0200, Tobi wrote:

> Hello list
> 
> today I built dovecot 2.2.1 from sources. But I have permission problems 
> with LDA
> The "normal" imap part works fine, users can login and see their boxes.
> deliver is called as LDA from postfix master.cf as follows
> <<
> dovecot unix-   n   n   -   -   pipe
>   flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f 
> ${sender} -d ${user}@${nexthop}


I'd change deliver to dovecot-lda  , at present IIRC its a symlink, so
it might "go away" one day, otherwise, that's fine.



> May  6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: 
> connect(/var/run/dovecot/auth-userdb) failed: Connection refused



> 
> For me it looks odd because the auth-userdb is defined as
> <<
> base_dir = /usr/local/var/run/dovecot/
> service auth {
>unix_listener auth-userdb {
>  mode = 0777
>  user = vmail
>  group = vmail
>}


 777?  it should be 0600, however, the problem might be easier to tell
with output of  dovecot -n




signature.asc
Description: This is a digitally signed message part


[Dovecot] Permission problem with LDA and dovecot 2.2.1

2013-05-06 Thread Tobi

Hello list

today I built dovecot 2.2.1 from sources. But I have permission problems 
with LDA

The "normal" imap part works fine, users can login and see their boxes.
deliver is called as LDA from postfix master.cf as follows
<<
dovecot unix-   n   n   -   -   pipe
 flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f 
${sender} -d ${user}@${nexthop}

>>
but when I try to send a testmail then I get the following in the logs

<<
2013 May  6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer 
to server log for more information.
May  6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: 
connect(/var/run/dovecot/auth-userdb) failed: Connection refused
May  6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. 
Refer to server log for more information.

>>

For me it looks odd because the auth-userdb is defined as
<<
base_dir = /usr/local/var/run/dovecot/
service auth {
  unix_listener auth-userdb {
mode = 0777
user = vmail
group = vmail
  }

>>

The rights on the file should be correct according to the config above
<<
ls -al /usr/local/var/run/dovecot/auth-userdb
srwxrwxrwx 1 vmail vmail 0 May  6 20:11 
/usr/local/var/run/dovecot/auth-userdb

>>

I cannot explain why the lda tries to access
<<
Error: userdb lookup: connect(/var/run/dovecot/auth-userdb)
>>
I grepped through all the configfiles but could not find the "wrong" 
path from the error message above.
Would it might be a "fix" to symlink /usr/local/var/run/dovecot to 
/var/run/dovecot ? Or would that break something with dovecot?


Thanks for any hint or idea

tobi