PHP/Exim error

RackSystems

Verified User
Joined
Oct 4, 2004
Messages
50
Location
Deventer, The Netherlands
When i try to mail with php mail(); i get this error:

Exim is a Mail Transfer Agent. It is normally called by Mail User Agents,
not directly from a shell command line. Options and/or arguments control
what it does when called. For a list of options, see the Exim documentation.
 
Your path to sendmail set by "sendmail_path" in php.ini is probably wrong.

Users get that var set in their virtual file (in /usr/local/directadmin/data/users/) so that it's a per domain setting.

Check your sendmail_path in phpinfo(4) and make sure that command works from a shell.
 
With sendmail_path set to:
Code:
/usr/sbin/sendmail -t -i

you'll probably have to add a -f option to the mail call, like

Code:
mail('root@localhost', 'the subject', 'the message',
null, '-fwebmaster@localhost');

For DA users, httpd.conf sets sendmail_path to
Code:
/usr/sbin/sendmail -t -i -f username@domain

so you don't need the -f call:
Code:
mail('root@localhost', 'the subject', 'the message');

Check the output of phpinfo() in the script you're having problems with to determine the sendmail_path.
 
I checked it but messages i sent dont appair in the /var/log/exim/mainlog file...

The /var/log/maillog file says the follow:

Can somebody tell me how to remove all the e-mail software and reinstall it... Is there a tutorial or help file somewhere?
 
Last edited:
There are 3 exim logs in that directory you might want to check ;)

Uninstalling exim varies depending on what OS you are using. Those that DirectAdmin provides a package for the particular operating system can simply be removed by uninstalling the package and reinstalling.
 
Back
Top