Questions about sending mails

Discussion in 'Installation/Configuration' started by Daninor, Feb 25, 2023.

  1. Daninor

    Daninor Member

    Hi there
    I have an external email server I want to use, instead of the email services provided with the Ispconfig installer.
    Basicly what I am trying to do is using my external email server for minimum system emails, for example if letsencrypt renews fail.

    I have tried the setting under System > main config > mail. Enabling "Use SMTP to send system mails" and all the required fields works.. But it seems like the "envelope from" is wrong causing my external server Rspamd to mark it as spam?

    How can I change the "envelope from" that is used by Ispconfig? I tried searching online for it, but with no luck.

    Thanks in advance!
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the email headers you are seeing?
     
  3. Daninor

    Daninor Member

    Any specifics in the header you need?

    Mail server says:
    FORGED_SENDER (0) [[email protected],root@mywebserver]
    Sender is forged (different From: header and smtp MAILFROM: addresses)
    From address is different to the envelope [[email protected],root@mywebserver]

    ROM_NEQ_ENVFROM (0) [[email protected], root@mywebserver]

    [email protected] is my email server, and also the email address specified in System > main config > mail. Enabling "Use SMTP to send system mails".

    I believe its two addresses here causing issues? root@mywebserver?
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the settings under System > Main config > Mail?
     
  5. Daninor

    Daninor Member

    I cant see I could do this any other ways, since its sending out emails as it should, but here it is.. I anonymized my info ofc.

    All the above settings is standard..
    ---
    Administrator's e-mail: [email protected]
    Administrators name: MyWebServer
    Use SMTP to send system mails: yes (checked)
    smtp host: mail.myemailserver.com
    smtp port: 587
    smtp user: [email protected]
    PW: .....
    Use tls/ssl: starttls
    default mailserver: standard option (MyWebServer)
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You did not display the complete form of the Mail tab.
    Anyway, on my system SMTP Host: is localhost. "Use SMTP to send system mails" is ticked on, "Use SSL/TLS encrypted connection for SMTP" is No. Other SMTP fields are empty.
     
  7. Daninor

    Daninor Member

    I did. Like I mentioned "All the above settings is standard.." so the settings i didnt mention is not touched.

    With your suggestion I am using the local mailserver, this is not what Im trying to do. I want to use my external mail server.

    I have tested some more, if I send emails trough the "Help" support function in my panel, the emails is sent correctly. It seems to be how Letsencrypt sends the renewal mails that is the issue here?
     
  8. Daninor

    Daninor Member

    Nobody have any suggestions or ideas? To me it seems like its something to do with Letsencrypt. Is there any way to change this email adress?
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I have very comparable setups to yours, and do not see that issue there. I suspect that ISPConfig emails are working fine, but emails send by other software is not. Can you share a email (incl headers) you get that has this problem?
     
  10. Daninor

    Daninor Member

    My external mail server blocks receiving those emails since they come from an invalid address. I just see errors on the external mail server where its trying to send as [email protected] and root@mywebserver. I checked the /var/mail/root file, not sure if this is what you want.

    You are right Ispconfig emails seems to work fine. If I try sending an email from the "Help" support function everything is fine, but from Letsencrypt / Acme its not, seems like this one have different mail setup.

    Logs from /etc/mail/root
    Code:
    --DDF118888C7.1677346510/web.mywebserver.com--
    
    From MAILER-DAEMON  Sat Feb 25 17:35:10 2023
    Return-Path: <>
    Delivered-To: [email protected]
    Received: by web.mywebserver.com (Postfix)
        id 39A918888C6; Sat, 25 Feb 2023 17:35:10 +0000 (UTC)
    Date: Sat, 25 Feb 2023 17:35:10 +0000 (UTC)
    From: [email protected] (Mail Delivery System)
    Subject: Undelivered Mail Returned to Sender
    To: [email protected]
    Auto-Submitted: auto-replied
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
        boundary="0C6A18888C5.1677346510/web.mywebserver.com"
    Content-Transfer-Encoding: 8bit
    Message-Id: <[email protected]>
    
    This is a MIME-encapsulated message.
    
    --0C6A18888C5.1677346510/web.mywebserver.com
    Content-Description: Notification
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit
    
    This is the mail system at host web.mywebserver.com.
    
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
                       The mail system
    
    <[email protected]>: host mail.myexternalmailserver.com[123.456.283.222] said: 554 5.7.1 This
        message does not meet our delivery requirements (in reply to end of DATA
        command)
    
    --0C6A18888C5.1677346510/web.mywebserver.com
    Content-Description: Delivery report
    Content-Type: message/delivery-status
    
    Reporting-MTA: dns; web.mywebserver.com
    X-Postfix-Queue-ID: 0C6A18888C5
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Sat, 25 Feb 2023 17:35:02 +0000 (UTC)
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.7.1
    Remote-MTA: dns; mail.myexternalmailserver.com
    Diagnostic-Code: smtp; 554 5.7.1 This message does not meet our delivery
        requirements
    
    --0C6A18888C5.1677346510/web.mywebserver.com
    Content-Description: Undelivered Message
    Content-Type: message/rfc822
    Content-Transfer-Encoding: 8bit
    
    Return-Path: <[email protected]>
    Received: by web.mywebserver.com (Postfix, from userid 0)
        id 0C6A18888C5; Sat, 25 Feb 2023 17:35:02 +0000 (UTC)
    To: [email protected]
    Subject: [web.mywebserver.com] 25.02.2023-17:35 - WARNING - Could not verify domain test...
    MIME-Version: 1.0
    Content-type: text/plain; charset=utf-8
    Content-Transfer-Encoding: 8bit
    From: [email protected]
    Reply-To: [email protected]
    Message-Id: <[email protected]>
    Date: Sat, 25 Feb 2023 17:35:02 +0000 (UTC)
    
    web.mywebserver.com - 25.02.2023-17:35 - WARNING - Could not verify domain test.no, so excluding it from letsencrypt request.
    Thank you for your assistance.
     

Share This Page