• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

mail.php not working with simplest unsecure SMTP configuration

Scheduled Pinned Locked Moved General pfSense Questions
3 Posts 2 Posters 529 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    JZng
    last edited by May 29, 2019, 11:47 PM

    Hi, I have a local exchange which will accept my domain emails w/o authentication. It's also plain text SMTP on port 25... I have zero issues sending a test via pfSense web UI. However, when trying to run it from the shell, no email comes through. Below is an example of a command that does not work. Any clues? Should I start using authentication just to test? Although I don't see much reason considering that from pfSense the test worked. Is there any way to snoop/spy on PHP and find out what was called via pfSense UI when I hit the SMTP test button?

    echo test | mail.php -s="Blah"
    
    G 1 Reply Last reply May 30, 2019, 1:57 PM Reply Quote 0
    • G
      Gertjan @JZng
      last edited by May 30, 2019, 1:57 PM

      @JZng said in mail.php not working with simplest unsecure SMTP configuration:

      will accept my domain emails w/o authentication. It's also plain text SMTP on port 25...

      Yeah, that can happen.
      There are still places left where 'users' can inject mail using port 25.
      Don't ask me why ...

      Mail clients (pfSense is not a mail server, it behaves like a mail client) should not use port 25 - even if the ISP, or who ever is your mail server supplier, offer that possibility. Port "25" is used for inter-mail-server communication.
      Go for submission = port 587 or better smtps = port 465.

      Btw :
      echo test | mail.php -s="Blah"
      works for me - pfSense drops the mails on my mail server for delivery, using port 465.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • J
        JZng
        last edited by May 30, 2019, 5:30 PM

        Sadly it's my fault. I hit TEST on the Advanced>Notification screen but I never hit save... definitely works now when mail.php is called from the shell.

        I did start using Node RED as my email middleman with curl being called from pfSense... that also worked well. However, generic mail.php is obviously much simpler.

        This is the piece I'm trying to automate notifications for: https://forum.netgate.com/topic/118401/openvpn-server-notification-on-connect

        Thanks for the input, thread can be closed...

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received