Changeset 1113:888898bd823e for alias.c

Show
Ignore:
Timestamp:
1999-07-20 02:38:07 (9 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

As Aaron Schrab noted, patch-0.95.6.tlr.reverse_name.1 broke the use
of my_hdr from send-hooks. This patch introduces a new variable
$from which can be used to use a default sender address; to make
this possible, a new variable class DT_ADDR is defined.

We now have the following algorithm for determining the from
address:

- $from is used as the default from address, if defined. Otherwise,

the local user name and (if the user wishes so) the local domain
are used.

- This address can be overridden by $reverse_name, if set.
- Now, send-hooks are evaluated.
- Afterwards, user headers are evaluated. In this step, the from

header can be overridden using my_hdr From:.

- When there is no real name, $realname is used for it. Note that,

when the default from header is used and $from defines a real
name, it takes precedence over $realname.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • alias.c

    r1082 r1113  
    421421  if (mutt_strcasecmp (addr->mailbox, Username) == 0) 
    422422    return 1; 
    423   if(string_is_address(addr->mailbox, Username, Hostname)) 
    424     return 1; 
    425   if(string_is_address(addr->mailbox, Username, mutt_fqdn(0))) 
    426     return 1; 
    427   if(string_is_address(addr->mailbox, Username, mutt_fqdn(1))) 
     423  if (string_is_address(addr->mailbox, Username, Hostname)) 
     424    return 1; 
     425  if (string_is_address(addr->mailbox, Username, mutt_fqdn(0))) 
     426    return 1; 
     427  if (string_is_address(addr->mailbox, Username, mutt_fqdn(1))) 
     428    return 1; 
     429 
     430  if (From && !mutt_strcasecmp (From->mailbox, addr->mailbox)) 
    428431    return 1; 
    429432