Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Grav 1.7.38 email via sendmail fails, but direct via sendmail works?

admin plugins

Started by visitor9874652 3 years ago · 0 replies · 536 views
3 years ago

i use msmtp to send mail on linux

YAML
msmtp --version
    msmtp version 1.8.22
    Platform: x86_64-redhat-linux-gnu
    TLS/SSL library: GnuTLS
    Authentication library: GNU SASL; oauthbearer and xoauth2: built-in
    Supported authentication methods:
    plain scram-sha-1 scram-sha-256 external gssapi cram-md5 digest-md5 login ntlm oauthbearer xoauth2
    IDN support: disabled
    NLS: enabled, LOCALEDIR is /usr/share/locale
    Keyring support: Gnome
    System configuration file name: /etc/msmtprc
    User configuration file name: /root/.msmtprc

    Copyright (C) 2022 Martin Lambers and others.
    This is free software.  You may redistribute copies of it under the terms of
    the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
    There is NO WARRANTY, to the extent permitted by law.

it's aliased to sendmail

TXT
ls -al `which sendmail`
    lrwxrwxrwx 1 root root 21 Jan 21  2021 /usr/sbin/sendmail -> /etc/alternatives/mta*
ls -al /etc/alternatives/mta
    lrwxrwxrwx 1 root root 14 Jan 21  2021 /etc/alternatives/mta -> /usr/bin/msmtp*

msmtprc is configured to send via smarthost

mail send from shell works as expected

YAML
echo "hello" | /usr/sbin/sendmail -d -a mainsite [email protected]
    loaded system configuration file /etc/msmtprc
    ignoring user configuration file /root/.msmtprc: No such file or directory
    using account mainsite from /etc/msmtprc
    host = smtp.fastmail.com
    port = 465
    source ip = (not set)
    proxy host = (not set)
    proxy port = 0
    socket = (not set)
    timeout = off
    protocol = smtp
    domain = localhost
    auth = choose
    user = [email protected]
    password = *
    passwordeval = (not set)
    ntlmdomain = (not set)
    tls = on
    tls_starttls = off
    tls_trust_file = /opt/vmail/myCA.CHAIN.crt.pem
    tls_crl_file = (not set)
    tls_fingerprint = (not set)
    tls_key_file = /opt/vmail/mainsite.key.pem
    tls_cert_file = /opt/vmail/mainsite.crt.pem
    tls_certcheck = off
    tls_min_dh_prime_bits = (not set)
    tls_priorities = (not set)
    tls_host_override = (not set)
    auto_from = off
    maildomain = (not set)
    from = [email protected]
    set_from_header = auto
    set_date_header = auto
    remove_bcc_headers = on
    undisclosed_recipients = off
    dsn_notify = (not set)
    dsn_return = (not set)
    logfile = /var/log/msmtp.log
    logfile_time_format = (not set)
    syslog = (not set)
    aliases = (not set)
    reading recipients from the command line
    TLS session parameters:
        (TLS1.3)-(ECDHE-X25519)-(RSA-PSS-RSAE-SHA256)-(AES-256-GCM)
    TLS certificate information:
        Subject:
            C=AU,ST=Victoria,L=Melbourne,O=FastMail Pty Ltd,CN=*.fastmail.com
        Issuer:
            C=US,O=DigiCert Inc,CN=DigiCert TLS RSA SHA256 2020 CA1
        Validity:
            Activation time: Sun 23 Oct 2022 08:00:00 PM EDT
            Expiration time: Thu 02 Nov 2023 07:59:59 PM EDT
        Fingerprints:
            SHA256: 62:...
            SHA1 (deprecated): 85:...
    <-- 220 smtp.fastmail.com ESMTP ready
    --> EHLO localhost
    <-- 250-smtp.fastmail.com
    <-- 250-PIPELINING
    <-- 250-SIZE 71000000
    <-- 250-ENHANCEDSTATUSCODES
    <-- 250-8BITMIME
    <-- 250 AUTH PLAIN LOGIN XOAUTH2 OAUTHBEARER
    --> AUTH PLAIN AHB...
    <-- 235 2.0.0 OK
    --> MAIL FROM:<[email protected]>
    --> RCPT TO:<[email protected]>
    --> DATA
    <-- 250 2.1.0 Ok
    <-- 250 2.1.5 Ok
    <-- 354 End data with <CR><LF>.<CR><LF>
    --> From: m[email protected]
    --> Date: Fri, 27 Jan 2023 16:50:53 -0500
    --> Message-ID: <[email protected]>
    --> hello
    --> .
    <-- 250 2.0.0 Ok: queued as EC463513E4F 824BF1248FE via compute2
    --> QUIT
    <-- 221 2.0.0 Bye

the sent mail is received as expected

i run Grav 1.7.38

TXT
gpm --version
    Grav Package Manager 1.7.38

email plugin config is via sendmail, using the same sendmail bin string,

YAML
cat user/mainsite.net/config/plugins/email.yaml
    enabled: true
    from: m[email protected]
    from_name: MainSite
    to: m[email protected]
    to_name: MainSite
    queue:
      enabled: false
    mailer:
      engine: sendmail
      sendmail:
        bin: '/usr/sbin/sendmail -a mainsite'
    content_type: text/plain
    debug: true
    charset: null
    cc: null
    cc_name: null
    bcc: null
    reply_to: null
    reply_to_name: null
    body: null

attempt to send with Grav cli

BASH
bin/plugin email test-email -vvv -t [email protected]

fails quietly. no output at console, no logs in

TXT
find logs | grep email

and no message sent.

I have no idea how to debug this further.

Any suggestions on how to get this working? Or at least debugged?

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 57 15 hours ago
Support · by Anna, 3 days ago
2 65 18 hours ago
Support · by Justin Young, 19 hours ago
1 33 18 hours ago
Support · by Duc , 1 week ago
2 68 5 days ago
Support · by Colin Hume, 1 week ago
2 60 6 days ago