Changes between Version 2 and Version 3 of MuttFaq/Header


Ignore:
Timestamp:
Nov 1, 2013 9:49:12 AM (4 years ago)
Author:
MichaelRay
Comment:

wikiml fixes, domain=example.COM

Legend:

Unmodified
Added
Removed
Modified
  • MuttFaq/Header

    v2 v3  
    44The primary way to set your default sender address is through the '''$from''' and '''$realname''' variables in muttrc:
    55
     6{{{
    67 set realname="Joe User"
    78 set from="user@host"
    89 set use_from=yes
     10}}}
    911
    1012: '''NOTE:''' Another way is to use '''my_hdr From:''' but it is discouraged because it has drawbacks: It breaks the '''$reverse_name''' feature, and doesn't work for messages resent using the <'''bounce-message'''> function. While '''my_hdr From:''' can be a convenient temporary override of the default address, it is not as convenient for setting the default address.
     
    1214To instruct mutt to show the From: header during composition, use:
    1315
     16{{{
    1417  set edit_headers = yes
     18}}}
    1519
    1620=== How do I set the address used in the SMTP negotiation (envelope address)? ===
     21
    1722=== I've set my From: header field in Mutt, but the SMTP server still sees my local hostname. ===
     23
    1824=== Remote SMTP server refuses to accept my eMail because of wrong domainname, but I gave correct "From:"? ===
    1925
    20 Put '''set use_envelope_from=yes''' in your ''~/.muttrc''. This adds the ''-f'' option when calling '''$sendmail''' to deliver the mail, forcing it to use the same address for the envelope as for the From: header field.
     26Put
     27 
     28{{{
     29'''set use_envelope_from=yes'''
     30}}}
     31
     32in your ''~/.muttrc''. This adds the ''-f'' option when calling '''$sendmail''' to deliver the mail, forcing it to use the same address for the envelope as for the From: header field.
    2133
    2234''Your [[MailConcept|MTA]] must understand this parameter & functionality!''
     
    2840But sometimes this isn't good enough. For example, on some system with an out-of-the-box sendmail configuration, this technique causes the following field to be added to the message header:
    2941
     42{{{
    3043 X-Authentication-Warning: <HOSTNAME>: <USERNAME> set sender to <WHAT YOU WANTED> using -f
     44}}}
    3145
    3246So, your identity (username) is revealed anyway. The way around this depends on your MTA:
     
    4256For example, for a profile p1 you can create a file '''~/.mutt/p1''', and put all the profile specific set lines in it:
    4357
     58{{{
    4459 set pager_format="(P1) %S [%C/%T] %n (%l) %s"
    4560 set realname="Joe Doe"
     
    5065 set signature="~/.signature-p1"
    5166 color status black p1-color
     67}}}
    5268
    5369It is convenient to indicate the profile with specific colours and statusbars (like '''pager_format''' in this example).
     
    5571All the other settings can be put in another file and then read into each profile using '''source'''. Be careful to remove all account-specific information from that file.
    5672
     73{{{
    5774 source ~/.mutt/common
     75}}}
    5876
    5977To avoid the tediousness of having to type '''mutt -F ~/.mutt/p1''' every time, add shell aliases like the one below:
    6078
     79{{{
    6180 alias mutt-p1="mutt -F $HOME/.mutt/muttrc-p1"
    62 
     81}}}
    6382
    6483Another way is creative use of account-hook: and the various other hooks available.
     
    6685=== How to let mutt use the To: address of a message as the From: address in a reply? ===
    6786A simple way is to use the following three commands in ~/.muttrc:
     87
     88{{{
    6889 set reverse_name 
    69  set from=default@address.tld
    70  alternates "alt1@domain1.tld|alt2@domain2.tld"
     90 set from=default@example.COM
     91 alternates "alt1@example.COM|alt2@example.NET"
     92}}}
    7193
    7294Do not have a '''my_hdr From:''' active, as this would overrule '''$reverse_name'''.
     
    90112For example, if you want send an email with a different From: Name <email>
    91113to one list, you can add this to your .muttrc:
     114
     115{{{
    92116 send-hook .               "unmy_hdr From:"
    93117 send-hook name-of-list    "my_hdr From: List Name <new email>"
    94118 send-hook @company\\.tld$ "my_hdr From: Company Name <new email>"
     119}}}
    95120Note that the '''unmy_hdr From:''' in default '''send-hook''' placed first permits to fallback
    96121to the normal default "From:" field for mails not sent to the mailing list or company.