# HG changeset patch # User Paul Boddie # Date 1446399791 -3600 # Node ID c66175403c70167f34154728ddaa09d24a1dd286 # Parent dbbff7484fea785b4f6b2c142955fd39a4b3675d Added more local SMTP, LMTP and MTA notes. diff -r dbbff7484fea -r c66175403c70 docs/wiki/FrontPage --- a/docs/wiki/FrontPage Sun Nov 01 00:43:39 2015 +0100 +++ b/docs/wiki/FrontPage Sun Nov 01 18:43:11 2015 +0100 @@ -137,10 +137,11 @@ * [[/CounterProposals|Counter-Proposals and Offers]] * [[/CronIntegration|Cron Task Scheduler Integration]] - * [[/MailIntegration|E-Mail Integration]] * [[/EventRecurrences|Event Recurrences]] * [[/IncomingMessages|Incoming Messages]] * [[/OutgoingMessages|Outgoing Messages]] + * [[/MailIntegration|Mail Integration]] + * [[/MailboxIntegration|Mailbox Integration]] * [[/Testing|Testing]] * [[/UseCases|Use Cases]] * [[/WebServerIntegration|Web Server Integration]] diff -r dbbff7484fea -r c66175403c70 docs/wiki/MailIntegration --- a/docs/wiki/MailIntegration Sun Nov 01 00:43:39 2015 +0100 +++ b/docs/wiki/MailIntegration Sun Nov 01 18:43:11 2015 +0100 @@ -1,4 +1,4 @@ -= E-Mail Integration = += Mail Integration = To act as a part of an e-mail system, imip-agent provides a number of programs that may be invoked by mail transfer agents (MTAs) upon sending or receiving @@ -75,6 +75,8 @@ || Postfix is also widely deployed and is sometimes preferred by administrators. }}} +Some hints on mail system configuration can be found in the [[/MTA|MTA guide]]. + == Identification of Recipients == In principle, any mechanism supported by the MTA can be used to identify diff -r dbbff7484fea -r c66175403c70 docs/wiki/MailIntegration--LocalSMTP --- a/docs/wiki/MailIntegration--LocalSMTP Sun Nov 01 00:43:39 2015 +0100 +++ b/docs/wiki/MailIntegration--LocalSMTP Sun Nov 01 18:43:11 2015 +0100 @@ -44,22 +44,36 @@ local+vincent.vole@example.com }}} -The message is then routed to a mail delivery mechanism, perhaps by converting -the local address to a local system user identity: +== Local System Users == + +With such a local user indicated, the message is then routed to a mail +delivery mechanism, perhaps by converting the local address to a local +system user identity (a user with an account on the system running the +software). For example: {{{ vole }}} -The local delivery mechanism would then deposit the message in the user's mailbox. -Alternatively, routing for a mail storage solution would accept the message for -the local user and deliver it to that user's mailbox. +The local delivery mechanism would then deposit the message in the user's +mailbox. MTAs typically provide such routing for local system users by +default. + +== Mailbox/Virtual Users == -MTAs typically provide routing for local system users by default. Where the -mail system must instead route messages to mailbox providers employing LMTP, -some more effort may be required. See the +Alternatively, with a local user having been indicated, a message would be +routed for delivery by a mail storage solution which would accept the message +for the indicated user and deliver it to that user's mailbox. For example: + +{{{ +vincent.vole +}}} + +Where such routing is performed to mailbox providers employing LMTP, +some additional configuration effort may be required. See the [[../../MailboxIntegration|mailbox integration guide]] for more details. -Configuration files for routing messages for explicitly-indicated local users -are provided in the [[../../MailIntegration/LDAP|LDAP]] and -[[../../MailIntegration/Simple|simple]] integration guides. +Some of the routing for explicitly-indicated local users is dependent on the +identification of users and is described in the +[[../../MailIntegration/LDAP|LDAP]] and [[../../MailIntegration/Simple|simple]] +integration guides. diff -r dbbff7484fea -r c66175403c70 docs/wiki/MailIntegration--MTA --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/wiki/MailIntegration--MTA Sun Nov 01 18:43:11 2015 +0100 @@ -0,0 +1,64 @@ += 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. + +== General == + +Some general measures are presented below. + +=== 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. + +=== 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. + +=== 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. + +== 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 +}}} +}}}} diff -r dbbff7484fea -r c66175403c70 docs/wiki/MailboxIntegration --- a/docs/wiki/MailboxIntegration Sun Nov 01 00:43:39 2015 +0100 +++ b/docs/wiki/MailboxIntegration Sun Nov 01 18:43:11 2015 +0100 @@ -98,3 +98,19 @@ These files provide example definitions for the `master.cf` and `transport` files that typically reside under `/etc/postfix`. Their contents can be merged with those files as appropriate. + +== Permissions == + +Note that remarks about permissions management in the +[[../MailIntegration/LMTP|LMTP guide]], concerning communication with mail +storage systems such as Cyrus, also apply when getting MTAs such as Postfix +to communicate with those systems. Consequently, it may be necessary to add +the dedicated MTA system user to a specially-created `lmtp` group. For +example: + +{{{ +adduser postfix lmtp +}}} + +See the [[../SystemUsers|system users guide]] for more information on the `lmtp` +group. diff -r dbbff7484fea -r c66175403c70 docs/wiki/SystemUsers --- a/docs/wiki/SystemUsers Sun Nov 01 00:43:39 2015 +0100 +++ b/docs/wiki/SystemUsers Sun Nov 01 18:43:11 2015 +0100 @@ -32,7 +32,7 @@ }}} This group should be employed for LMTP delivery by systems like Cyrus and -Dovecot. See the section on configuring mail systems for delivery for more +Dovecot. See the [[../MailboxIntegration|mail storage guide]] for more information. A system user needs to be created and to belong to certain groups in order to @@ -55,6 +55,13 @@ (which merely needs the ability to connect to a local network service) whilst allowing the Web server to read data written by those programs. +{{{#!wiki tip +It is possible to use the above strategy for LMTP with local SMTP delivery +because there may be a need to create the `lmtp` group so that MTAs can deliver +to [[../MailboxIntegration|mail storage solutions]]. However, this approach +provides a means of separating imip-agent from mail-related users and groups. +}}} + A system user needs to be created and to belong to certain groups in order to deliver messages to mail stores and to publish resources on the Web: