[ postfixadmin-Bugs-2073379 ] vacation: Invalid from email address WHY?
Brought to you by:
christian_boltz,
gingerdog
From: SourceForge.net <no...@so...> - 2008-11-23 15:55:12
|
Bugs item #2073379, was opened at 2008-08-25 10:51 Message generated for change (Comment added) made by gingerdog You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2073379&group_id=191583 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Vacation Group: v 2.2 Status: Open Resolution: None Priority: 7 Private: No Submitted By: trolo_vk (trolo_vk) Assigned to: Nobody/Anonymous (nobody) Summary: vacation: Invalid from email address WHY? Initial Comment: server#: cat vacation.debug ====== 2008/08/25 12:25:48 ====== Invalid from email address: <aa...@aa...>; exiting. ====== 2008/08/25 12:29:57 ====== Invalid from email address: <bb...@bb...>; exiting. ====== 2008/08/25 12:40:58 ====== [STRIP RECIPIENTS]: | <48B...@cc...> | te...@cc... ====== 2008/08/25 12:40:58 ====== [FOUND VACATION]: | <48B...@cc...> | ad...@cc... | =?ISO-8859-2?Q?= <te...@cc...> | te...@cc... ====== 2008/08/25 12:40:58 ====== [SEND RESPONSE] for <48B...@cc...>: | FROM: te...@cc... (orig_to: =?ISO-8859-2 <te...@cc...>) | TO: ad...@cc... | VACATION SUBJECT: Dovolenka | VACATION BODY: Som na dovolenke od <date> od <date>. S neodkladnimi zpravami kontaktujte <contact person>. ====== 2008/08/25 12:40:58 ====== Mail::Sendmail said :Mail::Sendmail v. 0.79 - Mon Aug 25 12:40:58 2008 Date: Mon, 25 Aug 2008 12:40:58 +0200 Server: localhost Port: 25 From: te...@cc... Subject: Dovolenka To: ad...@cc... Result: 250 2.0.0 Ok: queued as 2D9D9DF81C ====== 2008/08/25 12:42:49 ====== Invalid from email address: <dd...@dd...>; exiting. ====== 2008/08/25 12:43:12 ====== [STRIP RECIPIENTS]: | <200...@pw...> | te...@cc... ====== 2008/08/25 12:43:12 ====== [FOUND VACATION]: | <200...@pw...> | tre...@ee... | te...@cc... | te...@cc... ====== 2008/08/25 12:43:12 ====== [SEND RESPONSE] for <200...@pw...>: | FROM: te...@cc... (orig_to: te...@cc...) | TO: tre...@ee... | VACATION SUBJECT: Dovolenka | VACATION BODY: Som na dovolenke od <date> od <date>. S neodkladnými zprávami kontaktujte <contact person>. ====== 2008/08/25 12:43:12 ====== Mail::Sendmail said :Mail::Sendmail v. 0.79 - Mon Aug 25 12:43:12 2008 Date: Mon, 25 Aug 2008 12:43:12 +0200 Server: localhost Port: 25 From: te...@cc... Subject: Dovolenka To: tre...@ee... Result: 250 2.0.0 Ok: queued as AA379DF81C one emial is good and other is not? why? thx for reply ---------------------------------------------------------------------- >Comment By: GingerDog (gingerdog) Date: 2008-11-23 15:55 Message: Yes, I believe it's fixed - but only because we get the to/from address in a different way (i.e. via parameters from postfix). As I understand it, postfix won''t wrap these parameters in < >s, so it's not a problem. ---------------------------------------------------------------------- Comment By: Christian Boltz (christian_boltz) Date: 2008-11-23 12:26 Message: Do I understand you correct that this should be fixed in the current SVN version? Please add a testcase to be sure and then close this bug as fixed. (BTW: This (and updating the version number in functions.inc.php and the changelog ;-) is the last release blocker for 2.3 IIRC) ---------------------------------------------------------------------- Comment By: GingerDog (gingerdog) Date: 2008-11-20 06:31 Message: the latest version of vacation doesn't have these particular checks (see changeset 453) ---------------------------------------------------------------------- Comment By: Christian Boltz (christian_boltz) Date: 2008-11-12 23:45 Message: I did some testing with Email::Valid: # perl -we 'use Email::Valid; print (Email::Valid->address("foo\@example.com") ? "" : "no\n");' # perl -we 'use Email::Valid; print (Email::Valid->address("foo\@example.com") ? "" : "no\n");' # perl -we 'use Email::Valid; print (Email::Valid->address("<foo\@example.com>") ? "" : "no\n");' no # perl -we 'use Email::Valid; print (Email::Valid->address(" <foo\@example.com>") ? "" : "no\n");' no # perl -we 'use Email::Valid; print (Email::Valid->address("foo <foo\@example.com>") ? "" : "no\n");' # perl -we 'use Email::Valid; print (Email::Valid->address("\"\" <foo\@example.com>") ? "" : "no\n");' # perl -we 'use Email::Valid; print (Email::Valid->address("\"\"foo <foo\@example.com>") ? "" : "no\n");' # This means: If there's only the address in <>, it will fail. Prefixing it with anything (quotes, or just a letter) will solve the problem. I'm not sure if this is a bug in Email::Valid or if this address syntax is really invalid - but in practise this syntax appears too often to be ignored. ---------------------------------------------------------------------- Comment By: Christian Boltz (christian_boltz) Date: 2008-11-12 22:14 Message: GingerDog: maybe we can add something like (untested, probably needs some tuning to allow whitespace etc.) if $from =~ /^<.*>$/ $from = "\"\"".$from; At least this would be a workaround for the 2.3 release - otherwise lots of vacation notifications will never be sent! ---------------------------------------------------------------------- Comment By: trolo_vk (trolo_vk) Date: 2008-08-31 19:38 Message: Logged In: YES user_id=2192855 Originator: YES I don't know perl! :) but i think that this line if (!Email::Valid->address($from,-mxcheck => 1)) { do_debug("Invalid from email address: $from; exiting."); exit(0); } check email address, If email address is valid then OK else exit. And i think that when $from=only_email@address.xx then this function not parse good. "and presumably this will prefix all email addresses with "" even if they already look like '"foo" <fo...@ba...>' ? " Yes, it is true, but i wait in original solution from postfixadmin team :)) and i think that this prefix I don't mind, because this line check valid email, and then reply go in email address and no in email prefix... hmmm, sorry for my bad english... ---------------------------------------------------------------------- Comment By: GingerDog (gingerdog) Date: 2008-08-31 14:18 Message: Logged In: YES user_id=1761957 Originator: NO I'm not sure why prefixing the email address with "" should fix the problem, and presumably this will prefix all email addresses with "" even if they already look like '"foo" <fo...@ba...>' ? ---------------------------------------------------------------------- Comment By: trolo_vk (trolo_vk) Date: 2008-08-25 12:13 Message: Logged In: YES user_id=2192855 Originator: YES So, my solution is: from default code vacation.pl $from = lc ($from); if (!Email::Valid->address($from,-mxcheck => 1)) { do_debug("Invalid from email address: $from; exiting."); exit(0); } and my solution(provisionally) is: $from = lc ($from); # my big line :)))) $from = "\"\"".$from; if (!Email::Valid->address($from,-mxcheck => 1)) { do_debug("Invalid from email address: $from; exiting."); exit(0); } i test it and it's work fine ;) so thnx i wait what solution from you... ;) ---------------------------------------------------------------------- Comment By: GingerDog (gingerdog) Date: 2008-08-25 12:01 Message: Logged In: YES user_id=1761957 Originator: NO Hi there, Are you able to use the vacation.pl from subversion? It has somewhat better logging in it - which might help identify what the problem is. David ---------------------------------------------------------------------- Comment By: trolo_vk (trolo_vk) Date: 2008-08-25 11:50 Message: Logged In: YES user_id=2192855 Originator: YES UPGRADE2: so, when i send email from www.centrum.cz and i look in vacation.debug, i see: Result: 250 2.0.0 Ok: queued as 2D9D9DF81C ====== 2008/08/25 12:42:49 ====== Invalid from email address: <te...@ce...>; exiting. OK, i see header in email and i see: From: <te...@ce...> OK, then i repair my account in centrum.cz and i write my full name, then i send email again and Vacation is good!!! :) i see header in email and i see: From: "Jozko" <te...@ce...> So, when "From:" is only email address(From: <te...@ce...>), script Vacation.pl not know parse "From:" and then write to vacation.debug error: Invalid from email address Is this Bug? thx fo reply and solution again ;) ---------------------------------------------------------------------- Comment By: trolo_vk (trolo_vk) Date: 2008-08-25 11:21 Message: Logged In: YES user_id=2192855 Originator: YES UPGRADE: so not, i write email form this webmail www.orangeportal.sk and vacation is good, but example from webmail www.centrum.cz is not good or my webmail roundcube.cz is not good too... ---------------------------------------------------------------------- Comment By: trolo_vk (trolo_vk) Date: 2008-08-25 11:12 Message: Logged In: YES user_id=2192855 Originator: YES I found out, that i write email from TH or OUTLOOK then vacation is good, but when I write email from any webmail then vacation is not good(don't send). Sorry for my bad english... Thx for reply and solution ;) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2073379&group_id=191583 |