Invalid email address when trying to redirect to localhost script

Discussion in 'General' started by linus, May 27, 2024.

  1. linus

    linus Member

    I have made an email forward for a hosted domain example.com to point to a local alias example-alias@localhost to automatically process incoming emails, like this in the /etc/aliases:
    example-alias: "| /opt/php-7.1/bin/php /var/www/example.com/web/script.php shop_emailOrderImport:mail "

    It has been in use for years and it is working. But now that I wanted to do adjustments in the ISPConfig GUI -> Email -> Email Forward -> Save I get the following:

    "The destination contains at least one invalid email address."
    It appears the forwarding email validation is not able to accept @localhost as a valid email adress anymore, or have I been doing something wrong all the time?

    upload_2024-5-27_11-40-59.png
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try using @localhost.localdomain instead plus take care that you have localhost.localdomain in /etc/hosts too.
     
    linus and ztk.me like this.
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    you could check your postfix' master.conf and your /etc/hosts
    most systems have a localhost.local or localhost.internal configured, this validates the email syntax and should be delivered local aswell.
    Maybe you need to adjust your script and configuration to fetch those.
     
    linus likes this.
  4. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Dang it, the second I hit post I got the notification haha :D
     
  5. linus

    linus Member

    Thank you, @localhost.localdomain worked really well!
     
    till likes this.

Share This Page