Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
Hi I'm a bit of a noobe when it comes to *nix systems so here is my problem. I've got a Fedora 5 setup as a web/ftp server and I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79

    Setting up a mailserver on Fedora5


    Hi
    I'm a bit of a noobe when it comes to *nix systems so here is my problem.
    I've got a Fedora 5 setup as a web/ftp server and I would like to setup a mail server as well. I instaled Webmin for easy administration and I would like to use Squirllmail as a webmail client.
    Now here's the thing I'm not clear on what I shuld do. For a mail server do I use Sendmail or Postfix or Dovecot? And when I tryed to setup sendmail I could not recive any emails, but I could send them. I enabled ports 25, 110 on the firewall but no users recived any mail.
    By the way I would like to setup the mailserver to recive and send mail for multiple domains.
    Anyway with Sendmail I tryed to add an alias and the domains into sendmail configuration.
    So I tryed Dovecot but I got an error that userdb in dovecot.conf is invalid eventhow I setup userdb=passwd and passdb=PAM(or shuld I also use passwd). So dovecot didnot start.
    Moveing on to Postfix and that's where it really stoped. I'm just stuck.
    Anyway whitch one of these mail servers is would be best for my situation and how do I set it up.
    And how is Squrllmail setup in Apache? How can I setup Apache so that insted of www.mydomain.com/webmail I can use webmail.mydomain.com(I can alter my DNS record so that is not an obsticle).

    Thanks for your help.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    Wooo, not much wrong then. Ok, lets slow this down and take things one at a time. Before I start I should say I'm not much of a Postfix expert, but I dont think this is really your problem.

    Dovecot first; it's not an MTA (mail transport agent - sendmail and postfix are mta's), its a mail server that lets you access your mail by pop3 or imap. You need a mail transport first, and drop Dovecot on the top to let you read your emails from elsewhere (you can read mail locally on the server without Dovecot, but if you want squirrelmail, it'll need such transports). If you're going to use Squirrelmail with Dovecot, I recommend using the imap features, but dont worry about that just yet, to get this all working, you need to configure things in order:

    - MTA (sendmail or postfix)
    - Dovecot (there are alternative mail servers, btw)
    - Squirrelmail (for which you will need apache installed and working, but I think you've got that already).

    It sounds like you've already had Sendmail working to a degree; as I'm only familiar with sendmail, I can only help with that (I'm sure someone else will pick up the postfix mailer if needed).

    You configure sendmail with the M4 language - I'm sure you've done this already. If you're doing this through webmin, you can probably enter these options directly through that interface, but if not, create yourself an M4 file for your domain that looks a bit like this:

    Code:
    divert(0)
    include(`../m4/cf.m4')
    OSTYPE(`linux')dnl
    define(`confDEF_USER_ID',``8:12'')dnl
    define(`confDOMAIN_NAME',`<your_domain>')dnl
    define(`ALIAS_FILE',`/etc/mail/aliases,/etc/mail/majordomo')dnl
    define(`confPRIVACY_FLAGS',`authwarnings,needmailhelo,noexpn,novrfy')dnl
    define(`confTO_QUEUERETURN',`4d')dnl
    define(`confTO_QUEUEWARN',`4h')dnl
    define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
    undefine(`UUCP_RELAY')dnl
    undefine(`BITNET_RELAY')dnl
    FEATURE(`redirect')dnl
    FEATURE(`always_add_domain')dnl
    FEATURE(`use_cw_file')dnl
    FEATURE(`local_procmail')dnl
    dnl FEATURE(`relay_hosts_only')dnl
    FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl
    FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
    FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access')dnl
    FEATURE(`blacklist_recipients')dnl
    FEATURE(dnsbl,`cbl.abuseat.org',` Mail from $&(client_addr) rejected: see http://cbl.abuseat.org')dnl
    MAILER(smtp)dnl
    MAILER(procmail)dnl
    You dont have to use the blacklist reciepients line if you dont want - I use real-time black holes to keep spam down; it's very effective. Dont forget to include your own domain name where I've indicated. I keep my m4 file in /usr/share/sendmail-cf/domain/' where I can compile it directly with 'm4 <mydomain>.m4 > sendmail.cf'

    Next copy the sendmail.cf file to /etc/mail.

    Edit /etc/mail/access to give any relaying access to machines on your LAN using their IP addresses - if you've a standalone machine this file should already contain localhost entries, so wouldn't need to be changed.

    Edit your /etc/mail/aliases file to map email names to user names on the system, and /etc/mail/majordomo to mark out the special email accounts, then run 'newaliases'.

    Edit /etc/mail/relay-domains to contain all the domains you want to relay mail for (i.e. your own domain).

    Then it should be a simple matter of restarting sendmail (with 'service sendmail restart') and testing it.

    Next up, set up Dovecot by editing its dovecot.conf; I found there was very little to change with the standard file - I think I changed only the directory name where the IMAP server stores it's mail in each user home directory. You can start Dovecot with 'service dovecot start'. Test your IMAP or POP3 connection with a regular mail reader such as evolution or kmail.

    Run 'system-config-services' and make sure that dovecot and sendmail are started automatically in your default runlevel, and all should be well.

    As far as getting squirrelmail to work goes, you'll have to follow the docs for that; I've only done it once, and that was a while ago. All I can say really is that if you're running it on an internet-based mail server, make sure you log into it using the SSL protocol (i.e. with https:// not http://) to keep your password encrypted.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79
    Ok thank you Roxoff for clearing that up. You see at my last job I only had to do with mail servers on MS platforms like Exchange, Kario, Merak..... So I had no idea that Postfix/Sendmail are just transfer agents and Dovecot is a mailserver.
    It should make things alot easier.

    I'm going to try to set up Sendmail and Dovecot this evening and report back if I have any rubble.
    The Apache web server is up and running and so is squirllmail. But I'm still not sure how it is set up in apache. Curently it works www.domain.com/webmail. But I would like to know how squirllmail works so that I can confgure the web server to work lik webmail.domain.com.

    Anyway thanks for your help for now.

    Bye

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79
    Roxoff, I have a falowup question.

    can I setup sendmail like this for multiple domains?
    Code:
    define(`confDOMAIN_NAME',`/etc/mail/myomains.list')dnl
    insted of
    Code:
    define(`confDOMAIN_NAME',`<my_domain>')dnl
    I tried set up sendmail like you said but no luck, localy I can send mail to user@localdomain.local but from the outside no, that's why I was wondering if I can do that like I wrote.

    Thanks

  6. #5
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79
    Well I set it up, but it still doesn't work. I can send mail localy to any doman that I added to sendmail. But anything coming from outside gest lost someware. The mail I'm testing from also doesn't get any error message back. I'm stuck and don't know what to do.

    Bye

  7. #6
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79
    Success!

    I've done it. But not with Sendmail, but with Postfix. After a cuple of houers of playing around with Sendmail I finaly gave up and tryed Postfix again. And set up the hole thing up again and sent a test mail. It worked and it still does.

    Thank you Roxoff for your help.

    I'm still haveing truble with Dovecot. It just wount start. I always get this error :
    Failed to start Dovecot :

    Starting Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf line 621: Unknown setting: userdb
    [FAILED]

    the Dovecot user database is set to /etc/passwd file whitch is aparently how it should be, but somehow it doesn't want to start.
    Anyone have any ideas what the heck is wrong?

    Thanks for the help.

    Bye

  8. #7
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    Quote Originally Posted by Self-Defence
    Roxoff, I have a falowup question.

    can I setup sendmail like this for multiple domains?
    Code:
    define(`confDOMAIN_NAME',`/etc/mail/myomains.list')dnl
    insted of
    Code:
    define(`confDOMAIN_NAME',`<my_domain>')dnl
    I tried set up sendmail like you said but no luck, localy I can send mail to user@localdomain.local but from the outside no, that's why I was wondering if I can do that like I wrote.

    Thanks
    All you need to do for multiple domains is add:

    Code:
    MASQUERADE_AS(`domain_name')dnl
    and set /etc/mail/domaintable to look like:

    Code:
    my_real_doman = my_masq_domain
    make sure all your domains are listed in /etc/mail/relay-domains and that /etc/mail/local-host-names contains a list of all the hostnames your machine is identified as when working either in a masqueraded domain and a non-masqueraded domain.

    Oh well, you fixed it now with Postfix, so it's no big deal.

    As far as the dovecot issue goes, shouldn't the line in question read something like:

    Code:
    auth_userdb = passwd
    Linux user #126863 - see http://linuxcounter.net/

  9. #8
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79
    Nope

    even
    Code:
    auth_userdb = passwd
    dovecot woun't start. The same error pops up.

    I have no idea what could be wrong.

    Thanks Roxoff for your help, I'm going to try to setup Sendmail when I have time.

  10. #9
    Just Joined!
    Join Date
    Apr 2006
    Location
    Slovenia
    Posts
    79
    Success again!

    all I had to do is to coment the lines with userdb and passdb. And Dovecot started right up. And Squirllmail also works fine but I'm not sure on how to set up Squrillmail or things so that when I use Squirl mail I can send my emails from something like this
    name@domain1
    name.surname@domain1
    name@domain2
    name.surname@domain2
    and so on

    But have absolutly no idea how to do this. On MS Exchange it was very simple and on Kario MailServer even simpler. But Fedora, Postfix, Dovecot and Squirllmaial ..... I need some help.

    Any ideas anyone?

    Thanks for all the help.

  11. #10
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,906
    Quote Originally Posted by Self-Defence
    Success again!

    all I had to do is to coment the lines with userdb and passdb. And Dovecot started right up. And Squirllmail also works fine but I'm not sure on how to set up Squrillmail or things so that when I use Squirl mail I can send my emails from something like this
    name@domain1
    name.surname@domain1
    name@domain2
    name.surname@domain2
    and so on

    But have absolutly no idea how to do this. On MS Exchange it was very simple and on Kario MailServer even simpler. But Fedora, Postfix, Dovecot and Squirllmaial ..... I need some help.

    Any ideas anyone?

    Thanks for all the help.
    Well, changing the reply-to address inside squirrelmail is easy - just select 'Options' at the top of the page. Making that address work is another matter.

    In Sendmail, you'd edit the /etc/mail/aliases file and add any aliases you like for your regular users, then run 'newaliases'. I've got no idea how to do this with Postfix.

    Good luck!
    Linux user #126863 - see http://linuxcounter.net/

Page 1 of 2 1 2 LastLast

Posting Permissions

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