If you are hosting your mail on an external mail server (not on WEBppliance) for a domain, and you try to send an e-mail through PHP you need to apply the following workarounds:
Domains which are in Low Security or 3.1 Compatibility
You need to disable Sendmail, Squirrelmail, Vacation and Majordomo for the domain. This way WEBppliance will not try to deliver the e-mail locally and use whatever the MX record specifies as the mail server. From the command line you can do:
EditVirtDomain -c sendmail,off -c majordomo,off -c sqmail,off -c vacation,off [domain]
Domains which are in High Security
For domains in high security you should disable Sendmail, Squirrelmail, Vacation and Majordomo for the domain. This will stop WEBppliance from trying to deliver the e-mail locally. (See above for the command to do this) Then you will need to do the following steps:
- Verify that /home/virtual/[domain]/var/spool/mqueue exists if it does not recreate it. WEBppliance will remove this directory when sendmail is turned off.
- Because PHP scripts run chrooted, you will now need to generate a new sendmail.cf file to have sendmail relay the e-mail to the external mail server instead of trying to deliver the e-mails locally. Execute the following commands:
- cd /home/virtual/[domain]/etc/mail
- cp sendmail.mc new.mc
- This needs to be done because sendmail.mc is hard linked into every domain. If you edit sendmail.mc then it will affect other domains and any new domains that get created.
- Edit new.mc and add the following lines:
- Comment out this line by placing dnl in front of it:
- Also comment out this line by placing dnl in front of it:
- define(`ALIAS_FILE', `/etc/aliases')dnl
- m4 new.mc > ../sendmail.cf
- cat /dev/null > mailertable.local_domains
- makemap hash mailertable.db < /dev/null
- cat /dev/null > local-host-names
- What this will do now is any mail sent from sendmail with in the chrooted environment will be sent to the WEBppliance server instead and will be relayed to your external mail server which is hosting the domain.