imip-agent

docs/wiki/MailIntegration--MTA

1465:0c623c86704f
2020-08-03 Paul Boddie Changed diagram font to sans-serif.
     1 = Mail Transfer Agents =     2      3 Although this documentation does not seek to cover the details of configuring     4 mail transfer agent (MTA) software, some hints and tips are offered to help     5 avoid frustration.     6      7 <<TableOfContents(2,3)>>     8      9 == General ==    10     11 Some general measures are presented below.    12     13 === Hostname ===    14     15 The `hostname` command should provide a suitable hostname on the system, or MTAs    16 may behave strangely. This can be tested with the following command:    17     18 {{{    19 hostname -f    20 }}}    21     22 It should report a fully-qualified hostname.    23     24 === Mailname ===    25     26 The contents of `/etc/mailname` should probably be the fully-qualified hostname,    27 at least for Exim and Postfix. See    28 [[https://wiki.debian.org/EtcMailName|the Debian Wiki page]] for more details.    29     30 === Interfaces ===    31     32 Some software attempts to listen on interfaces that may not be supported. For    33 example, Exim may be configured to listen on both IPv4 and IPv6 interfaces, even    34 in environments (such as User Mode Linux) where IPv6 interfaces may not be    35 available.    36     37 === Authentication ===    38     39 It is highly undesirable to allow anyone to connect to a mail server to send    40 mail. However, it is highly convenient to allow imip-agent to connect to the    41 mail server on the same host without having to provide credentials. Consequently,    42 the configuration of an MTA must permit the latter without allowing the former.    43     44 Fortunately, many MTAs are configured to allow local connections because programs    45 typically rely on such traditional behaviour, but this may be worth checking if    46 mail server logs indicate authentication failures when imip-agent is attempting    47 to send mail.    48     49 == Exim ==    50     51 On Debian, the following command can be run to adjust the configuration:    52     53 {{{    54 dpkg-reconfigure exim4-config    55 }}}    56     57 The following questions are especially interesting:    58     59 {{{{#!table    60 '''Question''' || '''Remarks'''    61 ==    62 IP-addresses to listen on for incoming SMTP connections    63 || Remove IPv6 interfaces in User Mode Linux or other environments without    64 .. IPv6 support or Exim will not bother listening on IPv4 interfaces either.    65 ==    66 System mail name    67 || State the fully-qualified hostname, not just the domain name, which is    68 .. what the dialogue suggests is sufficient. For example:    69 {{{    70 mailserver.example.com    71 }}}    72 ==    73 Other destinations for which mail is accepted    74 || This is a colon-separated list that should indicate the local domain as    75 .. well as the unqualified hostname. For example:    76 {{{    77 mailserver:example.com    78 }}}    79 }}}}    80     81 == Useful Commands ==    82     83 The following commands prove useful when troubleshooting and appear to be    84 available as shown within a Debian environment.    85     86 {{{#!table    87 '''Task''' || '''Exim''' || '''Postfix'''    88 ==    89 Check the mail queue    90 ||<colspan="2"> `mailq`    91 ==    92 Process the mail queue    93 || `sendmail -q` (or `exim -q` or `runq`)    94 || `sendmail -q` (or `postqueue`)    95 ==    96 Flush the mail queue    97 || `exim -qff`    98 || `postqueue -f`    99 ==   100 Deliver a specific message   101 || `exim -M <identifier>`   102 || `postqueue -i <identifier>`   103 ==   104 Test delivery for an address   105 ||<colspan="2"> `sendmail -bt <address>` (see also `sendmail -v -bv <address>` and `sendmail -v -bvs <address>`)   106 }}}   107    108 See [[http://bradthemad.org/tech/notes/exim_cheatsheet.php|Exim Cheatsheet]] and [[http://www.postfix.org/DEBUG_README.html|Postfix Debugging Howto]] for more guidance.