Hi 2 all.
I have a rather stupid question but I really got stacked.
I have a NC server in my private network that is connected using OpenVPN to a VPS acting as a gateway and frontend for it and a bunch of other staff.
I also have a mail hosting that is not related to my infrastructure (service provider) and a domain I can fully manage.
So I am trying to implement NC mail app especially - ability to send mails from the web interface.
From what I discover, the app relays on php_mail module (clearly stated in the docs) which by itself can talk to Sendmail or any “sendmail”-alike daemon configured in appropriate section of php.ini (
sendmail_path = directive).
Before the mail app installation I used an sSMTP as an Sendmail substitute and it worked just fine for sending logs and other info messages to 1 user using 1 account.
Now I need to be able to send from several accounts thus different users and sSMTP will not do anymore.
As can be seen php_mail will not do anything with the mail, just pipe it to the daemon configured in php.ini file. It presents a slight problem, especially with Gmail as my reply address and bounce address (reply-to) are being changed by relaying software.
So I implemented a full-featured Sendmail install on my NC server and it works except it is trying to send mails by it’s own (that is ok, 2be expected from fresh install).
The issue with that is that traffic goes through my ISP and is presented with external ISP NAT address. I can bind Sendmail to my OpnVPN channel by use of
CLIENT_OPTIONS(`Family=inet, Address=126.96.36.199`)dnl and it may well solve the problem (just by modifying the SPF record for the domain with
ip4=A.B.C.D where A.B.C.D is a VPS address) but it will not solve it for the gmail or other services I am using and have no control over SPF.
For bounce address the solution is to call a Sendmail with an
-r option following with desired address. And again it’s not correct as I have several accounts across several domains and it may be only done dynamically using a webapp code. But the current version seems to not have any code for that. And even if it has it would not solve the SPF problem!
So My question is what has to be the best solution here:
- To install Sendmail on a VPS just relaing all mail through and figure other workarounds for “SPF-unmanagable” services?
- Get rid of Sendmail or/and sSMTP and use something else?
- Other solutions?
It seems that either I’m asking to much or am missing some key component here…