LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 02-26-2007, 06:49 AM   #1
enixitan
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.

Quote:
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:
webmin-exim
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.

Quote:
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.

-Edit-

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 09:23 AM.
 
Old 02-27-2007, 02:14 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 28,191
Blog Entries: 54

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


//Off the 0-reply list...
 
  


Reply


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 09:10 AM
Can't deliver mail (postfix) to local user wheel Linux - General 1 04-05-2006 08:45 AM
Postfix: Need to deliver all local mail to 1 account, then forward OneBinary Linux - Software 3 01-05-2006 05:49 PM
All mail form ISP end up in rootís mailbox. SeckmetLitiz Linux - Newbie 7 08-12-2005 12:56 PM
Downloading remote POP3 Mail to local mailbox Saffsd Linux - Newbie 7 01-26-2004 11:36 PM


All times are GMT -5. The time now is 11:39 PM.

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