View Full Version : Mail Server Setup With Exim, MySQL, Cyrus-Imapd, Horde Webmail On Centos 5.1 - works?
gsp
10th October 2008, 16:31
Hi there,
i am a linux newbie and trying for some weeks now this 'how to' guide... After many many hours of reading my conclusion is that this guide doesn't work as it is!
I don't know if the problem is that i tried to install on CentOS 5.2 but i found several issues that are not covered in this guide as cyrus admin user, permissions, firewall and SELinux settings that prevent system for normal operation... Now after all this period of format and setup and format and setup again, i have reached the point that even that i have an admin user george@mydomain.com (horde & cyrus), on cyrus saslauthd this user name is not accepted from telnet tests... i thing there is some kind of 'bugs' on the authorization part...
PLEASE if anyone managed to make this work to post some basic details on how i can make this work!!
And for people who write these 'how to's' , please don't think that everything is supposed to be known!
Thanks in advance
topdog
13th October 2008, 12:34
There is no way a howto can cover every aspect needed to configure a system, it is expected that as a user following a howto you are capable of comprehending normal system admin tasks.
That howto in its present form works fully with Centos 5.1 i have a running xen image of it on my dev machine.
gsp
13th October 2008, 13:55
Hi, thanks for the answer. I think that i CAN accomplish normal admin tasks, and i had no bad intentions with my message... Instead i am reading for many hours all these days... Maybe its the wrong OS version (minor differences?)... But i am searching for CentOS 5.1 and its nowhere... only 5.2... is there any links that i can download this image?
Thanks..
topdog
13th October 2008, 14:47
Okay maybe if you state exactly what your problem is then i could help.
gsp
13th October 2008, 19:01
Thanks for your willing to help!..
So, after many many re-installs and re-configurations i have reached at this point:
-New accounts are created, they are able to send e-mails
-If the administrator user creates a folder there is no-way to delete it afterwards (permission denied)
-Isn't needed to create the cyrus admin user first? Because in config files there is an account cyrus with blank password...and of course imp cannot login..
-Finally there is something with horde's config because when first loading a page not all menus are shown except if i press reload button
When i was installing the packages i noticed some errors on php packets about 'file not found' from tmp directory and something like this but couldn't find any logs for this...
I know there are a lot and various problems, thats why i am wondering if they are due to different version from 5.1 to 5.2...
Thank you for your time:)
topdog
14th October 2008, 10:31
It could be the version difference. The admin user cyrus is just a backup user, the admin user in the mysql database is the user to be used to configure stuff.
Given imp cannot login does it mean users cannot see their mail ? if so does a normal connection on the command line authenticate ?
gsp
14th October 2008, 20:56
I thought also the same about the admin user, but as it seems its not a 'real' admin... he can create folders but he cannot delete them...
Users can login from command line and also they can create their own folders AND delete them after...
I don't know, lot of weird things happening... do you know if i can find any where a 5.1 CentOS isos for download?
Thanks again
topdog
17th October 2008, 19:30
http://mirror.centos.org/centos/
gsp
19th October 2008, 22:18
thanks, but unfortunately this was the place i downloaded my isos.. there are only 5.2 links and not 5.1... :(
topdog
20th October 2008, 08:16
Okay then get them from the vault http://vault.centos.org
gsp
20th October 2008, 14:08
many thanks, i'download them and try again the guide from scratch...
I'let you know for my results!
Cheers
gsp
6th November 2008, 15:31
Hi there. I am back again but disappointed... Installed the 5.1 version and saw no differences at all...
Followed again step by step the guide but nothing worked... I have also noticed the differences in some paths and between configuration files...
I don't want to bother you but please if there are other people who used this guide and made this worked please report here...am i so stupid or what?
Thank you
space007
18th November 2008, 11:30
Hi there. I am back again but disappointed... Installed the 5.1 version and saw no differences at all...
Followed again step by step the guide but nothing worked... I have also noticed the differences in some paths and between configuration files...
I don't want to bother you but please if there are other people who used this guide and made this worked please report here...am i so stupid or what?
Thank you
yeah, same problem :(, I went with using this howto, and found diffrences in the howto and 5.2, my horde was using xml config files, but in the howto is just php code :confused:
Anyway at the end I got stuck at
Create Admin User
* Create a file admin.sql and add the following (modify the password to suite you)
Error
SQL query:
REPLACE INTO horde_users( user_uid, user_pass )
VALUES (
'andrew@home.topdog-software.com', md5( '123456' ) ,
);
MySQL said: Documentation
#1064 - 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 ')' at line 5
# mysql -V
mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (i686) using readline 5.0
.
.
.
after some research:
I was able to create an Administrator with:
-- $Horde: horde/scripts/sql/script.initial_horde_user.sql,v 1.1 2004/09/18 17:20:59 chuck Exp $
--
-- This script will create an initial user in a horde_users table. The
-- password being used is 'admin', which you should change
-- IMMEDIATELY.
INSERT INTO horde_users (user_uid, user_pass) VALUES ('Administrator', '21232f297a57a5a743894a0e4a801fc3');
password was `admin`
after the login I get a blank page ..
anybody ?
gsp
18th November 2008, 20:57
at least i don't feel so stupid... this is a proof that there are many errors in this how to...
To your problem now, i override this problem by removing the comma after the password line... (it waits for another expression).
After this , the script works... but it would be perfect if this was the only problem...
If there is any volunteer out there who made it to work may be he would like to suggest any corrections... :o
Thanks
topdog
19th November 2008, 08:36
Guys that howto was written 6 months ago using it now YMMV, just like the other poster stated certain things have changed. The sql error should be fairly simple to fix that is just a typo all u need do is remove the comma.
space007
19th November 2008, 10:32
Lets be positive, finding this kind of typos even errors, is beneficial for all of us. As I used this HowTo on CentOs 5.2 with current version of available software updating the HowTo will be a peace of cake :)
ITS FIXED, repeat, I , yes yes, I made a typo in horde/imp/config/server.php, there was one <?php to many. Found it out from the web server logs. I can now login to horde.
Now my final step is to get external pop3 accounts to the virtual users mailbox. I thought of using fetchmail, will look into it.
If anybody has an idea, I am open for suggestions.
rgrds,
S.
topdog
19th November 2008, 10:48
Horde allows you to do that, u can fetchmail from other accounts, check the settings i have not used it myself though.
space007
19th November 2008, 12:21
1. After login in to horde (which takes a bit longer, guess is trying to access imap) I got the left menubar, in the center another login screen where is "Login failed"
horde log:
Nov 19 11:18:32 HORDE [error] [imp] FAILED LOGIN 10.0.0.1 to localhost:143[imap/notls] as Administrator [on line 258 of "/usr/share/horde/imp/lib/Auth/imp.php"]
2 And I just found out that I need also a pop3 server on this box :(
no idea what to do now :eek:
Any idea how can I integrate a pop3 in this setup ?
space007
19th November 2008, 14:10
2 And I just found out that I need also a pop3 server on this box :(
no idea what to do now :eek:
Any idea how can I integrate a pop3 in this setup ?
this is because in cyrus from the start I commented out pop3 :P
and the applicationt is on pop3 port...
I still got auth failed
maillog:
Nov 19 12:58:52 server pop3[13812]: badlogin: server [10.0.0.1] plaintext administrator SASL(-13): authentication failure: checkpass failed
messages:
Nov 19 12:58:52 server pop3[13875]: auxpropfunc error no mechanism available
Nov 19 12:58:52 server saslauthd[13876]: do_auth : auth failure: [user=administrator] [service=pop] [realm=] [mech=pam] [reason=PAM auth error]
# /etc/init.d/saslauthd status
saslauthd (pid 13447) is running...
# /etc/init.d/cyrus-imapd status
cyrus-master (pid 10765) is running...
# lsof -i | grep cyrus
cyrus-mas 10765 cyrus 7u IPv6 43998 TCP *:imap (LISTEN)
cyrus-mas 10765 cyrus 10u IPv4 44000 TCP *:imap (LISTEN)
cyrus-mas 10765 cyrus 13u IPv6 44005 TCP *:pop3 (LISTEN)
cyrus-mas 10765 cyrus 16u IPv4 44007 TCP *:pop3 (LISTEN)
cyrus-mas 10765 cyrus 19u IPv4 44011 TCP localhost.localdomain:sieve (LISTEN)
imapd 10772 cyrus 4u IPv6 43998 TCP *:imap (LISTEN)
pop3d 10773 cyrus 4u IPv6 44005 TCP *:pop3 (LISTEN)
imapd 13858 cyrus 4u IPv4 44000 TCP *:imap (LISTEN)
pop3d 13875 cyrus 4u IPv4 44007 TCP *:pop3 (LISTEN)
imapd 14088 cyrus 4u IPv4 44000 TCP *:imap (LISTEN)
topdog
19th November 2008, 14:15
Are u not using the full email address for logon ? As sasl is seeing only the user part.
topdog
19th November 2008, 14:19
Sorry about my above post. I think the login fails because u are trying to login using administrator instead of Administrator which u configured in the post prior to this one.
space007
19th November 2008, 14:43
Are u not using the full email address for logon ? As sasl is seeing only the user part.
I edited the sql table to rename the user (horde table "horde_users" ), still the same thing
messages:
Nov 19 13:18:54 server imap[14538]: sql_select option missing
Nov 19 13:18:54 server imap[14538]: auxpropfunc error no mechanism available
saslauthd[14539]: do_auth : auth failure: [user=user@domain.com] [service=imap] [realm=domain.com] [mech=pam] [reason=PAM auth error]
repeated 6 times
topdog
19th November 2008, 14:56
can you add debug to you /etc/pam.d/imap file and they tell me what u see in /var/log/secure
gsp
19th November 2008, 17:00
Horde cannot login into cyrus because in config file the user is cyrus with blank password. System doesn't allow cyrus user with blank password. If i replace this with a real password login works and seems to work through IMAP.
My problems are mostly related with php and also i get some errors when i install packages of pearl/php about some files in tmp directory ( i never found any logs about it..)
So i get several errors between modules... One time i almost managed to make this work but virtual folders were already f***d up and couldn't create any users...
Also some errors occur in apache configuration especially in secure connections related to the hostname of the machine...
All this combination (how to) works but it needs a GOOD updated and some details that are not included.
And finally, topdog, we don't blame you.. We thank you for your work, BUT i call for help if anyone has made this to work, to post the updated info so other people can also make this how to to work :)
Cheers
topdog
19th November 2008, 17:37
Horde cannot login into cyrus because in config file the user is cyrus with blank password. System doesn't allow cyrus user with blank password. If i replace this with a real password login works and seems to work through IMAP.
The should not be neccessary if you have set the admins to a user who is in the db and has a password, you need to use that user not the cyrus user.
My problems are mostly related with php and also i get some errors when i install packages of pearl/php about some files in tmp directory ( i never found any logs about it..)
Just pinpoint what u are facing and i will help.
All this combination (how to) works but it needs a GOOD updated and some details that are not included.
And finally, topdog, we don't blame you.. We thank you for your work, BUT i call for help if anyone has made this to work, to post the updated info so other people can also make this how to to work :)
Cheers
I will try to redo it on 5.2 and post an update, i just relaxing abit at the moment after doing a maration CCSP certification program which i finished last friday. I will try and work on this next weekend.
gsp
19th November 2008, 19:20
Hi again, i mean the admin login to cyrus which horde uses from imap module (imp servers section) probably for reading virtual folders(?)... this operation works ONLY if i set a cyrus user password (from the system) and set the same in the config file..
Otherwise IMP never logins...
To make an update would be very kind of you... also i will come back with a list with specific problems because at this moment i have formatted this machine for another one time!!
Thank you
topdog
19th November 2008, 19:40
actually the login you use to login to horde is what is passed on to imp then on to the imap server. The virtual folders are just a software implementation in horde and not stored on the imap server
If the login fails it means there is an underlying problem with your authentication which u need to test using
testsaslauthd -u user@domain -p <password> -s imap
gsp
20th November 2008, 09:08
OK, but then what is the use of servers config file of IMP? When i fixed this password issue then i was able to login with any existed user in the system...
I noticed some 'malfunction' in the way that the system registered new users...
Also i couldn't understand if there is a relation between horde admin user and cyrus because if i logged in as Administrator in horde i had no admin rights to delete folders in cyrus for instance...
Any way, these are various problem which i remember from the many many installs i had done.. so don't bother to solve them because maybe i don't remember well.. As soon as i get more time in my work because we changing some systems now, i will install CentOS 5.2 again and start over.. Then i'll start to post SPECIFIC problems and maybe i'll get to success!
Thanks for your valuable help!
P.S. I think that its not important the way that someone installs CentosOS? I mean with graphic desktop, or server environment or any other packages? Either way according to how to we install all necessary things afterward right?
P.S.2. One last thing which made me confused... the host name of the machine during installation should be mailserver.domain.com or just mailserver ? Because i think this is important for apache setup ?
topdog
20th November 2008, 09:24
OK, but then what is the use of servers config file of IMP? When i fixed this password issue then i was able to login with any existed user in the system...
It tells imp which server to connect to.
I noticed some 'malfunction' in the way that the system registered new users...
Also i couldn't understand if there is a relation between horde admin user and cyrus because if i logged in as Administrator in horde i had no admin rights to delete folders in cyrus for instance...
The horde admin user should be a cyrus admin user, As per deleting of folders that is the default cyrus behavior, the acl's applied to the folders do not allow for deleting by default you need to set the acl to allow deleting before you can do it.
http://cyrusimap.web.cmu.edu/twiki/bin/view/Cyrus/DeleteMailboxPermissions
P.S.2. One last thing which made me confused... the host name of the machine during installation should be mailserver.domain.com or just mailserver ? Because i think this is important for apache setup ?
That should not really affect apache as with virtual hosting the page that is served is dependent on what the client sends in the HOST field of the HTTP/1.1 headers.
space007
20th November 2008, 10:11
First, Topdog many thanks, you are very helpful
can you add debug to you /etc/pam.d/imap file and they tell me what u see in /var/log/secure
That give an idea, to double check /etc/pam modifications related to imap, there was a typo in the DB pwd..
1. Horde Login
a) First login success
got the horde menu on the left, auth failed in the center
b) re-login got access
FYI:
# testsaslauthd -u user@domain.com -p pwd123
0: OK "Success."
2. Kmail (on the local box), added IMAP & pop3
a) Imap connected
var log maillog
imap[9707]: accepted connection
master[9726]: about to exec /usr/lib/cyrus-imapd/imapd
imap[9726]: executed
imap[9707]: login: server [10.0.0.1] user@domain.com plaintext User
IMAP does not have default folders in Kmail, when I try to subscribe it crashes it
b) Pop3 AUTH failed
messages:
pop3[9733]: sql_select option missing
pop3[9733]: auxpropfunc error no mechanism available
var log maillog
pop3[9708]: accepted connection
master[9733]: about to exec /usr/lib/cyrus-imapd/pop3d
pop3[9708]: badlogin: server [10.0.0.1] plaintext user@domain.com invalid user
pop3[9733]: executed
master[9688]: process 9708 exited, status 0
3. Deliver mail to a smarthost with and without auth :)
4. Somebody mentioned that horde can fetch external pop3, but as Horde is not a daemon, its just triggered when the user logs in (wild guess). So it does ot work for me, I will have some users accessing using IMAP and/or pop3, so I would need something like fetchmail. Will check this after first 3 issues are solved and post back.
P.S. Just to know, got some errors in messages every 5 min. probably when horde and/or Kmail is accessing imap.
imap[9760]: auxpropfunc error no mechanism available
imap[9773]: sql_select option missing
topdog
20th November 2008, 10:51
First, Topdog many thanks, you are very helpful
That give an idea, to double check /etc/pam modifications related to imap, there was a typo in the DB pwd..
You r welcome.
2. Kmail (on the local box), added IMAP & pop3
a) Imap connected
var log maillog
imap[9707]: accepted connection
master[9726]: about to exec /usr/lib/cyrus-imapd/imapd
imap[9726]: executed
imap[9707]: login: server [10.0.0.1] user@domain.com plaintext User
IMAP does not have default folders in Kmail, when I try to subscribe it crashes it
Do u see the folders in webmail ?
b) Pop3 AUTH failed
messages:
pop3[9733]: sql_select option missing
pop3[9733]: auxpropfunc error no mechanism available
var log maillog
pop3[9708]: accepted connection
master[9733]: about to exec /usr/lib/cyrus-imapd/pop3d
pop3[9708]: badlogin: server [10.0.0.1] plaintext user@domain.com invalid user
pop3[9733]: executed
master[9688]: process 9708 exited, status 0
This is because your pop3 is authenticating against the system not against pam_mysql to fix cp /etc/pam.d/imap /etc/pam.d/pop3
3. Deliver mail to a smarthost with and without auth :)
Create this above the dnslookup router
smarthost:
driver = manualroute
transport = remote_smtp
route_list = * mail.smarthost.name
4. Somebody mentioned that horde can fetch external pop3, but as Horde is not a daemon, its just triggered when the user logs in (wild guess). So it does ot work for me, I will have some users accessing using IMAP and/or pop3, so I would need something like fetchmail. Will check this after first 3 issues are solved and post back.
Yes its not a daemon so the mail will only be fetched while the user is logged in.
P.S. Just to know, got some errors in messages every 5 min. probably when horde and/or Kmail is accessing imap.
imap[9760]: auxpropfunc error no mechanism available
imap[9773]: sql_select option missing
This is not an error related to horde, it is due to the sql plugin of saslauthd to fix it look at this http://www.cyberciti.biz/faq/postfix-sql_select-option-missing-auxpropfunc-error/
space007
20th November 2008, 14:44
You r welcome.
Do u see the folders in webmail ?
No. In Mail, there is just: Filters, New Message, Search
This is because your pop3 is authenticating against the system not against pam_mysql to fix cp /etc/pam.d/imap /etc/pam.d/pop3
I got pop, put placed also pop3
# cp /etc/pam.d/imap /etc/pam.d/pop
cp: overwrite `/etc/pam.d/pop'? y
# cp /etc/pam.d/imap /etc/pam.d/sieve
cp: overwrite `/etc/pam.d/sieve'? y
# cp /etc/pam.d/imap /etc/pam.d/lmtp
cp: overwrite `/etc/pam.d/lmtp'? y
# cp /etc/pam.d/imap /etc/pam.d/csync
cp: overwrite `/etc/pam.d/csync'? y
restarted sasl and exim
still no luck with pop3
Create this above the dnslookup router
smarthost:
driver = manualroute
transport = remote_smtp
route_list = * mail.smarthost.name
Thats cool for smarthost which dont need authentication, any idea if it is required ?
I tried using the one generated on debian:
remote_smtp_smarthost:
driver = manualroute
transport = remote_smtp
hosts_try_auth = <; ${if exists{/etc/exim/passwd.client} \
{\
${lookup{$host}nwildlsearch{/etc/exim/passwd.client}{$host_address}}\
}\
{} \
}
Where passwd.client stands:
# password file used when the local exim is authenticating to a remote
# host as a client.
#
# see exim4_passwd_client(5) for more documentation
#
# Example:
### target.mail.server.example:login:password
mail.server.com:login:pwd
but exim doesnt start, it has a problem with "hosts_try_auth"
Yes its not a daemon so the mail will only be fetched while the user is logged in.
Will check fetchmail then.
This is not an error related to horde, it is due to the sql plugin of saslauthd to fix it look at this http://www.cyberciti.biz/faq/postfix-sql_select-option-missing-auxpropfunc-error/
done, errors gone!!
thanks
topdog
20th November 2008, 15:08
# routers section
smarthost:
driver = manualroute
domains = ! +local_domains
transport = auth_remote
route_list = * smart_host_name
# transports section
auth_remote:
driver = smtp
hosts_require_auth = smart_host_name
# authenticators section
smarthost_remote_login:
driver = plaintext
public_name = LOGIN
client_send = : isp_user_name : isp_password
Use testsaslauthd to debug the pop3 service, as for the folders check the logs to see why the autocreate/autosubscribe options r not working (may be you removed it from the config)
gsp
21st November 2008, 09:07
OK, here i am again, found some little spare time and started over:
CLEAN install CentOS 5.2 , with option Server GUI (and only)
Hostname: mailsrv
- SELinux: Permissive mode (in Enforced mode had many problems with php/apache)
- Started system in GNOME environment and make full yum update...
- Installed firefox, everything is updated and starting step-by-step and copy-paste from how to guide.. (its supposed that all necessary changes are done during transfer of configs(!))
- Configure rpmforge repo -> path not found... should be: http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm (hope its right...the same file..)
Result: Retrieving http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
warning: /var/tmp/rpm-xfer.vVnMD4: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]
- Disable the repo... ** path is wrong, on my CentOS 5.2 path is \etc\yum.repos.d
- Installing apache and php (getting some many uknown errors..!)
Installing: php-pear ####################### [ 1/23]
Installing: php-pear-Net-Socket ####################### [ 2/23]
/tmp/glibctestc17Z8U:1:22: error: features.h: No such file or directory
Installing: php-pear-MDB2 ####################### [ 3/23]
/tmp/glibctestLE1x5J:1:22: error: features.h: No such file or directory
Installing: php-pear-Net-URL ####################### [ 4/23]
/tmp/glibctestRasjeX:1:22: error: features.h: No such file or directory
Installing: php-pear-Auth-SASL ####################### [ 5/23]
/tmp/glibctestMcGIcd:1:22: error: features.h: No such file or directory
Installing: php-pear-Net-SMTP ####################### [ 6/23]
/tmp/glibctestrrD0Jw:1:22: error: features.h: No such file or directory
Installing: php-pear-DB ####################### [ 7/23]
/tmp/glibctestHzrksp:1:22: error: features.h: No such file or directory
Installing: libc-client ####################### [ 8/23]
Installing: libmcrypt ####################### [ 9/23]
Installing: php-pdo ####################### [10/23]
Installing: php-mbstring ####################### [11/23]
Installing: php-pear-Net-Sieve ####################### [12/23]
/tmp/glibctest0T2EYG:1:22: error: features.h: No such file or directory
Installing: php-mcrypt ####################### [13/23]
Installing: php-pear-HTTP-Request ####################### [14/23]
/tmp/glibctestOnqEZA:1:22: error: features.h: No such file or directory
Installing: php-pear-Mail ####################### [15/23]
/tmp/glibctests7qLz6:1:22: error: features.h: No such file or directory
Installing: php-pear-Date ####################### [16/23]
/tmp/glibctestKGLHTA:1:22: error: features.h: No such file or directory
Installing: php-mysql ####################### [17/23]
Installing: php-pecl-Fileinfo ####################### [18/23]
Installing: php-xml ####################### [19/23]
Installing: php-pear-Mail-Mime ####################### [20/23]
/tmp/glibctestdeYm48:1:22: error: features.h: No such file or directory
Installing: php-pear-File ####################### [21/23]
/tmp/glibctestRkGCPV:1:22: error: features.h: No such file or directory
Installing: php-imap ####################### [22/23]
Installing: php-pear-Log ####################### [23/23]
/tmp/glibctestlKZx7w:1:22: error: features.h: No such file or directory
- Install Exim and MySQL ---> ALL succesful
Install rest of packages everything went fine.. no errors... so starting configuration.. :)
gsp
21st November 2008, 12:38
--Apache config...
i wonder.. now in server name.. should be mailsrv or mailsrv.mydomain.com ?
--Exim configured
copied entire config file from how to..
-- Mysql password
/usr/bin/mysqladmin -u root -h your_host_name password 'new-password' -p
this works ONLY if i set as hostname localhost... any other name fails...
--- Creating turba table
file is turba.mysql.sql and not turba_objects.mysql.sql (not existed something like this...)
-- Horde config
NOW.. in horde config file (which already exist) there are some duplicates with the proposed one.. During last installations remember that was serious problems with this... what should i do, just add in the bottom or replace? (think replacement doesn't work..)
-- Continued until cyrus config (imapd.conf)
Inside this file in admins section its only andrew... should be only this? (cyrus, Administrator?)
-- Continued with the rest of configs...
Starting services got this error:
"Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName"
Anyway, continuing the guide, create admin user and trying to login...
Logins with admin user but left tool bar is just a white area... after refreshing the page appears... (always happening..)
As admin created 2 users test1 and test2, when they are logged in no folders appear... only inbox... this problem in previous installs solved with cyrus user password...(only after set a cyrus password imp could see the folders section....this is what i was saying to topdog)
Trying to send a message from test1 to test2 i get an error that Sent Items folder cannot be created... Test1 receives this mail succesfully
So i stop here, wait for any suggestions how to make all this work..
Thank you :) :)
gsp
24th November 2008, 10:55
Ok :D:D:D almost works!! (after some changes i have stated...)
Now i have 1-2 minor problems... One is Spamassassin which seems that only rejects spams without sending them in spam folders.. (thinks user nobody... how to fix this?)
And second one, what would be the best way to backup this system? I think that user folders are not enough...
Thanks in advance
topdog
24th November 2008, 11:07
Now i have 1-2 minor problems... One is Spamassassin which seems that only rejects spams without sending them in spam folders.. (thinks user nobody... how to fix this?)
If you do not want spam to be rejected at smtp time, and delivered to a spam folder then you need to comment out the section in you exim conf file
drop condition = ${if >{$spam_score_int}{60} {1}}
message = Your message scored $spam_score SpamAssassin point. Report follows:\n\
$spam_report
You will also need a sieve rule to file the spam tagged mails into the spam folder.
And second one, what would be the best way to backup this system? I think that user folders are not enough...
Thanks in advance
You need to backup /var/spool/imap, or if you want to go really funky you can setup imap replication to replicate the mail to another imap server.
gsp
24th November 2008, 11:17
SO, if i only comment this rule in exim.conf, spam should come in INBOX marked as spam? (move to spam folders can be done from horde rules...?)
Because i am not familiar with sieve, i don't know how to do this...
Finally, if i backup /var/spool/imap and i have a system crash how i can restore users? In this way i keep only their folders, right? Users are kept in mysql, or not..?
To be more specific, i would like to have the smallest downtime due to a hardware problem... keep an image of the machine, keep config files and have it back in minutes.. but what about user accounts data?
finally, topdog, a BIG THANK YOU!
topdog
24th November 2008, 11:33
SO, if i only comment this rule in exim.conf, spam should come in INBOX marked as spam? (move to spam folders can be done from horde rules...?)
Yes thats right.
Because i am not familiar with sieve, i don't know how to do this...
Its easy to use actually and very powerful, thats one of the reasons for using cyrus. And horde intergrates with sieve quite well so you can create
the rules from with in horde.
Finally, if i backup /var/spool/imap and i have a system crash how i can restore users? In this way i keep only their folders, right? Users are kept in mysql, or not..?
My bad for a full recovery you will have to backup much more.
- The configs in /etc
- The mysql database horde
- The horde system
- The mail folders in /var/spool/mail
To be more specific, i would like to have the smallest downtime due to a hardware problem... keep an image of the machine, keep config files and have it back in minutes.. but what about user accounts data?
Depending on how mission critical your setup is you could run a hot standby machine using cyrus imap replication / mysql replication. (I have a setup like that running a a large cellphone company)
finally, topdog, a BIG THANK YOU!
No problem, hope my xmas present is in the post...... lol just kidding.
gsp
24th November 2008, 12:05
Thanks also for your very quick answers!
I'll try to do these modifications and i hope that i will have finally this system up and running! :)
gsp
24th November 2008, 12:19
Now, trying to change anything at filter rules get this:
"There was an error activating the script. The driver said: Connection refused"
Checked ingo config and config files permissions, but nothing strange there...:confused:
topdog
24th November 2008, 12:22
Now, trying to change anything at filter rules get this:
"There was an error activating the script. The driver said: Connection refused"
Checked ingo config and config files permissions, but nothing strange there...:confused:
Check that timsieved is running and that your configuration is pointing to the local host as well as the pam file is correct.
gsp
24th November 2008, 12:37
Now i am searching for timsieved service.. :D
In the meantime i noticed this error in spamd.log : "Mon Nov 24 12:15:19 2008 [5998] warn: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile //.spamassassin/auto-whitelist.lock.mailsrv.5998 for //.spamassassin/auto-whitelist.lock: No such file or directory"
--Sorry for bothering all the time, but as you can see i have many many minor problems, and just followed the guide with necessary changes...
Also what is your opinion about cyrus user? Only after putting a password for this user imp "saw" the folders of each users... (just wondering...)
topdog
24th November 2008, 12:40
That is because the user nobody who spamd is running as has their home directory set to /, edit /etc/passwd and set the home directory for the user nobody to /tmp
gsp
24th November 2008, 12:55
ok, done.. thanks for this too..
Now for filtering matter, i have localhost.localdomain:sieve listening, also config file of ingo points on port 2000 as says in the how to... am i doing something wrong?
topdog
24th November 2008, 13:01
ok, done.. thanks for this too..
Now for filtering matter, i have localhost.localdomain:sieve listening, also config file of ingo points on port 2000 as says in the how to... am i doing something wrong?
What is in /usr/share/horde/ingo/config/backends.php
gsp
24th November 2008, 13:13
Hm, its a copy-paste from your how to...
I also checked by typing : sieveshell -u test_user -a test_user localhost , which works ONLY if instead of localhost use mailsrv (my hostname) and using any user of the system...
backends.php:
<?php
$backends['sieve'] = array(
'driver' => 'timsieved',
'preferred' => 'localhost',
'hordeauth' => 'full',
'params' => array(
'hostspec' => 'localhost',
'logintype' => 'PLAIN',
'usetls' => true,
'port' => 2000,
'scriptname' => 'ingo',
),
'script' => 'sieve',
'scriptparams' => array()
);
Comparing to the default i am wondering about hordeauth value, and if i include the admin (cyrus) for updating scripts for all users.. (so i don't have anytime to fix the filters for new users for spam...am i right?)
topdog
24th November 2008, 13:18
If sieve shell works then that config should work. If you want to deploy system wide by default then use the default sieve script mechanism within imap.conf
gsp
24th November 2008, 13:40
too bad, still receiving "The driver said: connection refused" error in horde :rolleyes: :rolleyes:
this is what i get in logs... so what is the problem with PLAIN ?
Nov 24 13:37:47 mailsrv master[14824]: about to exec /usr/lib/cyrus-imapd/timsieved
Nov 24 13:37:47 mailsrv sieve[14824]: executed
Nov 24 13:37:47 mailsrv sieve[14824]: accepted connection
Nov 24 13:37:48 mailsrv sieve[14824]: badlogin: localhost.localdomain[::1] PLAIN authentication failure
topdog
24th November 2008, 13:46
Try looking at your logs it could be a missing pear module, if not then it is something to do with your configuration.
gsp
24th November 2008, 14:01
Maybe the errors i got in installation?
Anyway, sorry for bothering you all the time, i'll try to find something...
gsp
26th November 2008, 17:05
OK... ti was the configuration file.. some typo...
One FINAL(hope) question and i will be fine... spamassassin seems now to let the files come into but not mark them as spam so the filters can send them to spam folders...
May be in exim config needs something else except just commenting out this line?
thanks
topdog
27th November 2008, 10:29
OK... ti was the configuration file.. some typo...
One FINAL(hope) question and i will be fine... spamassassin seems now to let the files come into but not mark them as spam so the filters can send them to spam folders...
May be in exim config needs something else except just commenting out this line?
thanks
The tagging of the spam is done by these lines
warn add_header = X-Spam-Score: $spam_score ($spam_bar)\n\
X-Spam-Report: $spam_report
gsp
27th November 2008, 13:05
Unfortunately this setting exists and does nothing...
(testing with : XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X )
Only when i used the system filters section seemed to work...
If this is right, i leave it as it is...
topdog
27th November 2008, 14:12
Post the headers of an email that has gone through the system.
gsp
27th November 2008, 15:17
Here it is...
Content-Type: multipart/related; boundary="----=_NextPart_000_0030_01C9508C.601481D0"
Date: Thu, 27 Nov 2008 12:33:38 +0200 [12:33:38 PM EET]
From: G........ S......... <gsfakian@mydomain.com>
Importance: Normal
MIME-Version: 1.0
Message-ID: <002f01c9507b$9c8bb1d0$c70aa8c0@maris.local>
Received:
* from mailsrv ([unix socket]) by TDS-IMAP/POP3 (Cyrus v2.3.11-Invoca-RPM-2.3.11-3) with LMTPA; Thu, 27 Nov 2008 12:38:08 +0200
* from [217.148.186.10] (helo=mail.eyewideserver.com) by mailsrv with smtp (Exim 4.63) (envelope-from <gsfakian@mydomain.com>) id 1L5eG3-0000Rt-Ca for george@marishotels.eu; Thu, 27 Nov 2008 12:38:08 +0200
* from sync4j ([127.0.0.1]) by mail.eyewideserver.com with hMailServer ; Thu, 27 Nov 2008 11:38:15 +0100
* from sync4j ([87.202.206.18] helo=sync4j) by ASSP.nospam; 27 Nov 2008 11:38:14 +0100
Return-Path: <gsfakian@mydomain.com>
Subject: gokoloko
Thread-Index: AclQe5vBDXhQQYtKSRigj4x10JxSng==
To: george@marishotels.eu
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6838
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Priority: 3 (Normal)
X-Sieve: CMU Sieve 2.3
X-Spam-Flag: YES
X-Spam-Report: Spam detection software, running on the system "mailsrv", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X G......... S.............. IT Department [...] Content analysis details: (1002.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see <http://www.spamcop.net/bl.shtml?87.202.206.18>] 1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email 0.0 HTML_MESSAGE BODY: HTML included in message 0.6 HTML_FONT_FACE_BAD BODY: HTML font face is not a word 0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS -0.2 AWL AWL: From: address is in the auto white-list
X-Spam-Score: 1002.7 (+++++++++++++++++++++++++++++++++++++++++++++++++ ++)
I wonder why in this message in spite that the score is extremely high it was not marked as spam, but came intact in inbox....
topdog
28th November 2008, 10:30
The mail is being tagged it is your filter rule that is not working
X-Spam-Flag: YES
X-Spam-Score: 1002.7 (+++++++++++++++++++++++++++++++++++++++++++++++++ ++)
gsp
28th November 2008, 10:53
Yes but in the subject, shouldn't it add the *SPAM* notice? I have set my rules according to this thought... Where it says to 'mark' in the subject adding the word spam?
thank you
topdog
28th November 2008, 10:59
No that is not what the exim acl does, it just add's those headers your rule must check if X-Spam-Flag = YES
gsp
28th November 2008, 12:51
OK, i've got it.. my fault!!!
Many many thanks... my system is up and running and fully operational.. i also managed to sync with outlook through funambol plugin... now i want to try some blackberry and windows mobile devices and i am super...
I am just wondering about security... if i leave open 80,443,143,110,25 ports only open will i have any potential dangers from hackers with this configuration?
topdog
28th November 2008, 12:59
Of course you have to leave those ports open, because you cannot provide the services without them being open.
port 80 is the most high risk port at the moment due to all kinds of web vulnerabilities, selinux could mitigate some of the attacks that can be launched via the web.
How ever you have to be vigilant and proactive in updating your software.
gsp
3rd December 2008, 11:40
OK, still is up and running :)
I have one more question, from Horde interface or from IMAP clients (outlook, etc) the SMTP function works fine...
But if i setup a POP3/SMTP account on outlook/express when it tries to send a message, the receiver rejects me because in the main.log file of exim the user seems to login as user@userdomain@mailsrv (mailsrv is the hostname...) from Horde the user seems to login as user@userdomain... what should i change to work this OK?
Thanks in advance (one more time!)
topdog
3rd December 2008, 11:57
Setup your from address to the correct one (full email address) it seems like the server is trying to qualify your address.
gsp
3rd December 2008, 12:19
Yes but this is the problem.. in outlook client the from address is set up correctly...
And for some reason exim gets this 'double' id.. user@userdomain.com@mailsrv
:confused::confused:
Maybe if i use the qualify_domain in config of exim option?
PS. this is what i get when trying to send from outlook:
2008-12-03 11:48:45 no host name found for IP address 192.168.10.199
2008-12-03 11:48:53 1L7oLd-0001hM-Lb <= "george@marishotels.eu"@mailsrv H=(sync4j) [192.168.10.199] P=esmtpa A=login:george@marishotels.eu S=12046 id=007f01c9552b$d1c086a0$c70aa8c0@maris.local
2008-12-03 11:48:54 1L7oLd-0001hM-Lb ** test@somewhere.gr R=dnslookup T=remote_smtp: SMTP error from remote mail server after RCPT TO:<gsp1@freemail.gr>: host mx1.freemail.gr [81.171.104.53]: 504 5.5.2 <george@marishotels.eu@mailsrv>: Sender address rejected: need fully-qualified address
and THIS is what i get when i send the same test message on the SAME address..
2008-12-03 10:59:50 no IP address found for host localhost (during SMTP connection from [127.0.0.1])
2008-12-03 10:59:51 1L7naI-0001Qs-JZ <= george@marishotels.eu H=(localhost) [127.0.0.1] P=esmtp S=2230 id=20081203105950.58293lea6j70dfac@127.0.0.1
2008-12-03 10:59:52 1L7naI-0001Qs-JZ => test@somewhere.gr R=dnslookup T=remote_smtp H=mx1.freemail.gr [81.171.104.53]
2008-12-03 10:59:52 1L7naI-0001Qs-JZ Completed
topdog
3rd December 2008, 12:24
Post the log sessions where you see that.
gsp
3rd December 2008, 12:33
probably writing on the same moment!!! logs are on the previous message (edited)
topdog
3rd December 2008, 12:40
is qualify_domain set ? and are u using smtp authentication ?
gsp
3rd December 2008, 12:51
Yes SMTP authentication is used.. (without this doesn't work at all)..
Also if i set qualify_domain the message pass but in the receiver appears a crazy from like this
From: "george@marishotels.eu"@@marishotels.eu; on behalf of; test [george@marishotels.eu]
Is there any way to avoid this and have just the sender's address?
ALSO, do you know any guide/way on how to set-up more than one virtual domains?
topdog
3rd December 2008, 13:05
add your networks to this hostlist relay_from_hosts = Then relaying will work without authentication, it seems like there is an issue when you authenticate i do not know what it is as when i tested mine worked with no problem but i was using thunderbird so i do not know.
Virtual hosting is so easy with this all you need do it add the domain to domainlist local_domains =
and then add the user to the database.
for example
user@domain1
user@domain2
user@domain3
Means you have 3 virtual domains domain1 domain2 and domain3
gsp
3rd December 2008, 13:31
Ok so my thoughts were right. I will try this..
In the meantime i tried the relay_from_hosts field but after set my network there, authentication is not needed and i get these in the logs..
2008-12-03 13:25:05 no host name found for IP address 192.168.10.199
2008-12-03 13:25:16 no host name found for IP address 192.168.10.199
2008-12-03 13:25:18 unknown named domain list "+relay_domains"
F****! every time something happens!!! :mad::D
topdog
3rd December 2008, 13:36
Post your config file.
topdog
3rd December 2008, 13:45
Find the line domains = +local_domains : +relay_domains and change to domains = +local_domains : +relay_to_domains
gsp
3rd December 2008, 14:07
Unfortunately after this change it replies relay denied...
here is my config which is copied from the how to except for the spam section which has some minor changes..
domainlist local_domains = @ : localhost : localhost.localdomain : marishotels.eu : mydomain2.gr
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1 192.168.10.0
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime
acl_smtp_connect = acl_check_connect
hide mysql_servers = localhost/horde/horde/hordepassword
av_scanner = clamd:/var/run/clamav/clamd.socket
spamd_address = /var/run/spamassassin/spamd.sock
tls_advertise_hosts = *
tls_certificate = /etc/pki/tls/certs/exim.pem
tls_privatekey = /etc/pki/tls/private/exim.pem
daemon_smtp_ports = 25
disable_ipv6 = true
never_users = root
host_lookup = *
rfc1413_hosts =
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
auth_advertise_hosts = *
pipelining_advertise_hosts =
smtp_accept_max_nonmail = 6
smtp_max_unknown_commands = 1
system_filter = /etc/exim/system_filter.txt
message_body_visible = 5000
system_filter_user = mail
system_filter_group = mail
system_filter_file_transport = address_file
system_filter_reply_transport = address_pipe
begin acl
acl_check_rcpt:
accept hosts = :
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
drop message = REFUSED - no HELO/EHLO greeting
log_message = remote host did not present greeting
condition = ${if def:sender_helo_name {false}{true}}
accept local_parts = postmaster
domains = +local_domains
# require verify = sender
accept hosts = +relay_from_hosts
control = submission
accept authenticated = *
control = submission
require message = relay not permitted
domains = +local_domains : +relay_to_domains
drop message = REJECTED because $sender_host_address is in a black list spamhaus.org
dnslists = zen.spamhaus.org
drop message = REJECTED because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
dnslists = bl.spamcop.net
drop message = REJECTED because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
dnslists = dnsbl.sorbs.net
accept
acl_check_data:
deny malware = *
message = This message contains a virus ($malware_name).
accept condition = ${if >={$message_size}{100000} {1}}
add_header = X-Spam-Note: SpamAssassin run bypassed due to message size
warn spam = nobody/defer_ok
add_header = X-Spam-Flag: YES
accept condition = ${if !def:spam_score_int {1}}
add_header = X-Spam-Note: SpamAssassin invocation failed
warn add_header = X-Spam-Score: $spam_score ($spam_bar)\n\
X-Spam-Report: $spam_report
# drop condition = ${if >{$spam_score_int}{60} {1}}
# message = Your message scored $spam_score SpamAssassin point. Report follows:\n\
# $spam_report
warn message = X-New-Subject: *SPAM* $rh_subject:
spam = nobody
warn message = X-Spam-Score: $spam_score ($spam_bar)
condition = ${if <{$message_size}{80k}{1}{0}}
spam = nobody:true
accept
acl_check_mime:
deny message = Blacklisted file extension detected
condition = ${if match \
{${lc:$mime_filename}} \
{\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
{1}{0}}
accept
acl_check_connect:
drop ratelimit = 25 / 15m / strict
#hosts = ! lsearch;/etc/exim/non_rate_limit_hosts
message = You can only send $sender_rate per $sender_rate_period
log_message = RATE: $sender_rate/$sender_rate_period (max $sender_rate_limit)
accept
begin routers
dnslookup:
driver = dnslookup
domains = +local_domains : +relay_to_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
file_transport = address_file
pipe_transport = address_pipe
localuser:
driver = accept
local_parts = ${lookup mysql {SELECT REPLACE(user_uid,'${quote_mysql:@$domain}','') \
as user FROM horde_users WHERE user_uid='${quote_mysql:$local_part@$domain}'}{$va lue}}
transport = local_delivery
cannot_route_message = Unknown user
begin transports
remote_smtp:
driver = smtp
local_delivery:
driver = lmtp
socket = /var/lib/imap/socket/lmtp
batch_max = 50
user = cyrus
address_reply:
driver = autoreply
begin retry
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
begin rewrite
begin authenticators
plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_set_id = $2
server_condition = ${if saslauthd{{$2}{$3}{pop}}{1}{0}}
server_advertise_condition = true
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if saslauthd{{$1}{$2}{pop}}{1}{0}}
server_set_id = $1
server_advertise_condition = true
** i am also downloading thunderbird to see if i have same results..
topdog
3rd December 2008, 14:17
hostlist relay_from_hosts = 127.0.0.1 : 192.168.10.0/24
gsp
3rd December 2008, 14:38
Thunderbird does exactly the same behavior...
ok hosts corrected... but in the domain section existed one '!' .. is it needed?
Now what ever address i put in To: it sas 'User uknown' (in the log file..)..
:confused::confused::confused: i will break this box!!! :eek:
topdog
3rd December 2008, 14:47
Thunderbird does exactly the same behavior...
ok hosts corrected... but in the domain section existed one '!' .. is it needed?
Now what ever address i put in To: it sas 'User uknown' (in the log file..)..
:confused::confused::confused: i will break this box!!! :eek:
I do not understand what u are saying, are u saying you cannot send mail anywhere ?
gsp
3rd December 2008, 14:55
Yes that was correct... probably some typing mistake... now reverting back to my original conf, and fixing the hosts that you stated seems to work without authentication.
I am wondering because thunderbird makes the same problem if i use authentication.. do you use it by the same way?(authenticated or not)?
Thanks
topdog
3rd December 2008, 15:02
Yes that was correct... probably some typing mistake... now reverting back to my original conf, and fixing the hosts that you stated seems to work without authentication.
I am wondering because thunderbird makes the same problem if i use authentication.. do you use it by the same way?(authenticated or not)?
Thanks
When i tested with authentication it worked for me with out altering the address. I do not work for the company where the production system is running anymore but i can test again on my dev virtual machine.
gsp
3rd December 2008, 15:35
OK, if and whenever you have the time it would be good to know how to make this work...(compare our configs..) maybe some of my clients want to use outlook from 'outside' connections and the only way to keep my SMTP safe is to require authentication from all except localhost..
Cheers
topdog
3rd December 2008, 15:40
OK, if and whenever you have the time it would be good to know how to make this work...(compare our configs..) maybe some of my clients want to use outlook from 'outside' connections and the only way to keep my SMTP safe is to require authentication from all except localhost..
Cheers
Can you email me with authentication on i want to see how the headers are being altered
gsp
3rd December 2008, 16:23
Got this trying to send to you from Outlook with SMTP authorization:
2008-12-03 16:19:50 no host name found for IP address 192.168.10.199
2008-12-03 16:20:01 1L7sZy-000326-Nm <= "george@marishotels.eu"@mailsrv H=(sync4j) [192.168.10.199] P=esmtpa A=login:george@marishotels.eu S=5549 id=007c01c95551$ad097580$c70aa8c0@maris.local
2008-12-03 16:20:04 1L7sZy-000326-Nm == andrew@topdog.za.net R=dnslookup T=remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:<andrew@topdog.za.net>: host mail.topdog.za.net [209.20.66.9]: 450 4.1.8 <george@marishotels.eu@mailsrv>: Sender address rejected: Domain not found
Again this stupid login... when authenticates... (thunderbird did the same!!!)... why uses all this for user?... Without authentication works fine now...
gsp
5th December 2008, 15:14
Tried to upgrade to latest versions of Horde, imp, etc..
Everything seems fine but in the upgrade doc of Horde says it needs MDB2_Schema so it can run a script for updating database...
After some tries of installing it, and running the php script i get a Fatal Error: MDB2 Error: not found
I am spending hours now to find what is all this about and i cannot... any suggestions? Below is the script i am trying to run:
#!/usr/bin/env php
<?php
/**
* Fix MDB2 sequence names. Thie script changes the MDB2 sequence names from the
* default of 'sequence' to 'id' to be consistent with all horde apps, and to
* allow automated upgrade scripts to use MDB2_Schema in the future.
*
* $Horde: horde/scripts/upgrades/2008-08-29_fix_mdb2_sequences.php,v 1.1.2.5 2008/09/04 19:25:22 mrubinsk Exp $
*
* @author Michael J. Rubinsky <mrubinsk@horde.org>
* @since Horde 3.2.2
*/
@define('AUTH_HANDLER', true);
@define('HORDE_BASE', dirname(__FILE__) . '/../..');
/* These are the table => key names that need to be updated */
$to_upgrade = array('ansel_shares' => 'share_id',
'ansel_images' => 'image_id',
'ansel_tags' => 'tag_id',
'ansel_faces' => 'face_id',
'genie_shares' => 'share_id',
'ingo_shares' => 'share_id',
'klutz_comics' => 'comicpic_id',
'kronolith_shares' => 'share_id',
'mnemo_shares' => 'share_id',
'nag_shares' => 'share_id',
'turba_shares' => 'share_id',
'whups_shares' => 'share_id');
/* Set up the CLI environment */
require_once HORDE_BASE . '/lib/core.php';
require_once 'Horde/CLI.php';
if (!Horde_CLI::runningFromCli()) {
exit("Must be run from the command line\n");
}
$cli = &Horde_CLI::singleton();
$cli->init();
/* Grab what we need to steal the DB config */
require_once HORDE_BASE . '/config/conf.php';
require_once 'MDB2/Schema.php';
require_once 'MDB2.php';
$config = $GLOBALS['conf']['sql'];
unset($config['charset']);
$schema = MDB2_Schema::factory($config, array('seqcol_name' => 'id'));
if (is_a($schema, 'PEAR_Error')) {
$cli->fatal($schema->getMessage());
}
$db = &MDB2::factory($config);
if (is_a($db, 'PEAR_Error')) {
$cli->fatal($db->getMessage());
}
$db->loadModule('Manager');
$tables = $db->manager->listTables();
if (is_a($tables, 'PEAR_Error')) {
$cli->fatal($tables->getMessage());
}
/* Update any of the tables that we have */
foreach ($to_upgrade as $table => $field) {
if (array_search($table, $tables) !== false) {
$results = $schema->createSequence(
$table, array('on' => array('table' => $table, 'field' => $field)), true);
if (is_a($results, 'PEAR_Error')) {
$cli->fatal(sprintf(_("Unable to modify the sequence for %s: %s"), $table, $results->getMessage()));
}
$cli->message(sprintf(_("Modified sequence for %s"), $table), 'cli.success');
}
}
$cli->message(_("Done"), 'cli.success');
UPDATE---> Ok this one solved with Pear Driver mysqli install...
topdog
10th December 2008, 13:50
Got this trying to send to you from Outlook with SMTP authorization:
2008-12-03 16:19:50 no host name found for IP address 192.168.10.199
2008-12-03 16:20:01 1L7sZy-000326-Nm <= "george@marishotels.eu"@mailsrv H=(sync4j) [192.168.10.199] P=esmtpa A=login:george@marishotels.eu S=5549 id=007c01c95551$ad097580$c70aa8c0@maris.local
2008-12-03 16:20:04 1L7sZy-000326-Nm == andrew@topdog.za.net R=dnslookup T=remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:<andrew@topdog.za.net>: host mail.topdog.za.net [209.20.66.9]: 450 4.1.8 <george@marishotels.eu@mailsrv>: Sender address rejected: Domain not found
Again this stupid login... when authenticates... (thunderbird did the same!!!)... why uses all this for user?... Without authentication works fine now...
Make this change and all will work properly
accept authenticated = *
control = submission/sender_retain
gsp
10th December 2008, 14:54
What this setting will do? I would like to have my users authenticate when trying to send because i am planning to use SMTP and from outside, so i don't want to be a spammer...
Thanks..
P.S. After many hours of trying to update the system, got back to versions of "how to" but unfortunately i miss the sync function with outlook as Funambol plugin don't work with Horde 3.1.x installations... :(
topdog
10th December 2008, 14:57
That will let you do smtp authentication with out the address being modified, ie you will be able to send mail via smtp authentication with the correct address appearing instead of the login@server
gsp
12th December 2008, 10:33
OK, i'll try this and let you know.. Now i have my system up&running with 124 mail accounts and seems fine... Now it only needs fine-tunning... For spam, for attachment sizes and syncing with outlook (difficult part, horde needs updating!!)
Thank you
gsp
12th December 2008, 15:40
It seems to work. Now only two minor problems remain... SMTP authentication takes sooo long to complete even in the LAN network...:o
Finally the receiver sees this message in From section:
From: "user@mydomain.com"@mail.mydomain.com on behalf of NAME [user@mydomain.com]<"user@mydomain.com"@mail.mydomain.com> :confused:
All this!! Is there any way to get only the real sender to be there? :eek: And of course i mean only when using POP3 clients with SMTP authentication..
Cheers
topdog
13th December 2008, 12:22
It seems to work. Now only two minor problems remain... SMTP authentication takes sooo long to complete even in the LAN network...:o
Finally the receiver sees this message in From section:
From: "user@mydomain.com"@mail.mydomain.com on behalf of NAME [user@mydomain.com]<"user@mydomain.com"@mail.mydomain.com> :confused:
All this!! Is there any way to get only the real sender to be there? :eek: And of course i mean only when using POP3 clients with SMTP authentication..
Cheers
I am suspecting that u did the wrong thing, you must have just added that in you are supposed to modify the existing configuration and just add sender_retain
gsp
13th December 2008, 12:58
No, in my config exists only this :
accept authenticated = *
control = submission/sender_retain
Not added again, found this section and just added a "/sender_retain" in the end. Isn't this that you mean? Or i should remove the "submission" and leave only "sender_retain"?
topdog
13th December 2008, 14:04
Thats correct if you did that then the email will be correct and there should be no slowness at all. Did u restart exim ?
gsp
13th December 2008, 18:07
Of course, everytime i make any changes i restart the appropriate services... But this problem still remains SMTP takes sometimes up to 10 seconds for very small test messages. In the beginning i thought it was due to antivirus and spam check but i don't think so...am still searching on it. Also the field 'From:' remains with all this stuff on it if someone sends from clients like Outlook/Outlook express
gsp
16th December 2008, 14:03
One more strange thing i have noticed and i cannot figure out if its due to cyrus config or exim... If a sender sends to a capital letters address i.e. admin@mydomain.com (ADMIN@MYDOMAIN.COM), cyrus makes a second mailbox under users section in IMP the message is viewable but from POP its not accessible of course because it is in other directory...
How can i convert ANY incoming address to small letters?
Thank you
SOLVED: imapd.conf
ask2me007
26th January 2009, 17:12
Is any how to here to install horde in centos5.2.
The how to in centos5.1 , i installed it but shows a blank screen.I cant even see any logs .
Is there any way?
Thans in advance
topdog
26th January 2009, 17:47
This howto should work with modifications on centos 5.2, a blank screen usually indicates a php error turn on error reporting in php and you will see what the error is.
ask2me007
27th January 2009, 16:21
Thanks Mr.Topdog for your speedy reply.Could you pls tell me the modifications to be done in centos5.2 version.?It will be beneficial for people like me.
Thanks again.
topdog
27th January 2009, 16:25
There are few minor things here and there, if you follow the threads here on howtoforge u should be able to get it up and running.
I will be producing an updated howto for 5.3 when it is released which should be soon as RHEL 5.3 is out. May be u should wait and use that one.
rabbithunter666
11th November 2009, 11:49
Thanks a lot for this thread. It works for me. I am waiting for howto in 5.3 version.
topdog
11th November 2009, 11:56
Thanks a lot for this thread. It works for me. I am waiting for howto in 5.3 version.
It will actually be on 5.4 as soon as i get some time on my hands.
flyingsheep2009
14th November 2009, 05:48
php error turn on error reporting in php .
You can set it in php.ini.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.