Skip to content

Mail/Postfix add LMTP feature request #1739

@TosoBoso

Description

@TosoBoso

I really like the Mail/Postfix plugin and would love to use it with LMTP (local mail transport protocol) instead of SMTP.
I'm using Kopano as mail backend with LMTP:2003 as default way via virtual_mailbox_domains, virtual_transport = lmtp:IP:2003 or transport = lmtp:IP:2003.

To add LMTP should work straightforward and I tested it by adjusting the transport file, running postmap and restarting postfix without touching the GUI.
So on GUI level Domains if you would add the destination Protocol option to choose between SMTP vs. LMTP and for LMTP use Port 2003 as default the feature would be delivered.

Regards TosoBoso
PS: Proposed change snippets for lmtp feature (I'm not yet deep and brave enough for pull request):

  • plugins/mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/transport to change
    5: {{ domain.domainname }} domain.protocol:{{ domain.destination }}

  • plugins/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/forms/dialogEditPostfixDomain.xml to add
    20: (before )

    domain.protocol
    Protocol
    text
    Set the relay type protocol: default is smtp but also lmtp (local mail transport protocol) is supported e.g. using port :2003.

  • plugins/mail/postfix/src/opnsense/mvc/app/controllers/OPNsense/Postfix/Api/DomainController.php replace
    41: return $this->searchBase('domains.domain', array("enabled", "domainname", "destination", "protocol"));

  • plugins/mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/Domain.xml to add
    22: (before )

    smtp
    Y
    /^([l,s])mtp$/u
    Only smtp or lmtp are allowed

plugins/mail/postfix/src/opnsense/mvc/app/views/OPNsense/Postfix/domain.volt to add
62: (before <th data-column-id="uuid"..)
{{ lang._('Protocol') }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions