Mail Server Setup With Exim, MySQL, Cyrus-Imapd, Horde Webmail On Centos 5.1 - works?

Discussion in 'HOWTO-Related Questions' started by gsp, Oct 10, 2008.

  1. gsp

    gsp New Member

    Got this trying to send to you from Outlook with SMTP authorization:

    Code:
    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 <= "[email protected]"@mailsrv H=(sync4j) [192.168.10.199] P=esmtpa A=login:[email protected] S=5549 [email protected]
    2008-12-03 16:20:04 1L7sZy-000326-Nm == [email protected] R=dnslookup T=remote_smtp defer (-44): SMTP error from remote mail server after RCPT TO:<[email protected]>: host mail.topdog.za.net [209.20.66.9]: 450 4.1.8 <[email protected]@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...
     
  2. gsp

    gsp New Member

    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:
    PHP:
    #!/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 <[email protected]>
     * @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...
     
    Last edited: Dec 10, 2008
  3. topdog

    topdog Active Member

    Make this change and all will work properly

    Code:
     accept  authenticated = *
              control       = submission/sender_retain
    
    
     
  4. gsp

    gsp New Member

    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... :(
     
  5. topdog

    topdog Active Member

    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
     
  6. gsp

    gsp New Member

    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
     
  7. gsp

    gsp New Member

    It seems to work. Now only two minor problems remain... SMTP authentication takes sooo long to complete even in the LAN network...:eek:

    Finally the receiver sees this message in From section:

    From: "[email protected]"@mail.mydomain.com on behalf of NAME [[email protected]]<"[email protected]"@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
     
  8. topdog

    topdog Active Member

    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
     
  9. gsp

    gsp New Member

    No, in my config exists only this :

    Code:
    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"?
     
  10. topdog

    topdog Active Member

    Thats correct if you did that then the email will be correct and there should be no slowness at all. Did u restart exim ?
     
  11. gsp

    gsp New Member

    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
     
  12. gsp

    gsp New Member

    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. [email protected] ([email protected]), 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
     
    Last edited: Dec 17, 2008
  13. ask2me007

    ask2me007 New Member

    horde installation how to in centos 5.2

    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
     
  14. topdog

    topdog Active Member

    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.
     
  15. ask2me007

    ask2me007 New Member

    hore installation in centos5.2

    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.
     
  16. topdog

    topdog Active Member

    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.
     
  17. rabbithunter666

    rabbithunter666 New Member

    Thanks a lot for this thread. It works for me. I am waiting for howto in 5.3 version.
     
  18. topdog

    topdog Active Member

    It will actually be on 5.4 as soon as i get some time on my hands.
     
  19. flyingsheep2009

    flyingsheep2009 New Member

    Turn on php error

    You can set it in php.ini.
     
  20. Alex Ravens

    Alex Ravens New Member

    Hi everyone! Thank you very much for help in learning centos. I'm linux newbie, please do not judge strictly. I have a question. When I removed the comments that had been checked for viruses in exim config, my mail server stop going. That thi error:

    2010-01-24 07:10:57 1NYr0D-0006ZH-Be malware acl condition: clamd: ClamAV returned /var/spool/exim/scan/1NYr0D-0006ZH-Be: lstat() failed: Permission denied. ERROR

    Help to understand what's wrong?

    drwxrws--- 2 exim mail 4096 Янв 25 11:47 scan.
    Here the rights on folder scan. Everything else works.
     

Share This Page