mails with same domain as server only sent to local account

Discussion in 'Installation/Configuration' started by Chag, Nov 13, 2020.

Tags:
  1. Chag

    Chag New Member

    Hi,
    I decided to upgrade my server to 3.2 and to change my domains.
    I previously had 2 domains : mydomain.net and mydomain.fr. I decided to remove mydomain.net as I don't use it.
    I made my changes to the conf but I obviously made mistakes as i no longer receive mails. Well, I receive mails for hosted domains differents than the domain of the server (mydomain.fr). But when mail is sent to [email protected], only the local account (in /var/spool/mail/testuser) does receive the mail. If the local account doesn't exist, I can't send the mail :
    Code:
    RCPT TO:[email protected]
    450 4.1.1 <[email protected]>: Recipient address rejected: unverified address: unknown user: "testuser"
    
    Of course, the account has been created in ispconfig.
    I've read carefuly https://www.howtoforge.com/how-to-install-an-email-server-with-ispconfig-on-debian-10/ and tons of pages (obviously not the right ones)
    I'm on debian 9, ispconfig 3.2, using dovecot
    Any help would be much appreciated
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is the hostname of your server? If it is example.com and you sent a mail to [email protected], it will try to send it to the local account. That's one of the reasons why your hostname should be a subdomain, for example server1.example.com.
     
  3. Chag

    Chag New Member

  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    And you followed the perfect server guide for debian 9? Can you share your postfix config and mail log?
     
  5. Chag

    Chag New Member

    Yes, when I installed, I followed the perfect server guide
    here are the logs and conf
    https://pastebin.com/Y49YUPBP
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Remove "mydomain.fr," from "mydestination = mydomain.fr," in your config file.
     
    Chag likes this.
  7. Chag

    Chag New Member

    Done and restarted postfix service. Same error. Maybe I should reinstall mail services from scratch ?
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Reinstalling would most likely not fix it. Did you restart with
    Code:
    systemctl restart postfix
    ?

    Does user testsam exist in the ISPConfig database?

    Did you reconfigure services when upgrading to 3.2?
     
  9. Chag

    Chag New Member

    I did /etc/init/d/postfix restart. tried
    Code:
    systemctl restart postfix
    Yes it does, I can connect to the webmail and check mails
    Yes, a few times

    There's been some change by the way. Before I saw your reply, I went to ispconfig / config server / mail. Didn't change anything but move from one tab to another and I could see there's was some actions done (red dot with a 2 inside, on top). Since, I no longer have the error message about non existing user. But I still don't get the message. However I now have an amavis error message :
    Code:
    (!)ClamAV-clamd av-scanner FAILED: run_av error: ask_daemon_internal: Exceeded allowed time at (eval 112) line 611
     
  10. Chag

    Chag New Member

    Restarted amavis. No more error messages in logs. did a postsuper -r ALL
    It seems to work better now. Oddly, I did almost nothing. Juste navigating ispconfig looking for anything that could help. Restarted services (postfix and amavis)
    Strange.
    By the way, thanks for your help !!! (again :) )
     
    Th0m likes this.
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    The user was probably not saved correctly :) No problem.
     

Share This Page