Find the answer to your Linux question:
Results 1 to 8 of 8
Are there any Sendmail Wizards available for some little help with settingup virtual hosting ? For starters : I'm looking for a way to distribute email for two local hosted ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Location
    Vleuten, The Netherlands
    Posts
    552

    Any sendmail wizards on the forum?


    Are there any Sendmail Wizards available for some little help with settingup virtual hosting ?

    For starters :
    I'm looking for a way to distribute email for two local hosted domains and a foreign domain.
    I want to relay incomming email for the foreign domain to a different machine/IP.
    But I'm unsuccessfull , tried virtual user and domain tables but to no avail.

    Are the M4 rules followed in order ???
    Or are they used independently ?

    Any help would be greatly appreciated.

    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

  2. #2
    Just Joined!
    Join Date
    Dec 2004
    Posts
    2

    Sendmail

    You didn't state which version of Linux you were attempting to use.

    I personally had a difficult time getting sendmail to do whatever I wanted so I dropped it in favor of Postfix. And have never looked back. Postfix ships with most Linux distributions and last time I checked even installed on Redhat alongside sendmail only requiring that you run a script to change over.

    Postfix is inherently more secure, and extensible. Virtual Hosting can be done with it via webmin, the web based GUI. Sendmail is very powerful, and thusly somewhat complex, and I quite frankly, don't have the time to master it, which made postfix even better, I haven't mastered it, but it's doing everything I wanted it to do.

    PK

  3. #3
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    The m4 rules are followed in order. The way I would do it is (based on a standard RedHat ES3 file layout):

    edit /etc/mail/mailertable

    and put something like:

    Code:
    domain.com esmtp:123.45.67.89
    where domain.com is the domain you want forwarded on, and 123.45.67.89 is the IP address of the other mail server. I am not positive if you need to have domain.com in your local-host-names file. I think you do, so the daemon knows whether to accept or reject the mail before processing "where it goes". You may have a mailertable.db file, so I would also run
    Code:
    cd /etc/mail && make
    just in case. The other two domains can simply be put in local-host-names, and the mail will be accepted by sendmail.

    Best,

    Samuel
    I respectfully decline the invitation to join your delusion.

  4. #4
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Location
    Vleuten, The Netherlands
    Posts
    552
    Thanks Samuel,

    I'll give it a try later today.

    Think I'll give google another try too.

    Quote Originally Posted by pksings
    You didn't state which version of Linux you were attempting to use.
    There is no need to, as the Linux versions are stated below my Avatar.
    There's no difference in Sendmail if you run it on Red Hat or Slackware.
    Building a config file stays the same, as is it's layout.
    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

  5. #5
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Location
    Vleuten, The Netherlands
    Posts
    552
    Okies, I'm stuck.

    I have 2 domains:

    DomainA.com and DomainB.com
    DomainA needs local delivery, DomainB needs to be relayed to a internal IP

    DomainB.com is not in my local domain list
    it IS available in the mailertable.db for domain relaying, including forced IP address and the option: Ignore MX records.

    This didn't work.

    The DNS entries for both domains point to my system, so all mail is delivered there, but when I receive mail for DomainB it does a mail lookup and finds itself again .
    The idea was/is that it should NOT lookup the mailer hostname but instead use the supplied IP for delivery.

    Suggestions?

    I've also tried using the Virtual User table forwarding all mail for domainB to address xxx.xxx..xxx.xxx

    Didn't work either, it delivered just localy.
    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

  6. #6
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    I think sendmail is kind of backwards on this. I think domainB.com may need to be in /etc/mail/local-host-names so that it resolves to local, then is passed to mailertable to be parsed, and sent back out to the external machine.

    I am pretty sure I remember them doing this so sendmail can be a secondary mail server more easily. It makes more sense in that way to treat the mail locally first, since you are technically a mail server for the domain.

    If that doesn't work, get back with me. I may need to actually play with it on a test machine of mine to get it to work

    Best,

    Samuel
    I respectfully decline the invitation to join your delusion.

  7. #7
    Just Joined!
    Join Date
    Oct 2004
    Posts
    8
    in mailer table
    Code:
     domainB.com      ESMTP:internal-machine-name
    in etc/hosts file
    Code:
    internal-machine-name  ip-of-that-machine
    in /etc/mail/relay_allow
    Code:
    domainA.com
    domainb.com
    internal-machine-ip

  8. #8
    Just Joined!
    Join Date
    Jun 2004
    Posts
    78
    Quote Originally Posted by aru510
    in mailer table
    Code:
     domainB.com      ESMTP:internal-machine-name
    in etc/hosts file
    Code:
    internal-machine-name  ip-of-that-machine
    in /etc/mail/relay_allow
    Code:
    domainA.com
    domainb.com
    internal-machine-ip
    What's the difference between "ESMTP:" vs. "SMTP:" ??

Posting Permissions

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