small change in message.php

Atif Ghaffar aghaffar@developer.ch
Fri, 29 Dec 2000 04:27:31 +0100


Hi guys. 
 Hope you had a nice Xmas. 

 I have started to hack IMP again :) (Im back!) 

 I saw all the nice features in the CVS HEAD version. 
 I like the filtering. I implemented it too, but on the server-side (Sieve, but 
 thats vendor-specific). 

 I saw a strange behaviour when I used report spam link. 
 Mail was coming to me (Postmaster) by email address username@.4unet.net 
 I dont know why it was using the ".domain.name" instead of "domain.name". 

 Any way, I checked the code and line 260 in message.php says. 
 $headers['From'] = $imp['user']; 

 Would it be possible to change it to 
 $headers['From'] = get_barefrom();  # reuse code. 
 It works for me, and also, since I am doing some changes in the get_barefrom, 
 which is called also from other function(s), it will be consistent. 

 Oh and a small remark for the function get_barefrom. 
 line 730 in IMP.lib writes 
 $_barefrom .= '@' . $imp['maildomain']; 

 which is not always the best thing. 
 For example, I connect to mx23.4unet.net and it changes my From address to 
 aghaffar@mx23.4unet.net for which there is no MX record and if someone replies 
 to that address, some mail servers on the net gets confused for a while. 

 Possible solution: 
 Since there is a $conf['server']['to_domain'] variable defined in 
 imp/config/conf.php, it would be nice to check if the value exists there and 
 append it instead of $imp['maildomain']. Also sometimes, $imp['maildomain'] is 
 just an internal address such as "localhost", "cyrus.internal.zurich.4unet.net" 
 etc etc. 

 Shall I send patches? 

 Best Regards. 

-- 
Atif Ghaffar
http://atif.developer.ch

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/