Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-03 Thread Reio Remma


> On 2 Apr 2018, at 21:37, ed...@pettijohn-web.com wrote:
> 
> 
>> On Apr 2, 2018 12:43 PM, Reio Remma  wrote:
>> 
>> Good news!
>> 
>> I was using LMTP to relay to Amavisd, which worked for single 
>> recipients, but I just switched relay to Amavisd to SMTP and now it all 
>> seems to work! :)
>> 
>> accept from !local for domain  relay via lmtp://127.0.0.1:10024
>> accept from local for any relay via lmtp://127.0.0.1:10026
>> 
>> -->
>> 
>> accept from !local for domain  relay via smtp://127.0.0.1:10024
>> accept from local for any relay via smtp://127.0.0.1:10026
>> 
> 
> Amavis was talking lmtp opensmtpd was expecting SMTP commands. It will only 
> talk lmtp as a client.

Here’s a good description of Amavis SMTP vs LMTP for posterity.

http://amavis-users.amavis.narkive.com/skHE6l0o/smtp-vs-lmtp

Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread edgar

On Apr 2, 2018 12:43 PM, Reio Remma  wrote:
>
> Good news!
>
> I was using LMTP to relay to Amavisd, which worked for single 
> recipients, but I just switched relay to Amavisd to SMTP and now it all 
> seems to work! :)
>
> accept from !local for domain  relay via lmtp://127.0.0.1:10024
> accept from local for any relay via lmtp://127.0.0.1:10026
>
> -->
>
> accept from !local for domain  relay via smtp://127.0.0.1:10024
> accept from local for any relay via smtp://127.0.0.1:10026
>

Amavis was talking lmtp opensmtpd was expecting SMTP commands. It will only 
talk lmtp as a client.

> Gilles, if you want debug logs from me for the problem with LMTP to 
> Amavisd, let me know. :) Unfortunately it's beyond me to figure out if 
> it's a problem with OpenSMTPD or Amavisd.
>
> Thanks for thinking with me,
> Reio
>
> On 02.04.2018 20:25, Vijay Sankar wrote:
> > Hi Reio,
> >
> > It may be better to continue this discussion on the list. That will 
> > allow people more knowledgeable than I to help you out.
> >
> > Re. configuration, I actually use the defaults. Amavisd and OpenSMTPD 
> > always use SMTP in my case. Re. versions, it is just OpenBSD 6.1 -stable.
> >
> > Vijay
> >
> > Quoting Reio Remma :
> >
> >> Hey, best not spam Edgar anymore. :)
> >>
> >> I gathered that from my logs then moment I sent the mail. :)
> >>
> >> Would you mind showing me your amavisd config? What versions of 
> >> amavisd and OpenSMTPD are you using?
> >>
> >> What transfer method is used between OpenSMTPD and amavisd (both ways)?
> >>
> >> My OpenSMTPD sends mails to amavisd via LMTP and then gets it back 
> >> via SMTP.
> >>
> >> Thanks,
> >> Reio
> >>
> >> On 02.04.2018 19:41, Vijay Sankar wrote:
> >>> Also, just an FYI that I received two copies of your email that you 
> >>> sent at 11:23:24 Central Daylight Time. Part of the header that 
> >>> shows timestamps below:
> >>>
> >>> SECOND COPY seven minutes later.
> >>>
> >>> Received: from fw1.foretell.ca ([127.0.0.1])
> >>> by localhost (server3.foretell.ca [127.0.0.1]) (amavisd-new, 
> >>> port 10024)
> >>> with ESMTP id U2XLc_RhdFOs for ;
> >>> Mon,  2 Apr 2018 11:30:29 -0500 (CDT)
> >>> Received: from orc.mrstuudio.ee (orc.mrstuudio.ee [87.119.172.175])
> >>> by fw1.foretell.ca (OpenSMTPD) with ESMTPS id c5918644 
> >>> (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO)
> >>> for ;
> >>> Mon, 2 Apr 2018 11:30:11 -0500 (CDT)
> >>>
> >>> FIRST MESSAGE
> >>>
> >>> Received: from fw1.foretell.ca ([127.0.0.1])
> >>> by localhost (server3.foretell.ca [127.0.0.1]) (amavisd-new, 
> >>> port 10024)
> >>> with ESMTP id Im4I4JRgOGsJ for ;
> >>> Mon,  2 Apr 2018 11:23:34 -0500 (CDT)
> >>> Received: from orc.mrstuudio.ee (orc.mrstuudio.ee [87.119.172.175])
> >>> by fw1.foretell.ca (OpenSMTPD) with ESMTPS id f872ad50 
> >>> (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO)
> >>> for ;
> >>> Mon, 2 Apr 2018 11:23:34 -0500 (CDT)
> >>>
> >>> Quoting Vijay Sankar :
> >>>
>  Yes, that was the best way for me to make it work.
> 
>  I found the OpenSMTPD presentation at BSDCAN 2016 to be quite 
>  helpful. But I kept screwing up the configuration repeatedly. 
>  Having separate servers for MX ended up being simpler. Actually I 
>  have two mail exchangers (with two different ISPs) and one mail 
>  server.
> 
>  Vijay
> 
>  Quoting Reio Remma :
> 
> > Hello, do I understand right, that you have 2 machines and Amavisd 
> > in the 1st machine gets mail from the 1st machine's OpenSMTPD and 
> > then sends the processed mail to the 2nd machine?
> >
> > Thanks!
> > Reio
> >
> >
> >
> >
>
>
> -- 
> You received this mail because you are subscribed to misc@opensmtpd.org
> To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
>
b��yǢ��m�+)[yƮ�쨹�޲��r��y�h�+kiv��N�r��zǧu���[h�+��칻�&ޢ���kiv��

Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread Chris Bennett
On Mon, Apr 02, 2018 at 05:25:29PM +, Vijay Sankar wrote:
> Hi Reio,
> 
> It may be better to continue this discussion on the list. That will allow
> people more knowledgeable than I to help you out.
> 
> Re. configuration, I actually use the defaults. Amavisd and OpenSMTPD always
> use SMTP in my case. Re. versions, it is just OpenBSD 6.1 -stable.


Yes, please put everything up. Now that 6.3 is out I want to know how to
get all of this working for my mail. What is wrong is every bit as
helpful as what is right.

For example, should I continue using mbox or change to maildir.
It seems that IMAP may be a better choice.

I currently use neomutt and want to turn on Dovecot for using remote
email readers, but not sure what steps are best.

Thanks,
Chris Bennett



-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread Reio Remma

Good news!

I was using LMTP to relay to Amavisd, which worked for single 
recipients, but I just switched relay to Amavisd to SMTP and now it all 
seems to work! :)


accept from !local for domain  relay via lmtp://127.0.0.1:10024
accept from local for any relay via lmtp://127.0.0.1:10026

-->

accept from !local for domain  relay via smtp://127.0.0.1:10024
accept from local for any relay via smtp://127.0.0.1:10026

Gilles, if you want debug logs from me for the problem with LMTP to 
Amavisd, let me know. :) Unfortunately it's beyond me to figure out if 
it's a problem with OpenSMTPD or Amavisd.


Thanks for thinking with me,
Reio

On 02.04.2018 20:25, Vijay Sankar wrote:

Hi Reio,

It may be better to continue this discussion on the list. That will 
allow people more knowledgeable than I to help you out.


Re. configuration, I actually use the defaults. Amavisd and OpenSMTPD 
always use SMTP in my case. Re. versions, it is just OpenBSD 6.1 -stable.


Vijay

Quoting Reio Remma :


Hey, best not spam Edgar anymore. :)

I gathered that from my logs then moment I sent the mail. :)

Would you mind showing me your amavisd config? What versions of 
amavisd and OpenSMTPD are you using?


What transfer method is used between OpenSMTPD and amavisd (both ways)?

My OpenSMTPD sends mails to amavisd via LMTP and then gets it back 
via SMTP.


Thanks,
Reio

On 02.04.2018 19:41, Vijay Sankar wrote:
Also, just an FYI that I received two copies of your email that you 
sent at 11:23:24 Central Daylight Time. Part of the header that 
shows timestamps below:


SECOND COPY seven minutes later.

Received: from fw1.foretell.ca ([127.0.0.1])
by localhost (server3.foretell.ca [127.0.0.1]) (amavisd-new, 
port 10024)

with ESMTP id U2XLc_RhdFOs for ;
Mon,  2 Apr 2018 11:30:29 -0500 (CDT)
Received: from orc.mrstuudio.ee (orc.mrstuudio.ee [87.119.172.175])
by fw1.foretell.ca (OpenSMTPD) with ESMTPS id c5918644 
(TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO)

for ;
Mon, 2 Apr 2018 11:30:11 -0500 (CDT)

FIRST MESSAGE

Received: from fw1.foretell.ca ([127.0.0.1])
by localhost (server3.foretell.ca [127.0.0.1]) (amavisd-new, 
port 10024)

with ESMTP id Im4I4JRgOGsJ for ;
Mon,  2 Apr 2018 11:23:34 -0500 (CDT)
Received: from orc.mrstuudio.ee (orc.mrstuudio.ee [87.119.172.175])
by fw1.foretell.ca (OpenSMTPD) with ESMTPS id f872ad50 
(TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO)

for ;
Mon, 2 Apr 2018 11:23:34 -0500 (CDT)

Quoting Vijay Sankar :


Yes, that was the best way for me to make it work.

I found the OpenSMTPD presentation at BSDCAN 2016 to be quite 
helpful. But I kept screwing up the configuration repeatedly. 
Having separate servers for MX ended up being simpler. Actually I 
have two mail exchangers (with two different ISPs) and one mail 
server.


Vijay

Quoting Reio Remma :

Hello, do I understand right, that you have 2 machines and Amavisd 
in the 1st machine gets mail from the 1st machine's OpenSMTPD and 
then sends the processed mail to the 2nd machine?


Thanks!
Reio








--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread Vijay Sankar

Hi Reio,

It may be better to continue this discussion on the list. That will  
allow people more knowledgeable than I to help you out.


Re. configuration, I actually use the defaults. Amavisd and OpenSMTPD  
always use SMTP in my case. Re. versions, it is just OpenBSD 6.1  
-stable.


Vijay

Quoting Reio Remma :


Hey, best not spam Edgar anymore. :)

I gathered that from my logs then moment I sent the mail. :)

Would you mind showing me your amavisd config? What versions of  
amavisd and OpenSMTPD are you using?


What transfer method is used between OpenSMTPD and amavisd (both ways)?

My OpenSMTPD sends mails to amavisd via LMTP and then gets it back via SMTP.

Thanks,
Reio

On 02.04.2018 19:41, Vijay Sankar wrote:
Also, just an FYI that I received two copies of your email that you  
sent at 11:23:24 Central Daylight Time. Part of the header that  
shows timestamps below:


SECOND COPY seven minutes later.

Received: from fw1.foretell.ca ([127.0.0.1])
by localhost (server3.foretell.ca [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id U2XLc_RhdFOs for ;
Mon,  2 Apr 2018 11:30:29 -0500 (CDT)
Received: from orc.mrstuudio.ee (orc.mrstuudio.ee [87.119.172.175])
by fw1.foretell.ca (OpenSMTPD) with ESMTPS id c5918644  
(TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO)

for ;
Mon, 2 Apr 2018 11:30:11 -0500 (CDT)

FIRST MESSAGE

Received: from fw1.foretell.ca ([127.0.0.1])
by localhost (server3.foretell.ca [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Im4I4JRgOGsJ for ;
Mon,  2 Apr 2018 11:23:34 -0500 (CDT)
Received: from orc.mrstuudio.ee (orc.mrstuudio.ee [87.119.172.175])
by fw1.foretell.ca (OpenSMTPD) with ESMTPS id f872ad50  
(TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO)

for ;
Mon, 2 Apr 2018 11:23:34 -0500 (CDT)

Quoting Vijay Sankar :


Yes, that was the best way for me to make it work.

I found the OpenSMTPD presentation at BSDCAN 2016 to be quite  
helpful. But I kept screwing up the configuration repeatedly.  
Having separate servers for MX ended up being simpler. Actually I  
have two mail exchangers (with two different ISPs) and one mail  
server.


Vijay

Quoting Reio Remma :

Hello, do I understand right, that you have 2 machines and  
Amavisd in the 1st machine gets mail from the 1st machine's  
OpenSMTPD and then sends the processed mail to the 2nd machine?


Thanks!
Reio





--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
vsan...@foretell.ca


--
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread Vijay Sankar

Hi,

FWIW, I looked through my logs for the past 60 days and see the error  
you described ONLY on four messages. ALL of them appear to be from a  
spammer.


I am not sure if your set up is the same as mine but what I have is  
the following:


Mail Exchanger with amavisd-new and OpenSMTPD that is on the Internet

Clean messages are forwarded to an internal system that -- Mail Server  
with OpenSMTPD and dovecot


There were no errors logged when multiple recipients receive a message  
through amavisd-new and on to OpenSMTPd in how I have set up.


Vijay


Quoting Reio Remma :

I don't think it's that, because the messages are small. I've the  
limit set at an ample 100M.


It's almost as if Amavisd is trying to send the mail back twice  
(maybe, for each recipient)?


Reio

On 02.04.18 17:04, ed...@pettijohn-web.com wrote:

Best guess would be to look at bumping up:

max-message-size

Seems odd that it would make it through to amavis without hitting  
the limit first.

On Apr 2, 2018 8:08 AM, Reio Remma  wrote:

Hello all!

Finally managed to upgrade our server from QMail to OpenSMTPD/Dovecot.
After ironing out a few small kinks I'm still left with a problem.

Our mail comes in and is relayed to Amavisd port 10024, then back to
OpenSMTPD port 10025.

Everything works except when a mail comes in with multiple recipients -
below are logs.

OpenSMTPD gives an error ("Remote host sent too much data") on the 2nd
recipient when the mail is coming back from Amavisd.

Both the recipients' mails are delivered, however the 2nd recipient's
mail is stuck in the queue on both sending and receiving servers.

In a couple of minutes they both work the queue and the 2nd recipient
ends up  with 3 messages total.

Is there a setting I should change in either OpenSMTPD or Amavisd to
avoid this?

Thanks!
Reio

Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=connected
address=192.168.1.4 host=sender.example.org
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=starttls
address=192.168.1.4 host=sender.example.org ciphers="version=TLSv1.2,
cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256"
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message
address=192.168.1.4 host=sender.example.org msgid=989362f2
from= to= size=1911 ndest=1
proto=ESMTP
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message
address=192.168.1.4 host=sender.example.org msgid=989362f2
from= to= size=1911 ndest=1
proto=ESMTP
Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connecting
address=lmtp://127.0.0.1:10024 host=localhost
Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connected
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message
address=127.0.0.1 host=localhost msgid=ff083fd6 from=
to= size=2349 ndest=1 proto=ESMTP
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message
address=127.0.0.1 host=localhost msgid=ff083fd6 from=
to= size=2349 ndest=1 proto=ESMTP
Apr  2 15:27:36 host dovecot: lmtp(4131): Connect from local
Apr  2 15:27:36 host amavis[3767]: (03767-08) Passed CLEAN
{RelayedInbound}, [127.0.0.1]  ->
,, Message-ID:
, mail_id:
nLJzF6CeDChQ, Hits: -3.179, size: 1947, queued_as: 250 2.0.0: ff083fd6
Message accepted for delivery, 702 ms
Apr  2 15:27:36 host dovecot: lmtp(4136): Connect from local
Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery
evpid=989362f2561abf5b from=
to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1
(localhost)" delay=1s result="Ok" stat="250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0: ff083fd6 Message accepted for
delivery"
Apr  2 15:27:36 host smtpd[3363]: smtp-out: Error on session
a1ee254c29485cd9 after 1 message sent: Remote host sent too much data
Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery
evpid=989362f25851fa3e from=
to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1
(localhost)" delay=1s result="TempFail" stat="Remote host sent too much
data"
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=closed
address=127.0.0.1 host=localhost reason=quit
Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org):
msgid=: saved  
mail to INBOX

Apr  2 15:27:36 host dovecot: lmtp(4131): Disconnect from local: Client
has quit the connection (state = READY)
Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery
evpid=ff083fd626620393 from=
to= user=recipient2_example.org method=lmtp
delay=0s result=Ok stat=Delivered
Apr  2 15:27:36 host dovecot: 

Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread edgar

On Apr 2, 2018 9:07 AM, Reio Remma  wrote:
>
> I don't think it's that, because the messages are small. I've the limit 
> set at an ample 100M.
>
> It's almost as if Amavisd is trying to send the mail back twice (maybe, 
> for each recipient)?
>
That's what I thought as well, but not sure. It may be attempting pipelining. 
But I would think the error message would be different. 

> Reio
>
> On 02.04.18 17:04, ed...@pettijohn-web.com wrote:
> > Best guess would be to look at bumping up:
> >
> > max-message-size
> >
> > Seems odd that it would make it through to amavis without hitting the limit 
> > first.
> > On Apr 2, 2018 8:08 AM, Reio Remma  wrote:
> >> Hello all!
> >>
> >> Finally managed to upgrade our server from QMail to OpenSMTPD/Dovecot.
> >> After ironing out a few small kinks I'm still left with a problem.
> >>
> >> Our mail comes in and is relayed to Amavisd port 10024, then back to
> >> OpenSMTPD port 10025.
> >>
> >> Everything works except when a mail comes in with multiple recipients -
> >> below are logs.
> >>
> >> OpenSMTPD gives an error ("Remote host sent too much data") on the 2nd
> >> recipient when the mail is coming back from Amavisd.
> >>
> >> Both the recipients' mails are delivered, however the 2nd recipient's
> >> mail is stuck in the queue on both sending and receiving servers.
> >>
> >> In a couple of minutes they both work the queue and the 2nd recipient
> >> ends up  with 3 messages total.
> >>
> >> Is there a setting I should change in either OpenSMTPD or Amavisd to
> >> avoid this?
> >>
> >> Thanks!
> >> Reio
> >>
> >> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=connected
> >> address=192.168.1.4 host=sender.example.org
> >> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=starttls
> >> address=192.168.1.4 host=sender.example.org ciphers="version=TLSv1.2,
> >> cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256"
> >> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message
> >> address=192.168.1.4 host=sender.example.org msgid=989362f2
> >> from= to= size=1911 ndest=1
> >> proto=ESMTP
> >> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message
> >> address=192.168.1.4 host=sender.example.org msgid=989362f2
> >> from= to= size=1911 ndest=1
> >> proto=ESMTP
> >> Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connecting
> >> address=lmtp://127.0.0.1:10024 host=localhost
> >> Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connected
> >> Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message
> >> address=127.0.0.1 host=localhost msgid=ff083fd6 from=
> >> to= size=2349 ndest=1 proto=ESMTP
> >> Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message
> >> address=127.0.0.1 host=localhost msgid=ff083fd6 from=
> >> to= size=2349 ndest=1 proto=ESMTP
> >> Apr  2 15:27:36 host dovecot: lmtp(4131): Connect from local
> >> Apr  2 15:27:36 host amavis[3767]: (03767-08) Passed CLEAN
> >> {RelayedInbound}, [127.0.0.1]  ->
> >> ,, Message-ID:
> >> , mail_id:
> >> nLJzF6CeDChQ, Hits: -3.179, size: 1947, queued_as: 250 2.0.0: ff083fd6
> >> Message accepted for delivery, 702 ms
> >> Apr  2 15:27:36 host dovecot: lmtp(4136): Connect from local
> >> Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery
> >> evpid=989362f2561abf5b from=
> >> to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1
> >> (localhost)" delay=1s result="Ok" stat="250 2.0.0 from
> >> MTA(smtp:[127.0.0.1]:10025): 250 2.0.0: ff083fd6 Message accepted for
> >> delivery"
> >> Apr  2 15:27:36 host smtpd[3363]: smtp-out: Error on session
> >> a1ee254c29485cd9 after 1 message sent: Remote host sent too much data
> >> Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery
> >> evpid=989362f25851fa3e from=
> >> to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1
> >> (localhost)" delay=1s result="TempFail" stat="Remote host sent too much
> >> data"
> >> Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=closed
> >> address=127.0.0.1 host=localhost reason=quit
> >> Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org):
> >> msgid=: saved mail to 
> >> INBOX
> >> Apr  2 15:27:36 host dovecot: lmtp(4131): Disconnect from local: Client
> >> has quit the connection (state = READY)
> >> Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery
> >> evpid=ff083fd626620393 from=
> >> to= user=recipient2_example.org method=lmtp
> >> delay=0s result=Ok stat=Delivered
> >> Apr  2 15:27:36 

Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread Reio Remma
I don't think it's that, because the messages are small. I've the limit 
set at an ample 100M.


It's almost as if Amavisd is trying to send the mail back twice (maybe, 
for each recipient)?


Reio

On 02.04.18 17:04, ed...@pettijohn-web.com wrote:

Best guess would be to look at bumping up:

max-message-size

Seems odd that it would make it through to amavis without hitting the limit 
first.
On Apr 2, 2018 8:08 AM, Reio Remma  wrote:

Hello all!

Finally managed to upgrade our server from QMail to OpenSMTPD/Dovecot.
After ironing out a few small kinks I'm still left with a problem.

Our mail comes in and is relayed to Amavisd port 10024, then back to
OpenSMTPD port 10025.

Everything works except when a mail comes in with multiple recipients -
below are logs.

OpenSMTPD gives an error ("Remote host sent too much data") on the 2nd
recipient when the mail is coming back from Amavisd.

Both the recipients' mails are delivered, however the 2nd recipient's
mail is stuck in the queue on both sending and receiving servers.

In a couple of minutes they both work the queue and the 2nd recipient
ends up  with 3 messages total.

Is there a setting I should change in either OpenSMTPD or Amavisd to
avoid this?

Thanks!
Reio

Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=connected
address=192.168.1.4 host=sender.example.org
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=starttls
address=192.168.1.4 host=sender.example.org ciphers="version=TLSv1.2,
cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256"
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message
address=192.168.1.4 host=sender.example.org msgid=989362f2
from= to= size=1911 ndest=1
proto=ESMTP
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message
address=192.168.1.4 host=sender.example.org msgid=989362f2
from= to= size=1911 ndest=1
proto=ESMTP
Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connecting
address=lmtp://127.0.0.1:10024 host=localhost
Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connected
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message
address=127.0.0.1 host=localhost msgid=ff083fd6 from=
to= size=2349 ndest=1 proto=ESMTP
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message
address=127.0.0.1 host=localhost msgid=ff083fd6 from=
to= size=2349 ndest=1 proto=ESMTP
Apr  2 15:27:36 host dovecot: lmtp(4131): Connect from local
Apr  2 15:27:36 host amavis[3767]: (03767-08) Passed CLEAN
{RelayedInbound}, [127.0.0.1]  ->
,, Message-ID:
, mail_id:
nLJzF6CeDChQ, Hits: -3.179, size: 1947, queued_as: 250 2.0.0: ff083fd6
Message accepted for delivery, 702 ms
Apr  2 15:27:36 host dovecot: lmtp(4136): Connect from local
Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery
evpid=989362f2561abf5b from=
to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1
(localhost)" delay=1s result="Ok" stat="250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0: ff083fd6 Message accepted for
delivery"
Apr  2 15:27:36 host smtpd[3363]: smtp-out: Error on session
a1ee254c29485cd9 after 1 message sent: Remote host sent too much data
Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery
evpid=989362f25851fa3e from=
to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1
(localhost)" delay=1s result="TempFail" stat="Remote host sent too much
data"
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=closed
address=127.0.0.1 host=localhost reason=quit
Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org):
msgid=: saved mail to INBOX
Apr  2 15:27:36 host dovecot: lmtp(4131): Disconnect from local: Client
has quit the connection (state = READY)
Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery
evpid=ff083fd626620393 from=
to= user=recipient2_example.org method=lmtp
delay=0s result=Ok stat=Delivered
Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org):
msgid=: saved mail to INBOX
Apr  2 15:27:36 host dovecot: lmtp(4136): Disconnect from local: Client
has quit the connection (state = READY)
Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery
evpid=ff083fd6e2c78bfd from=
to= user=recipient1_example.org method=lmtp
delay=0s result=Ok stat=Delivered
Apr  2 15:27:45 host smtpd[3363]: a1ee25494b874d98 smtp event=closed
address=192.168.1.4 host=sender.example.org reason=quit


Sender:

Re: Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread edgar
Best guess would be to look at bumping up:

max-message-size

Seems odd that it would make it through to amavis without hitting the limit 
first.
On Apr 2, 2018 8:08 AM, Reio Remma  wrote:
>
> Hello all!
>
> Finally managed to upgrade our server from QMail to OpenSMTPD/Dovecot. 
> After ironing out a few small kinks I'm still left with a problem.
>
> Our mail comes in and is relayed to Amavisd port 10024, then back to 
> OpenSMTPD port 10025.
>
> Everything works except when a mail comes in with multiple recipients - 
> below are logs.
>
> OpenSMTPD gives an error ("Remote host sent too much data") on the 2nd 
> recipient when the mail is coming back from Amavisd.
>
> Both the recipients' mails are delivered, however the 2nd recipient's 
> mail is stuck in the queue on both sending and receiving servers.
>
> In a couple of minutes they both work the queue and the 2nd recipient 
> ends up  with 3 messages total.
>
> Is there a setting I should change in either OpenSMTPD or Amavisd to 
> avoid this?
>
> Thanks!
> Reio
>
> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=connected 
> address=192.168.1.4 host=sender.example.org
> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=starttls 
> address=192.168.1.4 host=sender.example.org ciphers="version=TLSv1.2, 
> cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256"
> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message 
> address=192.168.1.4 host=sender.example.org msgid=989362f2 
> from= to= size=1911 ndest=1 
> proto=ESMTP
> Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message 
> address=192.168.1.4 host=sender.example.org msgid=989362f2 
> from= to= size=1911 ndest=1 
> proto=ESMTP
> Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connecting 
> address=lmtp://127.0.0.1:10024 host=localhost
> Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connected
> Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message 
> address=127.0.0.1 host=localhost msgid=ff083fd6 from= 
> to= size=2349 ndest=1 proto=ESMTP
> Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message 
> address=127.0.0.1 host=localhost msgid=ff083fd6 from= 
> to= size=2349 ndest=1 proto=ESMTP
> Apr  2 15:27:36 host dovecot: lmtp(4131): Connect from local
> Apr  2 15:27:36 host amavis[3767]: (03767-08) Passed CLEAN 
> {RelayedInbound}, [127.0.0.1]  -> 
> ,, Message-ID: 
> , mail_id: 
> nLJzF6CeDChQ, Hits: -3.179, size: 1947, queued_as: 250 2.0.0: ff083fd6 
> Message accepted for delivery, 702 ms
> Apr  2 15:27:36 host dovecot: lmtp(4136): Connect from local
> Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery 
> evpid=989362f2561abf5b from= 
> to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1 
> (localhost)" delay=1s result="Ok" stat="250 2.0.0 from 
> MTA(smtp:[127.0.0.1]:10025): 250 2.0.0: ff083fd6 Message accepted for 
> delivery"
> Apr  2 15:27:36 host smtpd[3363]: smtp-out: Error on session 
> a1ee254c29485cd9 after 1 message sent: Remote host sent too much data
> Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery 
> evpid=989362f25851fa3e from= 
> to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1 
> (localhost)" delay=1s result="TempFail" stat="Remote host sent too much 
> data"
> Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=closed 
> address=127.0.0.1 host=localhost reason=quit
> Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org): 
> msgid=: saved mail to INBOX
> Apr  2 15:27:36 host dovecot: lmtp(4131): Disconnect from local: Client 
> has quit the connection (state = READY)
> Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery 
> evpid=ff083fd626620393 from= 
> to= user=recipient2_example.org method=lmtp 
> delay=0s result=Ok stat=Delivered
> Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org): 
> msgid=: saved mail to INBOX
> Apr  2 15:27:36 host dovecot: lmtp(4136): Disconnect from local: Client 
> has quit the connection (state = READY)
> Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery 
> evpid=ff083fd6e2c78bfd from= 
> to= user=recipient1_example.org method=lmtp 
> delay=0s result=Ok stat=Delivered
> Apr  2 15:27:45 host smtpd[3363]: a1ee25494b874d98 smtp event=closed 
> address=192.168.1.4 host=sender.example.org reason=quit
>
>
> Sender:
> 

Problem with OpenSMTPD/Amavisd and mails with multiple recipients.

2018-04-02 Thread Reio Remma

Hello all!

Finally managed to upgrade our server from QMail to OpenSMTPD/Dovecot. 
After ironing out a few small kinks I'm still left with a problem.


Our mail comes in and is relayed to Amavisd port 10024, then back to 
OpenSMTPD port 10025.


Everything works except when a mail comes in with multiple recipients - 
below are logs.


OpenSMTPD gives an error ("Remote host sent too much data") on the 2nd 
recipient when the mail is coming back from Amavisd.


Both the recipients' mails are delivered, however the 2nd recipient's 
mail is stuck in the queue on both sending and receiving servers.


In a couple of minutes they both work the queue and the 2nd recipient 
ends up  with 3 messages total.


Is there a setting I should change in either OpenSMTPD or Amavisd to 
avoid this?


Thanks!
Reio

Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=connected 
address=192.168.1.4 host=sender.example.org
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=starttls 
address=192.168.1.4 host=sender.example.org ciphers="version=TLSv1.2, 
cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256"
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message 
address=192.168.1.4 host=sender.example.org msgid=989362f2 
from= to= size=1911 ndest=1 
proto=ESMTP
Apr  2 15:27:35 host smtpd[3363]: a1ee25494b874d98 smtp event=message 
address=192.168.1.4 host=sender.example.org msgid=989362f2 
from= to= size=1911 ndest=1 
proto=ESMTP
Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connecting 
address=lmtp://127.0.0.1:10024 host=localhost

Apr  2 15:27:35 host smtpd[3363]: a1ee254c29485cd9 mta event=connected
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message 
address=127.0.0.1 host=localhost msgid=ff083fd6 from= 
to= size=2349 ndest=1 proto=ESMTP
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=message 
address=127.0.0.1 host=localhost msgid=ff083fd6 from= 
to= size=2349 ndest=1 proto=ESMTP

Apr  2 15:27:36 host dovecot: lmtp(4131): Connect from local
Apr  2 15:27:36 host amavis[3767]: (03767-08) Passed CLEAN 
{RelayedInbound}, [127.0.0.1]  -> 
,, Message-ID: 
, mail_id: 
nLJzF6CeDChQ, Hits: -3.179, size: 1947, queued_as: 250 2.0.0: ff083fd6 
Message accepted for delivery, 702 ms

Apr  2 15:27:36 host dovecot: lmtp(4136): Connect from local
Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery 
evpid=989362f2561abf5b from= 
to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1 
(localhost)" delay=1s result="Ok" stat="250 2.0.0 from 
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0: ff083fd6 Message accepted for 
delivery"
Apr  2 15:27:36 host smtpd[3363]: smtp-out: Error on session 
a1ee254c29485cd9 after 1 message sent: Remote host sent too much data
Apr  2 15:27:36 host smtpd[3363]: a1ee254c29485cd9 mta event=delivery 
evpid=989362f25851fa3e from= 
to= rcpt=<-> source="127.0.0.1" relay="127.0.0.1 
(localhost)" delay=1s result="TempFail" stat="Remote host sent too much 
data"
Apr  2 15:27:36 host smtpd[3363]: a1ee253d696ec8c5 smtp event=closed 
address=127.0.0.1 host=localhost reason=quit
Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org): 
msgid=: saved mail to INBOX
Apr  2 15:27:36 host dovecot: lmtp(4131): Disconnect from local: Client 
has quit the connection (state = READY)
Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery 
evpid=ff083fd626620393 from= 
to= user=recipient2_example.org method=lmtp 
delay=0s result=Ok stat=Delivered
Apr  2 15:27:36 host dovecot: lmtp(recipie...@example.org): 
msgid=: saved mail to INBOX
Apr  2 15:27:36 host dovecot: lmtp(4136): Disconnect from local: Client 
has quit the connection (state = READY)
Apr  2 15:27:36 host smtpd[3363]:  mda event=delivery 
evpid=ff083fd6e2c78bfd from= 
to= user=recipient1_example.org method=lmtp 
delay=0s result=Ok stat=Delivered
Apr  2 15:27:45 host smtpd[3363]: a1ee25494b874d98 smtp event=closed 
address=192.168.1.4 host=sender.example.org reason=quit



Sender:
b7cd2df5d9ca94ec|inet4|mta|auth|per...@sender.org|recipie...@example.org|recipie...@example.org|1522673542|1523019142|0|1|pending|353|Remote 
host sent too much data

Recipient:
754dc784cae717d2|inet4|mta||per...@sender.org|recipie...@example.org|recipie...@example.org|1522673543|1523019143|0|1|pending|340|Remote 
host sent too much data



Apr  2 15:34:14 host smtpd[3363]: a1ee256e785cc841 smtp event=connected 
address=192.168.1.4