If you are not using the system administration code for it, I imagine you could use any SMTP submission software, supported by Linux, and implementing the, de facto, “sendmail -t” submission API (I suppose it might use a higher level mail submission command, but you could easily write a small script to handle that.)
If using postfix, you should use the primary postfix documentation, not a cook book solution. A quick skim of your first link indicates it is basically just about getting round the machine running FreePBX not being a first class internet mail source, with its own mailboxes and own mail domain name. It’s about rewriting the local mail user names and mail domain, to match the mail accounts you actually have. That’s not specific to FreePBX, although some of the user names may be.
If you do want to try with the cook book, you need to tell us precisely what goes wrong.
I don’t have personal experience of postfix. On the Asterisk based systems I was involved with, we used sendmail, and I forget the other package that I used on my personal systems, but that wasn’t either. It is a long time since I configured either.
When doing: echo "Subject: hello" | sendmail [email protected] The mailbox is not getting the email. I don’t even know if the message left the FreePBX system. The mail queue on the mail server is staying empty.
Can I post my main.cf file here and also all the other relevant configuration files?
You’d need to post your configuration and associated logs. You probably need to specify only a relayhost, some smtp_sasl opts and depending how strict your releayhost is, a suitable generic file.
Logs from our mail server? If this is correct, is there a way to hide sensitive information from the log before sending them out? Or could I post only lines that I think relevant?