Can't receive locally sent emails & Relay access denied

Discussion in 'ISPConfig 3 Priority Support' started by curiousadmin, May 9, 2025.

  1. curiousadmin

    curiousadmin Member HowtoForge Supporter

    Hello Community,

    Couple days ago I finished the Autoinstall on Ubuntu 24.04.2: https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/
    Running the latest version of ISPConfig: define('ISPC_APP_VERSION', '3.3.0p1');

    I do have some IPv4 tweaks:
    /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master
    Code:
    listen = *
    /usr/local/ispconfig/server/conf-custom/install/postfix_custom.conf.master
    Code:
    inet_protocols = ipv4
    and I did ispconfig_update.sh --force afterwords and my /etc/dovecot/dovecot.conf is untouched ie:
    this part remains:
    Code:
    listen = *,[::]
    my /etc/dovecot/main.cf I believe is unchanged (I don't remember changing it) but I see this:
    Code:
    ...
    inet_interfaces = all
    inet_protocols = ipv4
    This server was migrated from an old Ubuntu 20.04 installation using ISPConfig Migration Tool (not sure if relevant).

    Mail Domain is set to: Spamfilter: "- not enabled -"
    Local delivery: "unticked" (default settings)
    (Updated OP)

    My newly installed/migrated server can't receive even locally sent (within one server) email. The email is sent (I can see it in the "Sent" folder of webmail or even Thunderbird) but it does not arrive to inbox. I also cannot receive even any error message (ie Undelivered Mail Returned to Sender) like if I do it from a 3rd party ISPConfig system (see below).

    When I do # systemctl status dovecot
    Looking at /var/log/mail.log the relevant part I believe is:
    When I send an email to this installation from another ISPConfig installation I receive error message Undelivered Mail Returned to Sender with body saying:
    Notes: Domain1.com and Domain2.com are active domain names (shouldn't matter for delivery within 1 ISConfig mailserver),
    123.123.123.123 is just example public IP.

    I have a feeling there is some configuration issue with the Dovecot but I can't really pinpoint it (I could also be totally wrong)...

    Thank you all very much in advance.
     
    Last edited: May 9, 2025
  2. curiousadmin

    curiousadmin Member HowtoForge Supporter

    Update: If I change Local delivery: "ticked" (not default settings) the email within the same email server (within myserver7) now works fine.

    If I send email from this myserver7 via [email protected] to a [email protected] (different ISPConfig system let's call it myserver8) the email arrives to [email protected] (this actually always worked). Now if I reply to this email from [email protected] back to [email protected] the email arrives (this didn't work before).

    If I create a new email from user [email protected] (sent via myserver8) and send it to [email protected] (located at myserver7) the email is not delivered with error Undelivered Mail Returned to Sender / Relay access denied (in reply to RCPT TO command).
     
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    and
    Both mean that the server you are trying to deliver to does not feel responsible for the domain "domain2.com". You have to add the domains as a maildomain to ISPConfig. Or if it is added fix your configuration, whatever you have changed, it seems like postfix is not recogniozing this domain as a virual_domain.
     
  4. curiousadmin

    curiousadmin Member HowtoForge Supporter

    Thank you @pyte for the followup. But what can I do?

    It worked fine on Ubuntu 20.04 (running ISPConfig 3.2.12p1), I migrated the data to this new installation using official tool and the only thing that I changed was the IPv4 thing.

    I even went to Email - Email Domain - to make the domain "inactive" and then to active it again with no effect.

    Is the migration tool broken and wrote the data somewhere but missed some database entries?

    The plot thickens: I setup a completely new email domain (newdomain.com) at myserver7 and when I send an email from myserver8 ([email protected]) towards [email protected] at myserver7 the email arrives just fine.

    Bottom line: The configuration at the server level seems to be fine. To me it looks like the Migration didn't go well... But what to do now? What to check? I'm not a programmer to check the code and debug it.

    @till any thoughts on this?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The Migration Tool works well; thousands of servers have been migrated successfully with it already, so that's most likely not the cause of your issue. As soon as you can see the email domain in the ISPConfig GUI, it has been migrated successfully, as Postfix uses the exact same data records that you see in the ISPConfig GUI.

    Please post a screenshot of the settings of a migrated domain.

    Maybe the domains you used for testing are set up on the target and source server? This will not work, you can not test like that. This will also explains why it works with a new domain.

    Also you said a new domain works, have you compared the settings of the new and old domain in ISPConfig? Same checkboxes set in both domains?

    If you want to test your migrated server, do this: Login to a mailbox of the migrated server using webmail on the new server and send an email to the exact same mailbox that you used for the webmail login. Does this email arrives in webmail after a few seconds? If yes, then your migrated mail setup works fine.
     
  6. curiousadmin

    curiousadmin Member HowtoForge Supporter

    OK seems the issue was the public key part of domainkey - I will never know for sure if there was some database glitch during the migration or my nameservers provider side did something nasty (or something happened to their DNS) and changed the domainkey TXT record on their end but there was a (few letters) difference there and the emails stopped arriving with the "Undelivered Mail Returned to Sender"

    Is it good idea to re-generate the DKIM keys? If yes how? Simply turning it off and on in the admin ("enable DKIM:") does not change the keys.

    What is probably worth looking into @till the "Local delivery" the setting was unticked post-migration and I noticed when I setup my newdomain.com the default is "ticked".
     
  7. curiousadmin

    curiousadmin Member HowtoForge Supporter

    Just to be clear this was not meant in any way personal towards you or the other developers and I'm sorry if it felt that way. I'm also not saying that the Migration Tool is bad/buggy. It's beautiful piece of software and the price of the tool is really, really competitive for what it does.
    I use it for couple of years myself already and it never failed me.

    It just made me wondering if maybe there was some new feature with the introduction of version ISPConfig v3.3 which somehow was not considered and the Migration might have not propagated something somewhere but that does not seem to be the case (see above).
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Thank's, I look into that. Probably an issue with ISPConfig and not the Migration Tool.

    Don't worry; I have not taken this personally at all.

    The issue is that if I leave it uncommented, if someone suggests the Migration Tool is broken, I will get emails where people tell me that 'everyone on the internet' claims it's not working or even worse they do not even consider buying it because they think it does not work. So I have to clarify any such suggestion that there might be an issue with the tool.
     
    curiousadmin likes this.
  9. curiousadmin

    curiousadmin Member HowtoForge Supporter

    I understand and not a problem.

    Btw as I mentioned above is it a good idea to re-generate the DKIM keys? If yes how? Simply turning it off and on in the admin ("enable DKIM:") does not change the keys.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You can either try to click generate dkim key. of if this does not work or is not possible, you can try to empty the dkim key field, press save, go back and generate it again.

    But I guess I would not re-generate them if they work.
     

Share This Page