In function get_identities() (in
functions/identity.php) $username@$domain is used as
email address if email_address is not set in
preferences. Most of the time that's fine, but in my
case users log in with their email address and those
who had not set email_address were given a weird
address of the format username@domain@default-domain
and the sendmail program (Exim) refused to send out
messages with such addresses.
In src/compose.php in deliverMessage() there's a hack
for usernames of the form username@domain, but that
hack stops working since it only comes to action if
$idents[$identity]['email_address'] is not set and now
it becomes set in get_identities() to $username@$domain
no matter what is the format of $username.
My fix was to replace
if ( ! $em ) $em = $username.'@'.$domain;
if ( ! $em ) $em = strpos($username, '@') == false
? $username.'@'.$domain : $username;
Log in to post a comment.