January 7th, 2004, 05:05 PM
sendmail setup on linux box
i'm in the process of setting up sendmail on my first linux box, and i'm running into a couple of "issues",
1. sendmail will handle 2 domains on this box, what is the best practice in mapping different external email addresses to the internal user account?
email@example.com <--> linux_user_a
firstname.lastname@example.org <--> linux_user_b
2. i have a php webpage which allow users to enter their email address and email their friend using php/apache/sendmail. the <return-path> is ALWAYS set to "apache", owner of apache/httpd process. any idea how to change this programmatically/dyamically to the user's provided email in the web form?
MORE questions to follow! thank you in advance for any assistance.
January 8th, 2004, 04:10 AM
You really don't want to use sendmail for handling incoming mail; it's buggy, unreliable and has had a very poor security track record. I would strongly recommend that you move to qmail instead. Installation instructions are at http://www.lifewithqmail.org
This is a very bad idea; forms of this nature are frequently abused by spammers to relay junk email through your server. This may well be against your ISP's terms of service, and will make you very unpopular with them.
Having said that, you can get around this problem by defining your own From and Return-Path headers in the headers parameter of the mail() function.
January 9th, 2004, 12:42 PM
i should be in the position to decide which sw pkg i want to use in a couple of years when i'm more higher up... but unfortunately, i don't have the "power" to do so at this moment...
the box is going to host maybe 2 domains, currently, i have it setup to use the "masquerade" feature to modify one domain.
1. do i need 2 instances of sendmail for 2 domains? seems like i can only masquerade all domains into ONE domain? i have looked into the genericstable but this won't mask everything.. i.e. "return-path" etc?
2. do i need to create a new local linux user for each email user? or is there a way to create a "master" user for one domain and have some software to deliver the mail via pop or alike?
January 9th, 2004, 12:48 PM
No, you can use virtual hosting.
You configure this in your email client.
You need to create a new UNIX user for each email user, yes. In the virtualdomains file you can set one user up to be the default user, i.e. mail that isn't delivered more specifically will go to him by default. See http://www.sendmail.org/virtual-hosting.html for details.