#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    2
    Rep Power
    0

    sendmail setup on linux box


    hello,

    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?

    i.e.
    user_a@a.com <--> linux_user_a
    user_a@b.com <--> linux_user_b

    etc.

    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.

    Rs.
  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    i'm in the process of setting up sendmail on my first linux box
    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

    i have a php webpage which allow users to enter their email address and email their friend using php/apache/sendmail.
    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.
    Alex
    (http://www.alex-greg.com)
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    2
    Rep Power
    0
    thanks alex!

    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.

    Questions:

    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?

    thanks again!

    RS.
  6. #4
  7. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    1. do i need 2 instances of sendmail for 2 domains?
    No, you can use virtual hosting.
    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?
    You configure this in your email client.
    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?
    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.
    Alex
    (http://www.alex-greg.com)

IMN logo majestic logo threadwatch logo seochat tools logo