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