Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-26-2007, 05:49 AM   #1
LQ Newbie
Registered: Feb 2007
Posts: 3

Rep: Reputation: 0
Deliver data from form to local mailbox

Hope I hit the right subforum.

I'm setting up a website with a contact form. I want the form to use the mail() function in PHP to send it to the SMTP server running on the same machine. Here's how far I've come:

- Debian Sarge is installed, updated and running

- SSH server and Webmin (latest, version 1.320) for remote administration are both running well

- Dovecot IMAP server (no need for POP) seems to be working as it should

- Roundcube webmail runs as it should

- PHPMyAdmin runs as it should

I don't need mail sending to the outside world, I'm not going to use this as a "real" mail server. I only want the form data submitted presented as mails, as that is the easiest way of sorting and handling it (it's a failure report system for use at work) if you see what I mean.

I've tried Exim4, but can't get it to work. Since I want as much as possible to be administrated through Webmin, I installed an exim-module for Webmin, but it doesn't install.

Setting up webmin-exim (0.2.6-3) ...
Error: The new file /usr/share/webmin-exim/exim4.config does not exist!
dpkg: error processing webmin-exim (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
How do I get rid of it, and make APT stop complaining?

Now, Exim4 was just a tip from another forum, I don't need to use that if better software exists. I need the mail() function in PHP to work, and that requires (as I understand) a SMTP server on the same machine.

For the mail functions to be available on a Linux or similar machine, PHP must have access to the Sendmail binary during compile time.
Now, what does this mean? That a Sendmail binary must be available when the PHP processor is compiled, or when the script is compiled (I thought scripts where interpreted, correct me if I'm wrong)? Debian installs PHP in binary form, so I never compile it.

Long post short, I need a step-by-step guide for setting up a server where I can use the mail() function in PHP.


Problem solved, my system is now fully working. The mail() function and everything might have worked all along. I first solved the APT problem by editing /var/lib/dpkg/available (found that file by looking into some of the APT output I got with various APT commands) and removing the reference to the webmin-exim package, then deleting all webmin-exim* files in /var/lib/dpkg/info.

Then I could install Postfix, and it worked out of the box, it seemed. In Webmin I looked in User Mailboxes in the Postfix module, and my mails from the form was there. I realised that User Mailboxes viewed mails from /var/spool/mail, and by pointing Dovecot to /var/mail instead of Detect automatically, it was all working. So simple it's embarrasing, even for a newbie (well, for me at least).

Last edited by enixitan; 02-27-2007 at 08:23 AM.
Old 02-27-2007, 01:14 PM   #2
Registered: May 2001
Posts: 29,370
Blog Entries: 55

Rep: Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555
Good you solved it yourself!

//Off the 0-reply list...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Procmail to deliver spam to different mailbox? Maarten_Holland Linux - Software 2 05-22-2006 08:10 AM
Can't deliver mail (postfix) to local user wheel Linux - General 1 04-05-2006 07:45 AM
Postfix: Need to deliver all local mail to 1 account, then forward OneBinary Linux - Software 3 01-05-2006 04:49 PM
All mail form ISP end up in rootís mailbox. SeckmetLitiz Linux - Newbie 7 08-12-2005 11:56 AM
Downloading remote POP3 Mail to local mailbox Saffsd Linux - Newbie 7 01-26-2004 10:36 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration