Re: [imp] Trouble with email addresses containing empty domain labels

2018-02-16 Thread Jan Schneider


Zitat von Jens Wahnes :


Jens Wahnes wrote:

Jens Wahnes wrote:

Jan Schneider wrote:


I was able to track this down to Horde_Idna. The error will be catched
in Horde_Idna 1.1.0 and displayed smarter in IMP 6.2.18.


I looked into this again today. Even though I have got the new versions
installed (both Horde_Idna 1.1.0 and IMP 6.2.18), I still seem to get
the same error, i.e. no warning when sending an email to an address like
f...@example..com and the mail is actually being sent to "foo" without
any domain. Are there any other dependencies that I may have missed?


I can see this working on demo.horde.org, i.e. trying to send an  
email to "f...@example..com" from demo.horde.org is aborted with an  
error message.  Still, this does not happen in our setup.  On our  
systems, the email is being sent to the "localpart only" address  
instead.  Is nobody else having this problem?


Looking for things that are unique to our setup, I thought that  
this might be because we use a "pre_sent" hook to add headers to  
outgoing email messages, but even when disabling that hook, the  
problem persists.   I don't seem to be getting any hint from the  
log files neither.  So I'm running out of clues what part of our  
configuration might be causing the trouble.  Maybe someone has got  
an idea how to debug this further? Could it be caused by other  
hooks we've got?


What strikes me though is the fact the error message I get on  
demo.horde.org when trying to send an email to "f...@example..com"  
is "Invalid e-mail address (f...@example..com)."
According to the code that I see in .../imp/lib/Compose.php around  
line 1300, this would be the error message that is generated upon a  
Horde_Mail_Exception, not upon Horde_Idna_Exception, because in the  
latter case, the message would contain a colon.  I thought this  
whole problem was related to Horde_Idna?  To me, the code added in  
the commit  
 suggests that catching Horde_Idna_Exception is supposed to fix the problem?  Or am I on the wrong track  
completely?



I was revisiting this problem today as it persists in our environment, using

Horde_Idna   1.1.1   stable
imp  6.2.21  stable

What I was able to find out is that whether or not the problem will  
be caught by the fix mentioned above depends on the "maildomain"  
setting for the mail server used (as set in Imp's  
backends.local.php).  If "maildomain" is set to the empty string, as  
is the case in the "advanced" configuration given as an example in  
backends.php, an error message is displayed if one tries to send an  
email to e.g. "john@example..org" with two adjacent dots in the  
domain name. However, if the "maildomain" property of the mail  
server is set to a proper hostname, e.g. "example.net", no warning  
is displayed and the email is sent to e.g. "john.joe" without a  
domain name.


I tried to work around this using a hook, that is "public function  
compose_addr(Horde_Mail_Rfc822_Address $addr)" as described in Imp's  
hooks.php.dist.  The idea was to look for addresses that contain  
".." in the host part of the email address and reject them in the  
hook. However, that did not work either.  When the backend's  
"maildomain" property is set to e.g. "example.net" and one tries to  
send an email to the misspelled "john@example..org" address  
again, then inside the hook the $addr->mailbox variable will be set  
to "john.doe", but the $addr->host variable will be "example.net"  
(as given in the "maildomain" setting) and not "example..org" (as  
given by the user writing the email message).  So one cannot catch  
the wrong email address there.  Of course, the email is sent to just  
"john.doe" (without domain name) eventually without the  
"example.net" suffix applied.  (In the imp_sentmail table, this will  
be recorded as "john@example..org"). If anyone else is going to  
try this out, please note that changes made to backends.local.php  
will only be applied to new sessions, so one has to re-login to  
properly test those changes.


Any chance for an easy fix to this?


Thanks
Jens


I still cannot reproduce this, even with the 'maildomain' setting  
popuplated. I get the same error message with and without that. And I  
always get the error message including the colon. I get that on  
demo.horde.org too though.


--
Jan Schneider
The Horde Project
https://www.horde.org/

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Re: [imp] Trouble with email addresses containing empty domain labels

2018-02-02 Thread Jens Wahnes

Jens Wahnes wrote:

Jens Wahnes wrote:

Jan Schneider wrote:


I was able to track this down to Horde_Idna. The error will be catched
in Horde_Idna 1.1.0 and displayed smarter in IMP 6.2.18.


I looked into this again today. Even though I have got the new versions
installed (both Horde_Idna 1.1.0 and IMP 6.2.18), I still seem to get
the same error, i.e. no warning when sending an email to an address like
f...@example..com and the mail is actually being sent to "foo" without
any domain. Are there any other dependencies that I may have missed?


I can see this working on demo.horde.org, i.e. trying to send an email 
to "f...@example..com" from demo.horde.org is aborted with an error 
message.  Still, this does not happen in our setup.  On our systems, the 
email is being sent to the "localpart only" address instead.  Is nobody 
else having this problem?


Looking for things that are unique to our setup, I thought that this 
might be because we use a "pre_sent" hook to add headers to outgoing 
email messages, but even when disabling that hook, the problem persists. 
  I don't seem to be getting any hint from the log files neither.  So 
I'm running out of clues what part of our configuration might be causing 
the trouble.  Maybe someone has got an idea how to debug this further? 
Could it be caused by other hooks we've got?


What strikes me though is the fact the error message I get on 
demo.horde.org when trying to send an email to "f...@example..com" is 
"Invalid e-mail address (f...@example..com)."
According to the code that I see in .../imp/lib/Compose.php around line 
1300, this would be the error message that is generated upon a 
Horde_Mail_Exception, not upon Horde_Idna_Exception, because in the 
latter case, the message would contain a colon.  I thought this whole 
problem was related to Horde_Idna?  To me, the code added in the commit 
 
suggests that catching Horde_Idna_Exception is supposed to fix the 
problem?  Or am I on the wrong track completely?



I was revisiting this problem today as it persists in our environment, 
using


Horde_Idna   1.1.1   stable
imp  6.2.21  stable

What I was able to find out is that whether or not the problem will be 
caught by the fix mentioned above depends on the "maildomain" setting 
for the mail server used (as set in Imp's backends.local.php).  If 
"maildomain" is set to the empty string, as is the case in the 
"advanced" configuration given as an example in backends.php, an error 
message is displayed if one tries to send an email to e.g. 
"john@example..org" with two adjacent dots in the domain name. 
However, if the "maildomain" property of the mail server is set to a 
proper hostname, e.g. "example.net", no warning is displayed and the 
email is sent to e.g. "john.joe" without a domain name.


I tried to work around this using a hook, that is "public function 
compose_addr(Horde_Mail_Rfc822_Address $addr)" as described in Imp's 
hooks.php.dist.  The idea was to look for addresses that contain ".." in 
the host part of the email address and reject them in the hook. 
However, that did not work either.  When the backend's "maildomain" 
property is set to e.g. "example.net" and one tries to send an email to 
the misspelled "john@example..org" address again, then inside the 
hook the $addr->mailbox variable will be set to "john.doe", but the 
$addr->host variable will be "example.net" (as given in the "maildomain" 
setting) and not "example..org" (as given by the user writing the email 
message).  So one cannot catch the wrong email address there.  Of 
course, the email is sent to just "john.doe" (without domain name) 
eventually without the "example.net" suffix applied.  (In the 
imp_sentmail table, this will be recorded as "john@example..org"). 
If anyone else is going to try this out, please note that changes made 
to backends.local.php will only be applied to new sessions, so one has 
to re-login to properly test those changes.


Any chance for an easy fix to this?


Thanks
Jens
--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org


Re: [imp] Trouble with email addresses containing empty domain labels

2017-04-06 Thread Jens Wahnes

Jens Wahnes wrote:

Jan Schneider wrote:


I was able to track this down to Horde_Idna. The error will be catched
in Horde_Idna 1.1.0 and displayed smarter in IMP 6.2.18.


I looked into this again today. Even though I have got the new versions
installed (both Horde_Idna 1.1.0 and IMP 6.2.18), I still seem to get
the same error, i.e. no warning when sending an email to an address like
f...@example..com and the mail is actually being sent to "foo" without
any domain. Are there any other dependencies that I may have missed?


I can see this working on demo.horde.org, i.e. trying to send an email 
to "f...@example..com" from demo.horde.org is aborted with an error 
message.  Still, this does not happen in our setup.  On our systems, the 
email is being sent to the "localpart only" address instead.  Is nobody 
else having this problem?


Looking for things that are unique to our setup, I thought that this 
might be because we use a "pre_sent" hook to add headers to outgoing 
email messages, but even when disabling that hook, the problem persists. 
 I don't seem to be getting any hint from the log files neither.  So 
I'm running out of clues what part of our configuration might be causing 
the trouble.  Maybe someone has got an idea how to debug this further? 
Could it be caused by other hooks we've got?


What strikes me though is the fact the error message I get on 
demo.horde.org when trying to send an email to "f...@example..com" is 
"Invalid e-mail address (f...@example..com)."
According to the code that I see in .../imp/lib/Compose.php around line 
1300, this would be the error message that is generated upon a 
Horde_Mail_Exception, not upon Horde_Idna_Exception, because in the 
latter case, the message would contain a colon.  I thought this whole 
problem was related to Horde_Idna?  To me, the code added in the commit 
 
suggests that catching Horde_Idna_Exception is supposed to fix the 
problem?  Or am I on the wrong track completely?


Any help would be appreciated.

Thanks
Jens




smime.p7s
Description: S/MIME Cryptographic Signature
-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Re: [imp] Trouble with email addresses containing empty domain labels

2017-03-28 Thread Jens Wahnes

Jan Schneider wrote:


I was able to track this down to Horde_Idna. The error will be catched
in Horde_Idna 1.1.0 and displayed smarter in IMP 6.2.18.


I looked into this again today. Even though I have got the new versions 
installed (both Horde_Idna 1.1.0 and IMP 6.2.18), I still seem to get 
the same error, i.e. no warning when sending an email to an address like 
f...@example..com and the mail is actually being sent to "foo" without 
any domain. Are there any other dependencies that I may have missed?



Jens




smime.p7s
Description: S/MIME Cryptographic Signature
-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Re: [imp] Trouble with email addresses containing empty domain labels

2017-01-25 Thread Jens Wahnes

Am 24.01.2017 um 11:38 schrieb Jan Schneider:


I was able to track this down to Horde_Idna. The error will be catched
in Horde_Idna 1.1.0 and displayed smarter in IMP 6.2.18.


Thanks for looking into this. I'm looking forward to the new versions.


Jens




smime.p7s
Description: S/MIME Cryptographic Signature
-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org

Re: [imp] Trouble with email addresses containing empty domain labels

2017-01-24 Thread Jan Schneider


Zitat von Jens Wahnes :


Hi,

with current stable version of Imp (6.2.17) and Horde_Smtp (1.9.4),  
we are seeing problems with emails that are to be sent to addresses  
that appear to be invalid, as they contain two adjacent dots and  
thus an empty "label" (at least that's what I would call this in DNS  
vocabulary).  To make things clearer, consider, for example, an  
address such as john...@example..com


When one tries to send an email to an address like that, at a  
certain point in processing that email, some Horde component seems  
to drop the domain part of the address completely. So in the example  
of "john...@example..com", it will try to send an email to just  
"johndoe" without any domain. Interestingly enough, the entry in the  
imp_sentmail table contains the full (wrong) address. On the other  
hand, the "To" header of the email, as saved in the "Sent" folder on  
the IMAP server, does not contain the full address, but only the  
localpart. Of course, the recipient's address given in the SMTP  
dialogue is lacking the domain as well.


So after doing some tests, I'm still unsure if Imp or Horde_Smtp or  
some other package is to be blamed.  Could someone help clarify?


Of course, there is also the question of how to best deal with this.  
In an ideal world, I'd say that Horde_Smtp should be able to deal  
with these kind of email addresses but Imp should never generate  
them. IMHO, users trying to send an email to an address with a typo  
like this (two dots instead of one dot) should receive an error  
message and the message should not be sent until they revised the  
email address.



Jens


I was able to track this down to Horde_Idna. The error will be catched  
in Horde_Idna 1.1.0 and displayed smarter in IMP 6.2.18.


--
Jan Schneider
The Horde Project
https://www.horde.org/

--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org


[imp] Trouble with email addresses containing empty domain labels

2017-01-20 Thread Jens Wahnes

Hi,

with current stable version of Imp (6.2.17) and Horde_Smtp (1.9.4), we 
are seeing problems with emails that are to be sent to addresses that 
appear to be invalid, as they contain two adjacent dots and thus an 
empty "label" (at least that's what I would call this in DNS 
vocabulary).  To make things clearer, consider, for example, an address 
such as john...@example..com


When one tries to send an email to an address like that, at a certain 
point in processing that email, some Horde component seems to drop the 
domain part of the address completely. So in the example of 
"john...@example..com", it will try to send an email to just "johndoe" 
without any domain. Interestingly enough, the entry in the imp_sentmail 
table contains the full (wrong) address. On the other hand, the "To" 
header of the email, as saved in the "Sent" folder on the IMAP server, 
does not contain the full address, but only the localpart. Of course, 
the recipient's address given in the SMTP dialogue is lacking the domain 
as well.


So after doing some tests, I'm still unsure if Imp or Horde_Smtp or some 
other package is to be blamed.  Could someone help clarify?


Of course, there is also the question of how to best deal with this. In 
an ideal world, I'd say that Horde_Smtp should be able to deal with 
these kind of email addresses but Imp should never generate them. IMHO, 
users trying to send an email to an address with a typo like this (two 
dots instead of one dot) should receive an error message and the message 
should not be sent until they revised the email address.



Jens




smime.p7s
Description: S/MIME Cryptographic Signature
-- 
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org