Current time: 04-19-2024, 09:07 PM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Replace courier with dovecot
Author Message
dexter1983 Offline
Newbie
*

Posts: 8
Joined: Jan 2010
Reputation: 0
Post: #21
RE: [HowTo] Replace courier with dovecot
Slly me I've edit wrong dovecot.conf
I paste 2 times the same content Big Grin
It is ok now.
But know I've had another dilema: enable ssl for dovecot:

#ssl_cert_file = /etc/ssl/certs/servername.crt
#ssl_key_file = /etc/ssl/certs/servername.key

Uncoment these lines, but where is it servername.crt and .key
I execute:
openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/dovecot.pem -keyout /etc/ssl/private/dovecot.pem
02-18-2010 08:01 AM
Find all posts by this user Quote this message in a reply
Presssack Offline
Junior Member
*

Posts: 14
Joined: Oct 2009
Reputation: 0
Post: #22
RE: [HowTo] Replace courier with dovecot
You got ot selfsign a certificate. The two lines are just examples.

Try this here: http://sial.org/howto/openssl/self-signed/
or have a general look here:
http://www.google.com/search?hl=de&safe=...=&aq=f&oq=

Cheers
Presssack
02-18-2010 08:05 AM
Find all posts by this user Quote this message in a reply
dexter1983 Offline
Newbie
*

Posts: 8
Joined: Jan 2010
Reputation: 0
Post: #23
RE: [HowTo] Replace courier with dovecot
I follow these tutorial
http://www.isp-control.net/documentation..._made_easy
But I failed, I am noob
instead $SERVER_NAME I've used $srv.domain,tld, because that is my host name of my server
02-18-2010 08:44 AM
Find all posts by this user Quote this message in a reply
Presssack Offline
Junior Member
*

Posts: 14
Joined: Oct 2009
Reputation: 0
Post: #24
RE: [HowTo] Replace courier with dovecot
No you cant use this $srv.domain,tld variable, this one is not global/enviromental its only working within one config File or Script.
You really got to replace the $SERVER_NAME by the value your Serverdomain is.
Or set the variable like its shown in the first line: SERVER_NAME=your_host_name

Cheers
Presssack
02-18-2010 10:12 AM
Find all posts by this user Quote this message in a reply
dexter1983 Offline
Newbie
*

Posts: 8
Joined: Jan 2010
Reputation: 0
Post: #25
RE: [HowTo] Replace courier with dovecot
It worked! Thanq verry much for your advice.
But now I have another problem: I can't login to default webmail interface
ERROR: Connection dropped by IMAP serverssl it is enable on postfix and dovecot using the same cert.
I have install roundcube.
My map server doesn't working?
system ports:
server ip (Port 143) IMAP UP
server ip (Port 993) IMAP-SSL UP
(This post was last modified: 02-18-2010 11:08 AM by dexter1983.)
02-18-2010 11:04 AM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #26
RE: [HowTo] Replace courier with dovecot
(02-18-2010 11:04 AM)dexter1983 Wrote:  It worked! Thanq verry much for your advice.
But now I have another problem: I can't login to default webmail interface
ERROR: Connection dropped by IMAP serverssl it is enable on postfix and dovecot using the same cert.
I have install roundcube.
My map server doesn't working?
system ports:
server ip (Port 143) IMAP UP
server ip (Port 993) IMAP-SSL UP

You can use the same cert for both services, for what's missing on your config, just look at /var/log/mail.log or /var/log/mail.err, usually dovecot logs are really useful to catch problems.
02-18-2010 06:16 PM
Find all posts by this user Quote this message in a reply
dexter1983 Offline
Newbie
*

Posts: 8
Joined: Jan 2010
Reputation: 0
Post: #27
Exclamation RE: [HowTo] Replace courier with dovecot
This appear on /var/log/mail.log

Feb 18 02:22:26 web postfix/trivial-rewrite[2885]: warning: do not list domain domain.tld in BOTH mydestination and virtual_mailbox_domains

Feb 18 03:10:34 web postfix/smtpd[2489]: SSL_accept:before/accept initialization
Feb 18 03:10:34 web postfix/smtpd[2489]: SSL_accept error from srv.domain.tld[xxx.xxx.xxx.xxx]: -1
Feb 18 03:10:34 web postfix/smtpd[2489]: lost connection after CONNECT from srv.domain.tld[xxx.xxx.xxx.xxx]
Feb 18 03:10:34 web postfix/smtpd[2489]: disconnect from srv.domain.tld[xxx.xxx.xxx.xxx]
Feb 18 03:10:34 web postfix/smtpd[2488]: connect from srv.domain.tld[xxx.xxx.xxx.xxx]
Feb 18 03:10:34 web postfix/smtpd[2488]: lost connection after CONNECT from srv.domain.tld[xxx.xxx.xxx.xxx]
Feb 18 03:10:34 web postfix/smtpd[2488]: disconnect from srv.domain.tld[xxx.xxx.xxx.xxx]
Feb 18 03:11:11 web dovecot: auth-worker(default): sql(office@domain.tld,127.0.0.1): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(mail_type='normal_mail' OR mail_type='normal_mail,normal_forward')' at line 1
Feb 18 03:11:11 web dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Feb 18 03:11:11 web dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Feb 18 03:11:11 web dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Feb 18 03:11:11 web dovecot: imap-login: Internal login failure: user=<office@hitech-it.ro>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Feb 18 03:15:26 web dovecot: imap-login: Disconnected: rip=xxx.xxxx.xxx.xxx, lip=xxx.xxx.xxx.xxx, TLS handshake
Feb 18 03:17:22 web dovecot: pop3-login: Disconnected: rip=xxx.xxx.xxx.xxx, lip=xxx.xxx.xxx.xxx, TLS handshake
Feb 18 03:18:28 web postgrey[2183]: 2010/02/18-03:18:28 Server closing!
Feb 18 03:18:28 web postgrey[2183]: Couldn't unlink "/var/run/postgrey.pid" [Permission denied]
Feb 18 03:18:28 web postfix/master[2245]: terminating on signal 15
Feb 18 03:18:32 web postfix/policyd-weight[2149]: cache killed
Feb 18 03:18:32 web postfix/policyd-weight[2148]: master: child 2149 exited
Feb 18 03:18:32 web postfix/policyd-weight[2487]: warning: Got SIGPIPE. Child 2487 terminated.
Feb 18 03:18:32 web postfix/policyd-weight[2487]: warning: child: err: Died at /usr/sbin/policyd-weight line 1311.#012
Feb 18 03:18:32 web postfix/policyd-weight[2487]: warning: Got SIGPIPE. Child 2487 terminated.
Feb 18 03:18:32 web dovecot: Killed with signal 15
Feb 18 10:32:32 web postfix/policyd-weight[2153]: policyd-weight 0.1.14 beta-17 started and daemonized. conf:default settings; GID:109 109 EGID:109 109 UID:107 EUID:107; taint mode: 0
Feb 18 10:32:32 web postfix/policyd-weight[2153]: warning: cache_query: $csock couln't be created: connect: No such file or directory, calling spawn_cache()
Feb 18 10:32:32 web postfix/policyd-weight[2154]: cache spawned
Feb 18 10:32:33 web postgrey[2188]: Process Backgrounded
Feb 18 10:32:33 web postgrey[2188]: 2010/02/18-10:32:33 postgrey (type Net::Server::Multiplex) starting! pid(2188)
Feb 18 10:32:33 web postgrey[2188]: Binding to TCP port 60000 on host 127.0.0.1#012
Feb 18 10:32:33 web postgrey[2188]: Setting gid to "110 110"
Feb 18 10:32:33 web postgrey[2188]: Setting uid to "108"
Feb 18 10:32:34 web postfix/master[2250]: daemon started -- version 2.5.5, configuration /etc/postfix
Feb 18 10:32:35 web dovecot: Dovecot v1.0.15 starting up
Feb 18 10:32:35 web dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Feb 18 10:32:35 web dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)
Feb 18 10:32:35 web dovecot: auth-worker(default): mysql: Connected to localhost (ispcp)

Of corse domain.tld replace with my real domain Big Grin
This is in .var.log/mail.err

Feb 18 02:29:14 web dovecot: imap-login: No authentication sockets found
Feb 18 02:29:14 web dovecot: child 2840 (login) returned error 89
Feb 18 02:32:59 web dovecot: auth-worker(default): sql(admin@domain.tld,127.0.0.1): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(mail_type='normal_mail' OR mail_type='normal_mail,normal_forward')' at line 1
Feb 18 03:03:05 web dovecot: auth-worker(default): sql(admin@domain.tld,127.0.0.1): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(mail_type='normal_mail' OR mail_type='normal_mail,normal_forward')' at line 1
(This post was last modified: 02-18-2010 07:08 PM by dexter1983.)
02-18-2010 06:59 PM
Find all posts by this user Quote this message in a reply
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #28
RE: [HowTo] Replace courier with dovecot
(02-18-2010 06:59 PM)dexter1983 Wrote:  This appear on /var/log/mail.log

Feb 18 02:22:26 web postfix/trivial-rewrite[2885]: warning: do not list domain domain.tld in BOTH mydestination and virtual_mailbox_domains
You should also fix this. It should be:
Code:
mydestination                = $myhostname, $mydomain
Where
Code:
myhostname                   = "your hostname here"
mydomain                     = "your hostname here".local
...
virtual_mailbox_domains      = hash:/etc/postfix/ispcp/domains

Quote:Feb 18 03:11:11 web dovecot: auth-worker(default): sql(office@domain.tld,127.0.0.1): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(mail_type='normal_mail' OR mail_type='normal_mail,normal_forward')' at line 1
Do you have in /etc/dovecot/dovecot-sql-domain.conf this query? Some time ago there was a mistake in the wiki and we where not checking properly the domain.
Code:
user_query = SELECT concat('/var/mail/virtual/', domain.domain_name, '/',mail_acc) as home, '1001' as uid, '8' as gid FROM mail_users inner join domain on mail_users.domain_id = domain.domain_id WHERE mail_acc='%n' and domain.domain_name='%d' and (mail_type='normal_mail' OR mail_type='normal_mail,normal_forward');



Also there's something wrong with postgrey:
Quote:Feb 18 03:18:28 web postgrey[2183]: 2010/02/18-03:18:28 Server closing!
Feb 18 03:18:28 web postgrey[2183]: Couldn't unlink "/var/run/postgrey.pid" [Permission denied]
Feb 18 03:18:28 web postfix/master[2245]: terminating on signal 15
Feb 18 03:18:32 web postfix/policyd-weight[2149]: cache killed
Feb 18 03:18:32 web postfix/policyd-weight[2148]: master: child 2149 exited
Feb 18 03:18:32 web postfix/policyd-weight[2487]: warning: Got SIGPIPE. Child 2487 terminated.
Feb 18 03:18:32 web postfix/policyd-weight[2487]: warning: child: err: Died at /usr/sbin/policyd-weight line 1311.#012
Feb 18 03:18:32 web postfix/policyd-weight[2487]: warning: Got SIGPIPE. Child 2487 terminated.
Feb 18 03:18:32 web dovecot: Killed with signal 15
Maybe you should bypass it at the moment commeting the line in postfix main.cf.
02-18-2010 07:18 PM
Find all posts by this user Quote this message in a reply
dexter1983 Offline
Newbie
*

Posts: 8
Joined: Jan 2010
Reputation: 0
Post: #29
RE: [HowTo] Replace courier with dovecot
myhostname as srv.domain.tld or just srv , but i think only srv because srv.domain.tld is fqdn
in /etc/postfix/main.cf I don't find any lines with postgrey, maibe because of that ther is a problem with it.
I finaly manage to login with all user in webmail and roundcube, but the messege don't send

This is in mail.log
, relay=dovecot, delay=0.17, delays=0.05/0.03/0/0.1, dsn=5.3.0, status=bounced (command line usage error. Command output: Fatal: Unknown argument: -s Usage: deliver [-c <config file>] [-d <destination user>] [-m <mailbox>] [-n] [-e] [-f <envelope sender>] )

An send to hotmail and yahoo:

Feb 18 11:40:54 web postfix/smtp[3076]: connect to mx4.hotmail.com[65.55.37.120]:25: Connection timed out
Feb 18 11:41:04 web postfix/smtp[3077]: connect to c.mx.mail.yahoo.com[206.190.54.127]:25: Connection timed out

Maybe to yahoo and hotmail don't work because I have an dynamic ip on wan or maibe because I am behing a nat router?!

I will do post fowarding for mail posts to see if I receive any messages from yahoo.
(This post was last modified: 02-18-2010 07:46 PM by dexter1983.)
02-18-2010 07:25 PM
Find all posts by this user Quote this message in a reply
dexter1983 Offline
Newbie
*

Posts: 8
Joined: Jan 2010
Reputation: 0
Post: #30
At RE: [HowTo] Replace courier with dovecot
I open smtp smtp/s pop3 pop3s imap impas on my frewall
Messaje send succefully but not receiving.
I've try : internal user to internel user
internel to yahoo user
yahoo user to internal users.

O boy Sad It is not easy to setup an mail server.
02-18-2010 08:32 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)