Re: [exim] event_action: one wish and one question

2015-06-15 Thread Jeremy Harris
On 15/06/15 13:31, Jeremy Harris wrote:
 On 15/06/15 11:46, Marcin Mirosław wrote:
 I wrongly configured event_action, I used too levels of brackets:
 event_action = ${if eq {msg:delivery}{$event_name}  { {${lookup
 pgsql{SQL_POCZTA_WYCH}}} } }

 I added those line in transport. And then in main log I got:
 2015-06-14 23:47:32 1Z4FfI-00048y-FX == aaa...@example.com
 R=dnslookup_batv T=external_smtp_batv defer (2): No such file or directory

 I spent a couple of minutes to find out what was the reason of this.
 Could it be possible to add some more information to logged information
 that this error comes from event_action?
 
 I'll have a think on that.

The trouble here is that it was (probably) syntactically valid; the
result of the expansion was not what you expected, but for this
event it is ignored anyway - so there should not have been a
semantic failure either.

I'd like to see a debug run showing that it was actually the
event that caused the defer.
-- 
Cheers,
  Jeremy



-- 
## 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] event_action: one wish and one question

2015-06-15 Thread Marcin Mirosław
W dniu 2015-06-15 o 17:57, Jeremy Harris pisze:
 On 15/06/15 13:31, Jeremy Harris wrote:
 On 15/06/15 11:46, Marcin Mirosław wrote:
 I wrongly configured event_action, I used too levels of brackets:
 event_action = ${if eq {msg:delivery}{$event_name}  { {${lookup
 pgsql{SQL_POCZTA_WYCH}}} } }

 I added those line in transport. And then in main log I got:
 2015-06-14 23:47:32 1Z4FfI-00048y-FX == aaa...@example.com
 R=dnslookup_batv T=external_smtp_batv defer (2): No such file or directory

 I spent a couple of minutes to find out what was the reason of this.
 Could it be possible to add some more information to logged information
 that this error comes from event_action?

 I'll have a think on that.
 
 The trouble here is that it was (probably) syntactically valid; the
 result of the expansion was not what you expected, but for this
 event it is ignored anyway - so there should not have been a
 semantic failure either.
 
 I'd like to see a debug run showing that it was actually the
 event that caused the defer.


Hi!
Thank you for both answers. I reproduced this situation on diffrent box,
using such event_action:
event_action = ${if eq {msg:delivery}{$event_name}  { {${lookup
pgsql{select 1}}} } }

(I hope I didn't strip too much)

# exim -d+all -M 1Z4Zop-00089J-CO
 21:16:55  1086 Exim version 4.85 uid=0 gid=0 pid=1086 D=fffd
 Berkeley DB: Berkeley DB 4.8.30: (2014-12-18)
 Support for: crypteq iconv() IPv6 Expand_dlfunc OpenSSL Content_Scanning DKIM 
 Old_Demime PRDR OCSP Experimental_SRS Experimental_Event Experimental_DSN
 Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz 
 dbmnz dnsdb dsearch passwd pgsql
 Authenticators: cram_md5 plaintext spa
 Routers: accept dnslookup ipliteral manualroute queryprogram redirect
 Transports: appendfile/mailstore autoreply lmtp pipe smtp
 Fixed never_users: 0
 Size of off_t: 8
 Compiler: GCC [4.8.4]
 Library version: OpenSSL: Compile: OpenSSL 1.0.1o 12 Jun 2015
   Runtime: OpenSSL 1.0.1o 12 Jun 2015
  : built on: Sat Jun 13 19:59:56 2015
 Library version: PCRE: Compile: 8.36
Runtime: 8.36 2014-09-26
 21:16:55  1086 Total 12 lookups
 WHITELIST_D_MACROS unset
 TRUSTED_CONFIG_LIST unset
 21:16:55  1086 changed uid/gid: forcing real = effective
 21:16:55  1086   uid=0 gid=0 pid=1086
 21:16:55  1086   auxiliary group list: none
 21:16:55  1087 changed uid/gid: calling tls_validate_require_cipher
 21:16:55  1087   uid=8 gid=12 pid=1087
 21:16:55  1087   auxiliary group list: none
 21:16:55  1086 tls_validate_require_cipher child 1087 ended: status=0x0
 21:16:55  1086 configuration file is /etc/exim/exim.conf
 21:16:55  1086 log selectors = 04fe 00232321
 21:16:55  1086 cwd=/etc/exim 4 args: exim -d+all -M 1Z4Zop-00089J-CO
 21:16:55  1086 trusted user
 21:16:55  1086 admin user
[...]

 21:16:55  1086  Remote deliveries 
   
 [175/4733]
 21:16:55  1086  t...@example.com 
 21:16:55  1086 expanding: $return_path
 21:16:55  1086result: mar...@mejor.pl
 21:16:55  1086 expanding: niktnicniewieole
 21:16:55  1086result: niktnicniewieole
 21:16:55  1086 prvs: hash source is '0608mar...@mejor.pl'
 21:16:55  1086 expanding: ${prvs {$return_path}{niktnicniewieole}}
 21:16:55  1086result: prvs=06088217e3=mar...@mejor.pl
 21:16:55  1086 search_tidyup called
 21:16:55  1086 set_process_info:  1086 delivering 1Z4Zop-00089J-CO: waiting 
 for a remote delivery subprocess to finish
 21:16:55  1086 selecting on subprocess pipes
 21:16:55  1089 changed uid/gid: remote delivery to t...@example.com with 
 transport=external_smtp_batv
 21:16:55  1089   uid=8 gid=12 pid=1089
 21:16:55  1089   auxiliary group list: none
 21:16:55  1089 set_process_info:  1089 delivering 1Z4Zop-00089J-CO using 
 external_smtp_batv
 21:16:55  1089 external_smtp_batv transport entered
 21:16:55  1089   t...@example.com
 21:16:55  1089 checking status of example.com
 21:16:55  1089 locking /var/spool/exim/db/retry.lockfile
 21:16:55  1089 locked /var/spool/exim/db/retry.lockfile
 21:16:55  1089 EXIM_DBOPEN(/var/spool/exim/db/retry)
 21:16:55  1089 returned from EXIM_DBOPEN
 21:16:55  1089 opened hints database /var/spool/exim/db/retry: flags=O_RDONLY
 21:16:55  1089 dbfn_read: key=T:example.com:2606:2800:220:1:248:1893:25c8:1946
 21:16:55  1089 dbfn_read: 
 key=T:example.com:2606:2800:220:1:248:1893:25c8:1946:1Z4Zop-00089J-CO
 21:16:55  1089 no message retry record
 21:16:55  1089 example.com [2606:2800:220:1:248:1893:25c8:1946] status = 
 usable
 21:16:55  1089 2606:2800:220:1:248:1893:25c8:1946 in serialize_hosts? no 
 (option unset)
 21:16:55  1089 delivering 1Z4Zop-00089J-CO to example.com 
 [2606:2800:220:1:248:1893:25c8:1946] (t...@example.com)
 21:16:55  1089 set_process_info:  1089 delivering 1Z4Zop-00089J-CO to 
 example.com [2606:2800:220:1:248:1893:25c8:1946] (t...@example.com)
 21:16:55  

Re: [exim] event_action: one wish and one question

2015-06-15 Thread Jeremy Harris
On 15/06/15 16:57, Jeremy Harris wrote:
 On 15/06/15 13:31, Jeremy Harris wrote:
 On 15/06/15 11:46, Marcin Mirosław wrote:
 I wrongly configured event_action, I used too levels of brackets:
 event_action = ${if eq {msg:delivery}{$event_name}  { {${lookup
 pgsql{SQL_POCZTA_WYCH}}} } }

 I added those line in transport. And then in main log I got:
 2015-06-14 23:47:32 1Z4FfI-00048y-FX == aaa...@example.com
 R=dnslookup_batv T=external_smtp_batv defer (2): No such file or directory

 I spent a couple of minutes to find out what was the reason of this.
 Could it be possible to add some more information to logged information
 that this error comes from event_action?

 I'll have a think on that.
 
 The trouble here is that it was (probably) syntactically valid; the
 result of the expansion was not what you expected, but for this
 event it is ignored anyway - so there should not have been a
 semantic failure either.
 
 I'd like to see a debug run showing that it was actually the
 event that caused the defer.

Ah, I forgot with ignored anyway that other events are involved.
It was processed for a tcp:connect event, where the result does
matter; anything but blank resulting in the connection not being
made (the event is raised before the connection is made, to give
a fine-control capability).
-- 
Cheers,
  Jeremy



-- 
## 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] event_action: one wish and one question

2015-06-15 Thread Marcin Mirosław
W dniu 2015-06-15 o 22:59, Marcin Mirosław pisze:
 W dniu 2015-06-15 o 22:41, Jeremy Harris pisze:
 On 15/06/15 16:57, Jeremy Harris wrote:
 On 15/06/15 13:31, Jeremy Harris wrote:
 On 15/06/15 11:46, Marcin Mirosław wrote:
 I wrongly configured event_action, I used too levels of brackets:
 event_action = ${if eq {msg:delivery}{$event_name}  { {${lookup
 pgsql{SQL_POCZTA_WYCH}}} } }

 I added those line in transport. And then in main log I got:
 2015-06-14 23:47:32 1Z4FfI-00048y-FX == aaa...@example.com
 R=dnslookup_batv T=external_smtp_batv defer (2): No such file or directory

 I spent a couple of minutes to find out what was the reason of this.
 Could it be possible to add some more information to logged information
 that this error comes from event_action?

 I'll have a think on that.

 The trouble here is that it was (probably) syntactically valid; the
 result of the expansion was not what you expected, but for this
 event it is ignored anyway - so there should not have been a
 semantic failure either.

 I'd like to see a debug run showing that it was actually the
 event that caused the defer.

 Ah, I forgot with ignored anyway that other events are involved.
 It was processed for a tcp:connect event, where the result does
 matter; anything but blank resulting in the connection not being
 made (the event is raised before the connection is made, to give
 a fine-control capability).
 
 Hmm, when I use 'select null' then message is still defered:
  == t...@example.com R=dnslookup_batv T=external_smtp_batv defer (2): No
 such file or directory


Sorry, I forgot about additional {} .


-- 
## 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] event_action: one wish and one question

2015-06-15 Thread Marcin Mirosław
W dniu 2015-06-15 o 22:41, Jeremy Harris pisze:
 On 15/06/15 16:57, Jeremy Harris wrote:
 On 15/06/15 13:31, Jeremy Harris wrote:
 On 15/06/15 11:46, Marcin Mirosław wrote:
 I wrongly configured event_action, I used too levels of brackets:
 event_action = ${if eq {msg:delivery}{$event_name}  { {${lookup
 pgsql{SQL_POCZTA_WYCH}}} } }

 I added those line in transport. And then in main log I got:
 2015-06-14 23:47:32 1Z4FfI-00048y-FX == aaa...@example.com
 R=dnslookup_batv T=external_smtp_batv defer (2): No such file or directory

 I spent a couple of minutes to find out what was the reason of this.
 Could it be possible to add some more information to logged information
 that this error comes from event_action?

 I'll have a think on that.

 The trouble here is that it was (probably) syntactically valid; the
 result of the expansion was not what you expected, but for this
 event it is ignored anyway - so there should not have been a
 semantic failure either.

 I'd like to see a debug run showing that it was actually the
 event that caused the defer.
 
 Ah, I forgot with ignored anyway that other events are involved.
 It was processed for a tcp:connect event, where the result does
 matter; anything but blank resulting in the connection not being
 made (the event is raised before the connection is made, to give
 a fine-control capability).

Hmm, when I use 'select null' then message is still defered:
 == t...@example.com R=dnslookup_batv T=external_smtp_batv defer (2): No
such file or directory




-- 
## 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/