You are not logged in.

#1 2010-01-10 13:46:36

karlis
Member
Registered: 2010-01-10
Posts: 25

Please help with mail server choice and setup

Hello dear arch users, for begining i`ll start with litle intro what i know, and what i dont understand, so it would be easyer to help solve my problem, thanks for reading this.

I've been using arch for some time (few months) but i still dont know very much about it..
I have successfully installed lighttpd+php (fcgi)+mysql+phpmyadmin, ssh and mc allso of cource, serveral times, so i know how to solve little problems smile

I need everything lightweight because my arch's box is not so fresh as i could want

p2 350mhz CPU
192mb of RAM
8Gb HDD
10Mbit internet connection

whole project is for personal use only, and it will not even reach 10 user limit (me and some friends are using this..)

Now i`m willing to install mail server with some webmail ( i dont like outlook express thunderbird and other clients, only web acces)

I have googled for tutorials for 2 days now, just looking for best thing for newbie like me, with little knowlage of linux.

SquirrelMail or RoundCube wich one is bether ? I like RoundCube because it has nicer web design, but is it bether that SquirrelMail ?

Postfix and Dovecot are they enough good, or is there anything bether ?

Spamassasin and Graylistening will this work, or i`ll need something stronger?

Did i miss anything ?

I just want to say thanks for reading this, and helping me out. Thanks!

ps will this be good enough tutorial to follow ? http://www.hypexr.org/linux_mail_server.php


Karlis.

Last edited by karlis (2010-01-10 13:49:14)

Offline

#2 2010-01-11 03:29:27

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: Please help with mail server choice and setup

I have postfix/dovecot/squirrelmail, and I'm happy with it.  Squirrelmail gets slagged on a lot on these forums, but I don't know why.  It's easy to configure, has good support, and is highly customizable.

The tutorial you mention is good, but I'll bet you'll have to consult more sources to answer all your questions.  I've set up three mail servers, and I've yet to find a single source that contained all the information I needed to get them configured properly. 

If you use dovecot as your IMAP server, instead of courier-IMAP which the tutorial uses, you won't have to install cyrus-sasl, since dovecot provides a version of SASL that you can configure postfix to use.

Jay

Offline

#3 2010-01-11 06:08:51

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

Hi, thanks for replay.

Well i installet postfix/dovecot/roundcube yesterday, everything seems to be ok except 1 error what i get from roundcube

Check configured database settings
DSN (write):  NOT OK(MDB2 Error: no such database)

Make sure that the configured database exists and that the user has write privileges
DSN: mysql://roundcube:passwd@localhost/roundcubemail

i googled a bit,but didnt understand what realy i have to do.. configure or install MDB2_Driver_mysql o.O

in my apinion why SM gets slagged is because its ugly simple, and roundcube is with round corners, peoples like nice web interfaces, not terminal windos (i mean normal people who just browse, not like us who like to create servers and services smile )

Thanks for replay again.
Karlis

Last edited by karlis (2010-01-11 07:41:45)

Offline

#4 2010-01-11 19:16:07

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

A little update

it seems that i have successfully installed postfix dovecot spamassassin roundcube, all works fine, ofcourse except one thing - i cant login into mail, i just dont get how to add new users

i have googled that after successfull login into imap (dovecot) it creates new virtual user, so this means that i need to create new dovecot user, in order to create new email user ?

Thanks for viewing!
Karlis.

Offline

#5 2010-01-11 20:44:28

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Please help with mail server choice and setup

IIRC you could change the dovecot settings to use the users of the host.

The system that we're using has LDAP-accounts for all users and dovecot is setup to authenticate users against the LDAP-dir. No need to make specific dovecot-users...

Offline

#6 2010-01-12 06:48:52

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

hmm if its so then i closely followed manual (posted previously)  and all configs should be ok.. so how can i add new users ? just try to login with not existing user, and it will be registred automaticaly?

Offline

#7 2010-01-12 09:24:19

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: Please help with mail server choice and setup

karlis wrote:

hmm if its so then i closely followed manual (posted previously)  and all configs should be ok.. so how can i add new users ? just try to login with not existing user, and it will be registred automaticaly?

If your intended email user already has an account on the linux machine hosting the mail server, then he automatically has rights to email services on that server.  He should be able to log into web mail using his linux username and password. 

If your intended email user does not have an account on the machine hosting the mail server, and you want him to have email privileges, but no other access to the machine (including his home directory), then you must set him up with an email-only account, using the following command:

# useradd -s /sbin/nologin <username>

Jay

Last edited by jt512 (2010-01-12 09:25:38)

Offline

#8 2010-01-12 09:51:49

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

so basicly this means that i can login into mail with any of my linux user account right? if its so why i cannot login ?

i have created 1 user with nologin feature (folowed tutorial) and i cant login either

i`m pretty deprest, why everything works, but in the same time nothing works as it should sad

Offline

#9 2010-01-12 10:15:24

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: Please help with mail server choice and setup

Depressed?  It took me almost a month to configure my first mail server (of course, that was sendmail). 

If I were you I'd forget about web mail for the moment.  That's just adding another link to the chain that could be misconfigured.  Make sure that postfix can send and receive mail on the local machine.  Then, add in your IMAP server, and see if you can download mail to a networked machine using an ordinary mail client, like Alpine, Thunderbird, etc.  Then, finally, test your web mail program.

Then, when you've finally got all that worked out, add in SASL for secure authentication, and SSL over your web server so that you're not transmitting your username and password in the clear.

Jay

Offline

#10 2010-01-12 14:56:35

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

Yeap i`m little depressed, because its like third attempt to create mail server  in last year (first 2 failed) and i dont want to quit now..

Now i know that i have some problems with postfix..

following comes from local ISP's page smtp port scaner or something like that

<IP> 220 <domain> ESMTP
<IP> requires HELO: NO
<IP> allows VRFY username verification: NO
<IP> allows EXPN forwarding expansion: NO
<IP> allows bogus From: header: YES
<IP> allows mail relaying: NO
<IP> can mail to postmaster: NO
<IP> can mail to webmaster: NO
<IP> can mail to abuse: NO
<IP> - 8 seconds

for me it seems to work, but i cannot recive any mail, am i right ?

in /etc/postfix/aliasses webmaster, abuse, postmaster are configured to root, and root to existing user - admin
so all stuff would go to admin@<domain>
and in /etc/postfix/virtual there are there records

    /etc/postfix/virtual:
    <domain>     anything (right-hand content does not matter)
        postmaster@<domain>        postmaster
        admin@<domain>            admin
#      user2@virtual-alias.domain         address2, address3

so wheres the problem ? yes i know using default postfix config is not so smart, because all unnececery stuff is defined, and its posible to cut it down to minimal, but when i tryd that got bunch of errors, and postfix didnt start at all

i beleave if i fix postfix problems, it whould be done, ofcourse if my dovecot is configured corectly, and i`m starting to doubt that sad

Any suggestions?

Karlis

Offline

#11 2010-01-12 18:13:57

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

Little update again...

i installed postfix admin, and it seems that postfix works fine, i can send emails (not only local)

BUT there allways is some BUT.. i still cant login via roundcube with the same logins, who work for postfix admin, i supose db's aint the same smile

so its still only roundcube config that is dead or dovecot allso ?

Offline

#12 2010-01-13 07:30:18

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

hmm it seems like my smapd does not start on 10030 port but on 783, i`m trying to find a solution, but untillnow unsuccessfull

how can i change port from 783 to 10030 ?

Offline

#13 2010-01-13 13:05:31

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

Hmm so fat it seems that dovecot and postfix are working just fine, without any problems.. but roundcube is complaining about ssl conection

IMAP Error: Authentication for admin@<domain> failed (LOGIN): "a001 NO [CLIENTBUG] Plaintext authentication disallowed on non-secure (SSL/TLS) connections."

dovecot.conf
ssl = yes
#ssl_listen

in roundcube config file smtp_user / smtp_pass are empty tried postfix but  without any effect..

Sorry for spam like posting, i realy need to get it working

Offline

#14 2010-01-13 17:25:33

jt512
Member
Registered: 2009-02-19
Posts: 262

Re: Please help with mail server choice and setup

It looks like you don't have SSL working on your server.  Have you generated the SSL certificate and private key for dovecot yet?  Have you read the (excellent) documentation on the dovecot website?  Have you read the comments in the dovecot configuration file?

You can test whether SSL/TLS is working on your server using telnet from your server, as follows:
$ telnet localhost 25
EHLO test.com

If TLS/SSL is working the response will look roughly like this:
250-yourhost.yourdomain.org
250-PIPELINING
250-SIZE 40960000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Note the STARTTLS line.

Jay

Last edited by jt512 (2010-01-13 17:28:03)

Offline

#15 2010-01-13 17:59:59

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

Hi, thanks for response
SSL certificate is generated ... ok so it wont be so hard to help here are my configs

main.cf

# Paths
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
# Domain settings
myhostname = <mydomain>
myorigin = <mydomain>
mydestination = $myhostname, localhost.$mydomain, localhost
# SMTP settings
smtpd_tls_cert_file=/etc/ssl/certs/mail.crt
smtpd_tls_key_file=/etc/ssl/private/mail.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
smtpd_tls_loglevel = 1
smtpd_sasl_auth_enable = yes
smtp_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,
                               permit_mynetworks,
                               reject_unauth_destination,
                               check_policy_service inet:127.0.0.1:10030
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_sasl_security_options = noanonymous
# SASL
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client
# Email and mailbox settings
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps
home_mailbox = Maildir/
virtual_alias_domains = <mydomain>
virtual_alias_maps = hash:/etc/postfix/virtual
mailbox_size_limit = 0

dovecot.conf

protocols = imap imaps
disable_plaintext_auth = yes
log_timestamp = "%b %d %H:%M:%S "
ssl = yes
ssl_cert_file = /etc/ssl/certs/mail.crt
ssl_key_file = /etc/ssl/private/mail.key
mail_access_groups = mail
  mechanisms = plain login
 socket listen {
    client {  
      path = /var/run/dovecot/auth-client
      mode = 0660
    user = postfix
    group = postfix
    }
  }
}

here are some of my config uncommented part, if its nececery i can zip and upload bouth configs to be 100% clear wheres the problem..

Karlis

Last edited by karlis (2010-01-13 18:02:23)

Offline

#16 2010-01-14 08:21:35

karlis
Member
Registered: 2010-01-10
Posts: 25

Re: Please help with mail server choice and setup

so i think i have managed my ssl / tls problem partly.. my roundcube's lates error is

IMAP Error: Authentication for admin@<mydomain> failed (LOGIN): "a001 NO [AUTHENTICATIONFAILED] Authentication failed."

roundcubes config

$rcmail_config['auto_create_user'] = TRUE;
$rcmail_config['default_host'] = 'tls://<mydomain>:143';
$rcmail_config['default_port'] = 143;
$rcmail_config['virtuser_file'] = '/etc/postfix/virtual';
$rcmail_config['virtuser_query'] = '';
$rcmail_config['smtp_port'] = 25;
$rcmail_config['smtp_user'] = '';
$rcmail_config['smtp_pass'] = '';
$rcmail_config['smtp_auth_type'] = '';
$rcmail_config['session_domain'] = '';

how can i force roundcube to use ssl/tls?

Last edited by karlis (2010-01-14 10:01:17)

Offline

Board footer

Powered by FluxBB