2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
XMail Forum · Newbies read here ! All about SMTP,MX-Records,DNS etc. | Help Search Members Calendar |
Welcome Guest ( Log In | Register ) | Resend Validation Email |
Akari |
Posted: Mar 31 2009, 10:02 AM
|
Member Group: Members Posts: 58 Member No.: 1633 Joined: 19-May 05 |
Me again with my annual Xmail problem...
My old SuSE server went out of support and my ISP charged a minimum of EUR 150 (~US$ 200) for a reinstall. So I switched ISP's and got a shiny new server with 4 times the memory (and guaranteed cpu power) for less. Wonder why I didn't change earlier. So far so good. I decided to get Ubuntu 8.04 LTS for it's long time support feature. No reinstall for 7 more years yay! It was one of my most important requirements NOT to compile anything manually but let the distro fix any security issues and put some "apt-get update | apt-get upgrade | shutdown -r now" combo into my cronjob. Warning: The XMail 1.22 that comes with Ubuntu/Debian is, while possibly fulfilling the Debian policy of having separated spool, configuration, and binary files - somewhat unusable and I suggest not using apt-get to install XMail. The sources will compile without modification and Xmail versions are very rare. Just drop the idea. Back to Xmail. I've been following the BUILD instructions from the manual including the SSL instructions. It was my fourth time so everything went smoothly and I can send and receive email from my home computer just fine. I created a symbolic link to /var/MailRoot/bin/sendmail which I chmod +s earlier. However when trying to send email using PHP and Apache I'm getting the error message in the Apache log: "cannot find environment variable: MAIL_ROOT" The init script clearly says in start_xmail(): MAIL_ROOT=/var/MailRoot export MAIL_ROOT After stopping the Xmail server (and testing it's absence with "ps -A | grep -i xmail") I have changed the command line to include "-Ms /var/MailRoot" (in /etc/init.d/xmail) and started the Xmail-server again. Result was the same - it's still looking for the MAIL_ROOT environment variable when sending email from PHP. I have also tried to put "export MAIL_ROOT=/var/MailRoot" into my /etc/profile just to make even more suuuuure it exists. (me=stupid) PHP is using the correct sendmail binary (created a symbolic link to sendmail using "ln -s /var/MailRoot/bin/sendmail", the binary flagged ssuid) and the pathname is set correctly in php.ini. I have also restarted Apache to allow the new environment variable to be set for Apache. I'm not a Linux pro but just some kind of advanced who isn't scared of command lines and config files anymore. Any advice is greatly appreciated. Edit: fixed typo |
Akari |
Posted: Mar 31 2009, 10:18 PM
|
Member Group: Members Posts: 58 Member No.: 1633 Joined: 19-May 05 |
Ok a self-solving problem I simply wrote a wrapper script instead.
|