Article ID: 2529, created on Oct 29, 2007, last review on May 4, 2014

  • Applies to:
  • Pro Control Panel Linux

AdditionalInformation

View Knowledge
Knowledge ID 1422
Product : WEBppliance for Linux
Version : 3.5.16
Topic : Hot Fixes

Title
How to configure a domain when mail is hosted on an external mail server.

Summary
How to configure a domain when mail is hosted on an external mail server.

Prevention


Details

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:
      • FEATURE(`nullclient',`your.webppliance.hostname')dnl
      • undefine(`ALIAS_FILE')dnl
    • Comment out this line by placing dnl in front of it:
      • include(`domain-info.m4')
    • 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.

Attachments


Related Knowledge

Related Links
 
Last ModifiedUsageSatisfiedLast Used
8/20/2004 1:00:36 PM2345010/11/2007 6:42:04 AM

4cc899da08664637a8bc437308d3ddd7 3ccb419cf98083f3bb45808fba8dbc7c 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF