OpenWebmail tips

From CobaltFAQs

Jump to: navigation, search

If you are using Open WebMail on your RaQ, and you want to have all users send their email from username@example.org instead of the default username@host.example.org, you need to make two simple changes.

First, edit the systemwide configuration file to allow us to override the default domain names:

  cd /home/openwebmail/cgi-bin/openwebmail/etc
  vi openwebmail.conf

At the top of the file you should see a block like this:

  domainnames           auto
  mailspooldir          /var/spool/mail
  timeoffset            auto
  ow_cgidir             /home/openwebmail/cgi-bin/openwebmail
  ow_htmldir            /home/openwebmail/data/openwebmail
  logfile               /var/log/openwebmail.log
  spellcheck            /usr/bin/ispell
  default_language      en

We want to add a single line so it looks like this:

  domainnames           auto
  domainnames_override  yes
  mailspooldir          /var/spool/mail
  timeoffset            auto
  ow_cgidir             /home/openwebmail/cgi-bin/openwebmail
  ow_htmldir            /home/openwebmail/data/openwebmail
  logfile               /var/log/openwebmail.log
  spellcheck            /usr/bin/ispell
  default_language      en


Second, create an overriding config file for each domain on the server. The file is named with the full domain name (www.example.org). In each file will go a single line

  domainnames example.org

where example.org is the domain name without the hostname (usually www) in front of it.

A fast way to make all these files is to do

  cd /home/openwebmail/cgi-bin/openwebmail/etc/sites.conf
  for i in `ls -1 /home/sites`; do echo "domainnames ${i##www.}" > $i; done

This lists out every site on the server in a single column, and echoes it minus the leading www. into a file. Note that if you have domains with a hostname other than www, this will not work properly and you'll have to patch up those individual files. Still a lot faster than doing each one by hand.

Also note that this only affects users who have not yet started to use Open WebMail. For users that have already used the system, they will have their "From" addresses written into a file in their directory named from.book. You will need to edit this file and remove the leading hostnames in each From address listed. (The users can do this too in their Settings; see http://www.openwebmail.org/ for more info)

Personal tools