Virtual Hosting with Postfix

Discussion in 'HOWTO-Related Questions' started by alexej, Apr 27, 2005.

  1. alexej

    alexej New Member

    I found the "Virtual Hosting with Postfix" howto very interesting. Unfortunately I'm using sendmail so I'd like to know if this is also possible with sendmail?

    Alexej
     
  2. joe

    joe New Member HowtoForge Supporter

    Hi,

    I'm glad you found the articles interesting!

    I've never liked sendmail so I've never even attempted to try it. However, this page seems to cover virtual hosting with sendmail pretty well. You can still use dovecot with sendmail but you would have to tune it to how you set sendmail up.

    Good luck!
     
  3. mike

    mike New Member

    Hey Joe,

    nice howto you've written there. Thanks a lot! :)

    Michael
     
  4. intars

    intars New Member

    Postfix adduser

    bash: adduser: command not found
    Can any help me?
     
  5. linuxfast

    linuxfast New Member

    Are you logged in as root ?
    try su - root if you previously used su root

    also try useradd instead of adduser


    btw: nice work joe, just checked out your unixmages pdf, very well written !
    I wish this kind of material was around when I started out !
     
    Last edited: Sep 22, 2005
  6. intars

    intars New Member

    Hi, linuxfast!
    I cannot create a new e-mail account. The command adduser is not working. I use SUSE 9.3, postfix mail server and have logged in as root.
    Maybe there are other ways how to create an e-mail account?
    Thank you!
     
  7. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Have you tried the "adduser" command?
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What's
    Code:
    which adduser
    showing? And what
    Code:
    echo $PATH
    ?
     
  9. intars

    intars New Member

    /sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin
     
  10. matehortua

    matehortua New Member

    on my suse 9.3 box i work with: useradd and i dont have adduser.
    remember that YAST exists and i create users like this:
    empty home and /bin/false login.

    hope it helps
     
  11. dulaus

    dulaus New Member

    Tutorial: Virtual hosting with Postfix

    http://www.howtoforge.com/linux_postfix_virtual_hosting

    I have followed these instructions but on page two of this tutorial I am not certain what to do below:

    Tutorial instructions:

    This is exactly what we set up in Part One. OK, so now we've got dovecot taking the user to the correct mail directory, now we still need to authenticate them. Line 23 tells us we want to support two types of authentication methods: plain and digest-md5. Plain is what every client under the sun supports, so we'll go with that. The digest portion doesn't harm anything sitting there and if your client supports it, then by all means, use it!

    Finally, on lines 24 and 25 we see a userdb file and passdb file. Think of these as a second /etc/passwd and /etc/shadow file. The format of these files goes like this:

    userdb
    joe@domain1.com::1000:1000::/var/spool/vmail/domain1.com/:/bin/false::

    passdb
    joe@domain1.com:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1

    That encrypted password is an MD5 hash of the word 'test'. mkpasswd is a great utility for generating MD5 passwords. The 1000:1000 corresponds to the uid and gid of the "virtual" user we created in Part One. The home directory includes everything but the word before the @ in the email address.


    My confusion is what to call these files and are they just plain *.txt files. I am using Mandrake 9.2 so I will be using the Apache password utility to generate passwords.

    See URL below for the tutorial page 2.

    Thanks

    http://www.howtoforge.com/linux_postfix_virtual_hosting_2
     
  12. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    It's mentioned in the tutorial:

    Code:
    24 auth_userdb = passwd-file /etc/dovecot/users
    25 auth_passdb = passwd-file /etc/dovecot/passwd
    So the user file is called /etc/dovecot/users, and the password file /etc/dovecot/passwd. They are plain-text files.
     
  13. pradtf

    pradtf New Member

    great howto joe!
    having set-up a mailserver with mysql and amavis, i really appreciate the simplicity here.

    i'm stuck though on the password thing. you say that

    $1$G/FqlOG5$Vj0xmc9fKY.UVr[/email]8OWr/7C1

    is an MD5 hash of the word 'test' .... and it works for my login too!

    however, when i generate this myself on mysql or php or here for instance:

    http://www.spywire.net/password-encryption.php

    i get this for 'test'

    098f6bcd4621d373cade4e832627b4f6

    and this doesn't let me log in.

    i tried to find mkpasswd without success on freebsd and openbsd, but i'd like to know just what the MD5 hashes are that i am generating and how they relate to the hash that does work.

    in friendship,
    prad
     
  14. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I think it's a little bug in the tutorial: this doesn't look like an MD5 to me; it's rather a crypt.
     
  15. pradtf

    pradtf New Member

    great forum and nice pics on your site too!

    thanks for the revelation!

    the question then is how do i generate passwords to put in the passwd file? the site i mentioned earlier for instance produces 2 other formats

    eg DES - test - $1$Y/wu9geZ$1o9WII91o1ApO6nWpBlUG/

    which looks closer but of course close isn't good enough :D

    what is there to create passwords that the authentication system will accept?
    i do have mcrypt, but i haven't succeeded in generating the correct password.
     
    Last edited: Mar 26, 2006
  16. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Do you have the passwd command? It should produce the correct passwords.
     
  17. pradtf

    pradtf New Member

    yes but how do i get at the passwords? they show up in the /etc/passwd file as just '*'? i would be curious to know if we can access this any other way so you can see more than just the asterisk.

    i just solved my difficulty another way though.

    the md5 command (or any of the other stuff i listed earlier) are generated in what it turns out is a PLAIN-MD5 scheme. there is in fact a whole list of these schemes on the dovecot site:
    http://wiki.dovecot.org/Authentication

    so i just generated test using this on my freebsd system (any of the aforementioned ones give the same thing):
    md5 -s test

    got this as output:
    MD5 ("test") = 098f6bcd4621d373cade4e832627b4f6

    and put it in according to their instructions in the passwd file like this:
    prad@yourcybercourt.info:{PLAIN-MD5}098f6bcd4621d373cade4e832627b4f6

    so using {SCHEME} you can use a variety of password generation schemes like SHA or DES etc

    the dovecot site is pretty helpful - i should have realized this before wandering over half the internet :D :D

    (but i'm glad i found this place in the process)
     
  18. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    The passwords are stored in /etc/shadow.
     
  19. davestroy

    davestroy New Member

    Great tutorial

    I am running a dedicated server with SUSE 10.0 and have completed all steps on this great tutorial. Even changing the password ;-)

    What I do not get answered in the tutorial are following:

    1. How do I find out the smtp and pop server for the virtual domain (a domain i am hosting)? I expect them to be pop.domain.com and smtp.domain.com

    2. I noticed that port 25 is not accessable (110 is) when I try to telnet, how can I correct that.

    I am stuck on the point where I try to configure the mail account in my mail client (ex Outlook). The pop server test is passed but not the smtp test.

    And when I send mail to this address, no mail is received. I have noticed that some folders have beed created in the users mail dir. one is .INBOX containing other folders, so something is going on.

    My question is, Is there some very fundamental thing missing on my server to get the mail account up and running or how should I proceed?

    Thanks for any help
    David
     
  20. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Is it just me or is adduser suppose to be useradd which is why it's not there?
     

Share This Page