Re: [exim] Some mails are queued, other are sent immediately

2017-12-25 Thread Lena--- via Exim-users
P.S.  A way to reproduce (not every time, but often):
delete all files in /var/spool/exim/db , restart Exim with HUP signal,
send a message to   @ yahoo.com . After the message is received (with auth)
by Exim, while it is waiting in the queue (for unknown reason):

-rw-r-  1 mailnull mail   16384 Dec 25 18:25 callout
-rw-r-  1 mailnull mail   0 Dec 25 18:25 callout.lockfile
-rw-r-  1 mailnull mail   0 Dec 25 18:25 retry.lockfile
-rw-r-  1 mailnull mail   16384 Dec 25 18:25 wait-throttled_smtp
-rw-r-  1 mailnull mail   0 Dec 25 18:25 wait-throttl~mtp.lockfile

root@lena:/root# exim_dumpdb /var/spool/exim wait-throttled_smtp
mta6.am0.yahoodns.net 1eTWxP-000Kok-PE
mta5.am0.yahoodns.net 1eTWxP-000Kok-PE
mta7.am0.yahoodns.net 1eTWxP-000Kok-PE
root@lena:/root# exim_dumpdb /var/spool/exim callout
25-Dec-2017 19:54:35 yahoo.com callout=accept postmaster=unknown random=unknown
25-Dec-2017 19:54:35 lena_kiev @ yahoo.com/ callout=accept
root@lena:/root# host yahoo.com
yahoo.com has address 206.190.39.42
yahoo.com has address 98.139.180.180
yahoo.com has address 98.138.252.38
yahoo.com has IPv6 address 2001:4998:44:204::100d
yahoo.com has IPv6 address 2001:4998:c:e33::53
yahoo.com has IPv6 address 2001:4998:58:2201::73
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
root@lena:/root# exim -bV
Exim version 4.90 #0 (FreeBSD 6.3) built 24-Dec-2017 20:40:09
Copyright (c) University of Cambridge, 1995 - 2017
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2017
Probably Berkeley DB version 1.8x (native mode)
Support for: crypteq iconv() use_setclassresources PAM Expand_dlfunc OpenSSL 
Content_Scanning DKIM
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch dbm dbmjz dbmnz 
dnsdb
Authenticators: plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile autoreply pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Configuration file is /usr/local/etc/exim/configure.lena

(I inserted blanks around @ in email addresses in order to be readable
in mailing list archives).
The transport:

throttled_smtp:
  driver = smtp
  serialize_hosts = *
  dkim_domain = 
  dkim_selector = 3
  dkim_private_key = /usr/local/etc/exim/dkim3.key
  connection_max_messages = 5
  max_rcpt = 9
  retry_use_local_part
  hosts_avoid_pipelining = *
  hosts_try_chunking =


-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] Some mails are queued, other are sent immediately

2017-12-25 Thread Lena--- via Exim-users
> >> I noticed that some emails are sent immediately
> >> (what I prefer), while other are queued (introducing useless delay)

Same here. Exim 4.90 under FreeBSD 6 on a VPS,

root@lena:/root# exim -bP log_selector
log_selector = +smtp_confirmation +queue_time +queue_time_overall +deliver_time 
-retry_defer +smtp_incomplete_transaction +smtp_no_mail +incoming_interface
root@lena:/root#

First message was rejected by recipient MTA after end of data
(I don't know whether it's relevant):

2017-12-25 06:26:19 +0200 1eTKLB-00025a-NK <= Lena @ lena.kiev.ua 
H=ip-1c*0.rusano*ka-net.kiev.ua (bedside.lena.kiev.ua) [94.2*4.28.208] 
I=[212.109.198.40]:5225 P=esmtpsa X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 
CV=no A=plain: S=1088 id=20171225042614.GA908 @ lena.kiev
2017-12-25 06:26:22 +0200 1eTKLB-00025a-NK **  @ yahoo.com 
R=remote_domains_throttled T=throttled_smtp H=mta6.am0.yahoodns.net 
[98.137.159.24] I=[212.109.198.40] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 
CV=no: SMTP error from remote mail server after end of data: 554 delivery 
error: dd Requested mail action aborted - mta4090.mail.ne1.yahoo.com
2017-12-25 06:26:22 +0200 1eTKLG-00025m-MR <= <> R=1eTKLB-00025a-NK U=mailnull 
P=local S=2535
2017-12-25 06:26:22 +0200 1eTKLB-00025a-NK Completed QT=5s
2017-12-25 06:26:23 +0200 1eTKLG-00025m-MR => lena  
R=localuser T=local_delivery QT=0s DT=0s
2017-12-25 06:26:23 +0200 1eTKLG-00025m-MR => |/home/cgi/data/nokia.pl (Lena @ 
lena.kiev.ua)  R=aliases T=address_pipe QT=0s DT=0s
2017-12-25 06:26:23 +0200 1eTKLG-00025m-MR Completed QT=0s

Second message to the same recipient domain (but another local_part)
was delayed by Exim until the next queue run, I don't understand why:

2017-12-25 06:27:57 +0200 1eTKMn-00027D-BW <= Lena @ lena.kiev.ua 
H=ip-1*d0.rusan*vka-net.kiev.ua (bedside.lena.kiev.ua) [94.244.28.2*8] 
I=[212.109.198.40]:5225 P=esmtpsa X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 
CV=no A=plain: S=1092 id=20171225042754.GB908 @ lena.kiev
2017-12-25 06:34:46 +0200 Start queue run: pid=8699
2017-12-25 06:34:50 +0200 1eTKMn-00027D-BW => lena_kiev @ yahoo.com 
R=remote_domains_throttled T=throttled_smtp H=mta7.am0.yahoodns.net 
[67.195.229.59] I=[212.109.198.40] X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 
CV=yes C="250 ok dirdel" QT=6m53s DT=3s
2017-12-25 06:34:50 +0200 1eTKMn-00027D-BW Completed QT=6m53s
2017-12-25 06:34:50 +0200 End queue run: pid=8699

In the header of the second (delayed) message received by yahooMail:

Received: from 127.0.0.1  (EHLO lena.kiev.ua) (212.109.198.40)
  by mta4181.mail.gq1.yahoo.com with SMTPS; Mon, 25 Dec 2017 04:34:48 +
DKIM-Signature: 
Received: from ip-1*d0.rusa*ovka-net.kiev.ua ([94.2*4.28.208] 
helo=bedside.lena.kiev.ua)
by lena.kiev.ua with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.90 (FreeBSD))
(envelope-from )
id 1eTKMn-00027D-BW
for lena_kiev @ yahoo.com; Mon, 25 Dec 2017 06:27:57 +0200

I tried once to reproduce - unsuccessfully
(second message was sent immediately).

In rcpt ACL I use
  verify = recipient/defer_ok/callout=10s,defer_ok,use_sender,hold

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] Bug in exim 4.90 postgresql

2017-12-25 Thread James

On 24/12/2017 15:58, Jeremy Harris wrote:

Pre-Script: the elves have been busy and I am now getting user 
exim-users email but still no bugzilla account.



On 23/12/17 10:22, James wrote:

I have 3 times used the "Create a new Bugzilla account" and written to
the admin.  Nothing back so here is my report:


There is a bug in exim 4.90 postgresql, fix:

--- ../original/src/lookups/pgsql.c2017-12-12 22:14:38.0 +
+++ src/lookups/pgsql.c2017-12-22 19:31:06.621334570 +
@@ -329,7 +329,7 @@
 result = string_catn(result, US"\n", 1);

   if (num_fields == 1)
-result = string_catn(NULL,
+result = string_catn(result,
 US PQgetvalue(pg_result, i, 0), PQgetlength(pg_result, i, 0));
   else
 {


Do you have a testcase, or description of the effect?


Compare with 4.89.1 and/or just consider the code.
for (tuple : query) result = tuple;
was and should be:
for (tuple : query) result += tuple;
"result" should "string_catn" to self not null.


Any multi-line query with one per line only uses the last line, the 
first use in my exim.conf:


domainlist local_domains = @:localhost${lookup pgsql{SELECT ':' || name 
FROM domain WHERE active = true}}


effect depends on use, in my case it was fatal to emails.  I rank this 
as a major bug.  If you do not use exim with postgresql you are unaffected.




James.






--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/