Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2001
    Posts
    1,045

    Sendmail + VirtualHosts

    How do you setup sendmail to allow users one the server to use there virtualhost when sending out emails? They can recieve the incoming fine, but if they sendmail out it shows the servers main domain name and not theirs, even if the domain is put into pine or the cgi program used to send mail for them.

    Users Joe has virtual host joesdomain.com
    when he sends mail out it shows joe@myhostdomain.com instead of joe@joesdomain.com . Any ideas?


    Thanks in advance.

  2. #2
    I don't think this is a "Sendmail" (the mail server software) issue exactly, but it may be how "sendmail" (the mail sending utility) handles the email address.

    Make sure when sending using "sendmail" (eg, from a perl script) that you specify a -f flag - or use -t and specify the sender in the To: header.

    No matter what, the server name will be in the message headers, but the From address is completely user-controlled.
    - Jman

  3. #3
    Join Date
    Apr 2001
    Posts
    1,045
    No matter where its sent from, pine or a cgi script it shows the servers domain and not the users. Is there a setting in sendmail to allow users to change the From to something else?

    Thanks

  4. #4
    Invoke sendmail with the -f option. Depending upon the configuration you might get an X-Authentication-Warning header added, but that's not exactly a non-feature anyway.

    Or you could just switch to qmail
    Dr. Colin Percival, FreeBSD Security Officer
    Online backups for the truly paranoid: http://www.tarsnap.com/

  5. #5
    Join Date
    Jun 2000
    Location
    Washington, USA
    Posts
    5,990

    Cool

    This is a simple to deal with one, check out http://www.sendmail.org/virtual-hosting.html

    What you need to setup is the generics table, which I've done in the past and it works great.

  6. #6
    Or you could just switch to qmail
    I fully agree here, I use Qmail exclusively. However, in this situation, if you invoke Qmail's "sendmail" wrapper without the -f option (or -t with From: header), it will still append the local hostname. I believe this is the standard practice.

    As for Pine, I have no idea; I do know that Pine doesn't support Qmail's MailDir format, which is far superior than the old 'mbox' format... but on a friend's machine, we had a similar problem with Pine.

    What we had to do was to open Pine, hit "S", then "C", and edit the "user-domain" to reflect the current email address. Before changing this, on the friend's machine (Linux with Sendmail) it was doing just what you describe.
    - Jman

  7. #7
    Join Date
    Apr 2001
    Posts
    1,045
    Where do you invoke this -f or -t from? Ive tried in Pine to change the User Domain and it still uses my main host domain.


    THanks

  8. #8
    Where do you invoke this -f or -t from? Ive tried in Pine to change the User Domain and it still uses my main host domain.
    I'm interested in this, anyone have the answer?

  9. #9
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,569
    qmail is bloody awful

    its the least user friendly bit of software ive ever had hte displeasure to install..

  10. #10
    Join Date
    Mar 2003
    Location
    Austin, TX
    Posts
    132
    If user friendliness is your goal, then you probably aren't going to be running sendmail either.

    Also, do you realize that there hasn't been a new release of qmail in years? Good ol' qmail 1.04, while being somewhat feature-light, hasn't had a single security hole in all that time.

    We won't even discuss the number of holes sendmail's had recently.

  11. #11
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,569
    i use postfix.. it seems to be a) securer and b) far easier to use than qmail..

    i remember openbsd saying 'we havent had a remote hole in blah blah blah'. did you not notice that 'they' (the blackhats i guess) dont release code/exploits/vulnerability information anymore..? just because nothing has been released, doesnt mean its secure

  12. #12
    Join Date
    Dec 2002
    Posts
    316
    Hey I added

    FEATURE(`genericstable', `dbm /etc/mail/genericstable')dnl
    GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl


    to my sendmail config and now I get this error

    /etc/mail/sendmail.cf: line 167: readcf: map generics: class dbm not available


    How do I make class dbm available??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •