Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10) - Page 5

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Thu, 2008-11-13 19:12. ::

15 Installing SquirrelMail

SquirrelMail is a webmail interface that will let your users send and receive emails in a browser. This chapter shows how to install it and adjust it to our setup so that users can even change their email account password from the SquirrelMail interface.

To install SquirrelMail, we run:

apt-get install squirrelmail php-pear

Next we copy the Apache configuration that comes with the SquirrelMail package to the /etc/apache2/conf.d directory and restart Apache:

cp /etc/squirrelmail/apache.conf /etc/apache2/conf.d/squirrelmail.conf
/etc/init.d/apache2 restart

SquirrelMail comes with some pre-installed plugins, unfortunately none of them is capable of letting us change our email password in our MySQL database. But there's the Change SQL Password plugin which we can install manually:

The plugin depends on the Pear-DB package so we install it:

pear install DB

Then we install the Change SQL Password plugin itself:

cd /usr/share/squirrelmail/plugins
wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fchange_sqlpass-3.3-1.2.tar.gz
tar xvfz change_sqlpass-3.3-1.2.tar.gz
cd change_sqlpass
cp config.php.sample config.php

Now we must edit config.php and adjust it to our setup. Please adjust the $csp_dsn, $lookup_password_query, $password_update_queries, $password_encryption, $csp_salt_static, and $csp_delimiter variables as follows and comment out $csp_salt_query:

vi config.php

[...]
$csp_dsn = 'mysql://mail_admin:mail_admin_password@localhost/mail';
[...]
$lookup_password_query = 'SELECT count(*) FROM users WHERE email = "%1" AND password = %4';
[...]
$password_update_queries = array('UPDATE users SET password = %4 WHERE email = "%1"');
[...]
$password_encryption = 'MYSQLENCRYPT';
[...]
$csp_salt_static = 'LEFT(password, 2)';
[...]
//$csp_salt_query = 'SELECT salt FROM users WHERE username = "%1"';
[...]
$csp_delimiter = '@';
[...]

The complete file looks as follows:

<?php

/**
  * SquirrelMail Change SQL Password Plugin
  * Copyright (C) 2001-2002 Tyler Akins
  *               2002 Thijs Kinkhorst <kink@users.sourceforge.net>
  *               2002-2005 Paul Lesneiwski <paul@openguild.net>
  * This program is licensed under GPL. See COPYING for details
  *
  * @package plugins
  * @subpackage Change SQL Password
  *
  */


   // Global Variables, don't touch these unless you want to break the plugin
   //
   global $csp_dsn, $password_update_queries, $lookup_password_query,
          $force_change_password_check_query, $password_encryption,
          $csp_salt_query, $csp_salt_static, $csp_secure_port,
          $csp_non_standard_http_port, $csp_delimiter, $csp_debug,
          $min_password_length, $max_password_length, $include_digit_in_password,
          $include_uppercase_letter_in_password, $include_lowercase_letter_in_password,
          $include_nonalphanumeric_in_password;



   // csp_dsn
   //
   // Theoretically, any SQL database supported by Pear should be supported
   // here.  The DSN (data source name) must contain the information needed
   // to connect to your database backend. A MySQL example is included below.
   // For more details about DSN syntax and list of supported database types,
   // please see:
   //   http://pear.php.net/manual/en/package.database.db.intro-dsn.php
   //
   //$csp_dsn = 'mysql://user:password@localhost/email_users';
   $csp_dsn = 'mysql://mail_admin:mail_admin_password@localhost/mail';


   // lookup_password_query
   //
   // This plugin will always verify the user's old password
   // against their login password, but an extra check can also
   // be done against the database for more security if you
   // desire.  If you do not need the extra password check,
   // make sure this setting is empty.
   //
   // This is a query that returns a positive value if a user
   // and password pair are found in the database.
   //
   // This query should return one value (one row, one column), the
   // value being ideally a one or a zero, simply indicating that
   // the user/password pair does in fact exist in the database.
   //
   //   %1 in this query will be replaced with the full username
   //      (including domain), such as "jose@example.com"
   //   %2 in this query will be replaced with the username (without
   //      any domain portion), such as "jose"
   //   %3 in this query will be replaced with the domain name,
   //      such as "example.com"
   //   %4 in this query will be replaced with the current (old)
   //      password in whatever encryption format is needed per other
   //      plugin configuration settings (Note that the syntax of
   //      the password will be provided depending on your encryption
   //      choices, so you NEVER need to provide quotes around this
   //      value in the query here.)
   //   %5 in this query will be replaced with the current (old)
   //      password in unencrypted plain text.  If you do not use any
   //      password encryption, %4 and %5 will be the same values,
   //      except %4 will have double quotes around it and %5 will not.
   //
   //$lookup_password_query = '';
   // TERRIBLE SECURITY: $lookup_password_query = 'SELECT count(*) FROM users WHERE username = "%1" AND plain_password = "%5"';
   //$lookup_password_query = 'SELECT count(*) FROM users WHERE username = "%1" AND crypt_password = %4';
   $lookup_password_query = 'SELECT count(*) FROM users WHERE email = "%1" AND password = %4';


   // password_update_queries
   //
   // An array of SQL queries that will all be executed
   // whenever a password change attempt is made.
   //
   // Any number of queries may be included here.
   // The queries will be executed in the order given here.
   //
   //   %1 in all queries will be replaced with the full username
   //      (including domain), such as "jose@example.com"
   //   %2 in all queries will be replaced with the username (without
   //      any domain portion), such as "jose"
   //   %3 in all queries will be replaced with the domain name,
   //      such as "example.com"
   //   %4 in all queries will be replaced with the new password
   //      in whatever encryption format is needed per other
   //      plugin configuration settings (Note that the syntax of
   //      the password will be provided depending on your
   //      encryption choices, so you NEVER need to provide quotes
   //      around this value in the queries here.)
   //   %5 in all queries will be replaced with the new password
   //      in unencrypted plain text - BEWARE!  If you do not use
   //      any password encryption, %4 and %5 will be the same
   //      values, except %4 will have double quotes around it
   //      and %5 will not.
   //
//   $password_update_queries = array(
//            'UPDATE users SET crypt_password = %4 WHERE username = "%1"',
//            'UPDATE user_flags SET force_change_pwd = 0 WHERE username = "%1"',
//            'UPDATE users SET crypt_password = %4, force_change_pwd = 0 WHERE username = "%1"',
//                                   );
   $password_update_queries = array('UPDATE users SET password = %4 WHERE email = "%1"');


   // force_change_password_check_query
   //
   // A query that checks for a flag that indicates if a user
   // should be forced to change their password.  This query
   // should return one value (one row, one column) which is
   // zero if the user does NOT need to change their password,
   // or one if the user should be forced to change it now.
   //
   // This setting should be an empty string if you do not wish
   // to enable this functionality.
   //
   //   %1 in this query will be replaced with the full username
   //      (including domain), such as "jose@example.com"
   //   %2 in this query will be replaced with the username (without
   //      any domain portion), such as "jose"
   //   %3 in this query will be replaced with the domain name,
   //      such as "example.com"
   //
   //$force_change_password_check_query = 'SELECT IF(force_change_pwd = "yes", 1, 0) FROM users WHERE username = "%1"';
   //$force_change_password_check_query = 'SELECT force_change_pwd FROM users WHERE username = "%1"';
   $force_change_password_check_query = '';



   // password_encryption
   //
   // What encryption method do you use to store passwords
   // in your database?  Please use one of the following,
   // exactly as you see it:
   //
   //   NONE          Passwords are stored as plain text only
   //   MYSQLPWD      Passwords are stored using the MySQL password() function
   //   MYSQLENCRYPT  Passwords are stored using the MySQL encrypt() function
   //   PHPCRYPT      Passwords are stored using the PHP crypt() function
   //   MD5CRYPT      Passwords are stored using encrypted MD5 algorithm
   //   MD5           Passwords are stored as MD5 hash
   //
   //$password_encryption = 'MYSQLPWD';
   $password_encryption = 'MYSQLENCRYPT';


   // csp_salt_query
   // csp_salt_static
   //
   // Encryption types that need a salt need to know where to get
   // that salt.  If you have a constant, known salt value, you
   // should define it in $csp_salt_static.  Otherwise, leave that
   // value empty and define a value for the $csp_salt_query.
   //
   // Leave both values empty if you do not need (or use) salts
   // to encrypt your passwords.
   //
   // The query should return one value (one row, one column) which
   // is the salt value for the current user's password.  This
   // query is ignored if $csp_salt_static is anything but empty.
   //
   //   %1 in this query will be replaced with the full username
   //      (including domain), such as "jose@example.com"
   //   %2 in this query will be replaced with the username (without
   //      any domain portion), such as "jose"
   //   %3 in this query will be replaced with the domain name,
   //      such as "example.com"
   //
   //$csp_salt_static = 'LEFT(crypt_password, 2)';
   //$csp_salt_static = '"a4"';  // use this format with MYSQLENCRYPT
   //$csp_salt_static = '$2$blowsomefish$';  // use this format with PHPCRYPT
   //$csp_salt_static = '';
   $csp_salt_static = 'LEFT(password, 2)';

   //$csp_salt_query = 'SELECT SUBSTRING_INDEX(crypt_password, '$', 1) FROM users WHERE username = "%1"';
   //$csp_salt_query = 'SELECT SUBSTRING(crypt_password, (LENGTH(SUBSTRING_INDEX(crypt_password, '$', 2)) + 2)) FROM users WHERE username = "%1"';
   //$csp_salt_query = 'SELECT salt FROM users WHERE username = "%1"';
   //$csp_salt_query = '';



   // csp_secure_port
   //
   // You may ensure that SSL encryption is used during password
   // change by setting this to the port that your HTTPS is served
   // on (443 is typical).  Set to zero if you do not wish to force
   // an HTTPS connection when users are changing their passwords.
   //
   // You may override this value for certain domains, users, or
   // service levels through the Virtual Host Login (vlogin) plugin
   // by setting a value(s) for $vlogin_csp_secure_port in the vlogin
   // configuration.
   //
   $csp_secure_port = 0;
   //$csp_secure_port = 443;



   // csp_non_standard_http_port
   //
   // If you serve standard HTTP web requests on a non-standard
   // port (anything other than port 80), you should specify that
   // port number here.  Set to zero otherwise.
   //
   // You may override this value for certain domains, users, or
   // service levels through the Virtual Host Login (vlogin) plugin
   // by setting a value(s) for $vlogin_csp_non_standard_http_port
   // in the vlogin configuration.
   //
   //$csp_non_standard_http_port = 8080;
   $csp_non_standard_http_port = 0;



   // min_password_length
   // max_password_length
   // include_digit_in_password
   // include_uppercase_letter_in_password
   // include_lowercase_letter_in_password
   // include_nonalphanumeric_in_password
   //
   // You can set the minimum and maximum password lengths that
   // you accept or leave those settings as zero to indicate that
   // no limit should be applied.
   //
   // Turn on any of the other settings here to check that the
   // new password contains at least one digit, upper case letter,
   // lower case letter and/or one non-alphanumeric character.
   //
   $min_password_length = 6;
   $max_password_length = 0;
   $include_digit_in_password = 0;
   $include_uppercase_letter_in_password = 0;
   $include_lowercase_letter_in_password = 0;
   $include_nonalphanumeric_in_password = 0;



   // csp_delimiter
   //
   // if your system has usernames with something other than
   // an "@" sign separating the user and domain portion,
   // specify that character here
   //
   //$csp_delimiter = '|';
   $csp_delimiter = '@';



   // debug mode
   //
   $csp_debug = 0;



?>

The Change SQL Password plugin also depends on the Compatibility plugin which we install as follows:

cd /usr/share/squirrelmail/plugins
wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcompatibility-2.0.11-1.0.tar.gz
tar xvfz compatibility-2.0.11-1.0.tar.gz

Now we must go into the SquirrelMail configuration and tell SquirrelMail that we use Courier as our POP3 and IMAP server and enable the Change SQL Password and the Compatibility plugins:

/usr/sbin/squirrelmail-configure

You'll see the following menu. Navigate through it as indicated:

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- D


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server

    quit        = Do not change anything
Command >>
 <-- courier


              imap_server_type = courier
         default_folder_prefix = INBOX.
                  trash_folder = Trash
                   sent_folder = Sent
                  draft_folder = Drafts
            show_prefix_option = false
          default_sub_of_inbox = false
show_contain_subfolders_option = false
            optional_delimiter = .
                 delete_folder = true

Press any key to continue...
<-- press some key


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- 8


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins

  Available Plugins:
    1. abook_take
    2. administrator
    3. bug_report
    4. calendar
    5. change_sqlpass
    6. compatibility
    7. delete_move_next
    8. demo
    9. filters
    10. fortune
    11. info
    12. listcommands
    13. mail_fetch
    14. message_details
    15. newmail
    16. sent_subfolders
    17. spamcop
    18. squirrelspell
    19. test
    20. translate

R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- 6 (or whatever number the compatibility plugin has - it's needed by the change_sqlpass plugin)


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. compatibility

  Available Plugins:
    2. abook_take
    3. administrator
    4. bug_report
    5. calendar
    6. change_sqlpass
    7. delete_move_next
    8. demo
    9. filters
    10. fortune
    11. info
    12. listcommands
    13. mail_fetch
    14. message_details
    15. newmail
    16. sent_subfolders
    17. spamcop
    18. squirrelspell
    19. test
    20. translate

R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- 6 (the number of the change_sqlpass plugin)


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. compatibility
    2. change_sqlpass

  Available Plugins:
    3. abook_take
    4. administrator
    5. bug_report
    6. calendar
    7. delete_move_next
    8. demo
    9. filters
    10. fortune
    11. info
    12. listcommands
    13. mail_fetch
    14. message_details
    15. newmail
    16. sent_subfolders
    17. spamcop
    18. squirrelspell
    19. test
    20. translate

R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- S


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. compatibility
    2. change_sqlpass

  Available Plugins:
    3. abook_take
    4. administrator
    5. bug_report
    6. calendar
    7. delete_move_next
    8. demo
    9. filters
    10. fortune
    11. info
    12. listcommands
    13. mail_fetch
    14. message_details
    15. newmail
    16. sent_subfolders
    17. spamcop
    18. squirrelspell
    19. test
    20. translate

R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit

Command >> S

Data saved in config.php
Press enter to continue...
<-- press some key


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Plugins
  Installed Plugins
    1. compatibility
    2. change_sqlpass

  Available Plugins:
    3. abook_take
    4. administrator
    5. bug_report
    6. calendar
    7. delete_move_next
    8. demo
    9. filters
    10. fortune
    11. info
    12. listcommands
    13. mail_fetch
    14. message_details
    15. newmail
    16. sent_subfolders
    17. spamcop
    18. squirrelspell
    19. test
    20. translate

R   Return to Main Menu
C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- Q

Now you can type in http://server1.example.com/squirrelmail or http://192.168.0.100/squirrelmail in your browser to access SquirrelMail.

Log in with your email address (e.g. sales@example.com) and your password:

You should find the welcome email in your inbox:

To change your password, go to Options and then select Change Password:

Type in your current password and then your new password twice:

SquirrelMail will tell you if the password has been changed successfully:

 

16 References

 

17 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by wasimriz (registered user) on Thu, 2009-04-02 02:56.

Hello

 

can any one can help how to 

change http://10.30.5.225/squirrelmail to http://mail.mynetmagician.net

2)

Did i need make MX entires into my DNS server 

my server hostname is mynetmagician.net

need i have go with public IP ,

Last but not least what is relayhost?

Submitted by wasimriz (registered user) on Thu, 2009-04-02 02:53.

ERROR: Connection dropped by IMAP server.

 

after checking the mail.log i get the below entries

Apr  1 21:08:46 ubuntu postfix/qmgr[25175]: 646A4BD189: from=<root@mynetmagic.net>, size=352, nrcpt=1 (queue active)
Apr  1 21:08:46 ubuntu postfix/smtp[25760]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Apr  1 21:08:46 ubuntu postfix/smtp[25760]: 646A4BD189: to=<servicedesk@mynetmagician.net>, relay=none, delay=508, delays=508/0.2/0.03/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Apr  1 21:18:46 ubuntu postfix/qmgr[25175]: 646A4BD189: from=<root@mynetmagic.net>, size=352, nrcpt=1 (queue active)
Apr  1 21:18:46 ubuntu postfix/smtp[26076]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Apr  1 21:18:46 ubuntu postfix/smtp[26076]: 646A4BD189: to=<servicedesk@mynetmagician.net>, relay=none, delay=1109, delays=1109/0.04/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Apr  1 21:24:08 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:24:08 ubuntu imapd: LOGIN FAILED, user=servicedesk, ip=[::ffff:127.0.0.1]
Apr  1 21:24:13 ubuntu imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=53, sent=332
Apr  1 21:24:46 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:24:46 ubuntu imapd: chdir mynetmagician.net/servicedesk/: No such file or directory
Apr  1 21:24:57 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:24:57 ubuntu imapd: LOGIN FAILED, user=servicedesk, ip=[::ffff:127.0.0.1]
Apr  1 21:25:03 ubuntu imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=53, sent=332
Apr  1 21:25:12 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:25:12 ubuntu imapd: LOGIN FAILED, user=wasimr, ip=[::ffff:127.0.0.1]
Apr  1 21:25:17 ubuntu imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=45, sent=332
Apr  1 21:25:31 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:25:31 ubuntu imapd: LOGIN FAILED, user=servicedesk, ip=[::ffff:127.0.0.1]
Apr  1 21:25:36 ubuntu imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=53, sent=332
Apr  1 21:26:04 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:26:04 ubuntu imapd: chdir mynetmagician.net/servicedesk/: No such file or directory
Apr  1 21:28:12 ubuntu postfix/smtpd[26189]: connect from unknown[10.30.5.225]
Apr  1 21:28:27 ubuntu postfix/smtpd[26189]: disconnect from unknown[10.30.5.225]
Apr  1 21:28:33 ubuntu imapd: Connection, ip=[::ffff:10.30.5.225]
Apr  1 21:29:09 ubuntu imapd: Disconnected, ip=[::ffff:10.30.5.225], time=36
Apr  1 21:31:47 ubuntu postfix/anvil[26192]: statistics: max connection rate 1/60s for (smtp:10.30.5.225) at Apr  1 21:28:12
Apr  1 21:31:47 ubuntu postfix/anvil[26192]: statistics: max connection count 1 for (smtp:10.30.5.225) at Apr  1 21:28:12
Apr  1 21:31:47 ubuntu postfix/anvil[26192]: statistics: max cache size 1 at Apr  1 21:28:12
Apr  1 21:35:40 ubuntu imapd: Connection, ip=[::ffff:10.30.1.80]
Apr  1 21:35:47 ubuntu imapd: Disconnected, ip=[::ffff:10.30.1.80], time=7
Apr  1 21:35:51 ubuntu pop3d: Connection, ip=[::ffff:10.30.1.80]
Apr  1 21:36:08 ubuntu pop3d: LOGIN FAILED, user=servicedesk, ip=[::ffff:10.30.1.80]
Apr  1 21:36:18 ubuntu pop3d: Disconnected, ip=[::ffff:10.30.1.80]
Apr  1 21:38:46 ubuntu postfix/qmgr[25175]: 646A4BD189: from=<root@mynetmagic.net>, size=352, nrcpt=1 (queue active)
Apr  1 21:38:46 ubuntu postfix/smtp[26279]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Apr  1 21:38:46 ubuntu postfix/smtp[26279]: 646A4BD189: to=<servicedesk@mynetmagician.net>, relay=none, delay=2308, delays=2308/0.02/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Apr  1 21:39:14 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:39:14 ubuntu imapd: chdir mynetmagician.net/salil/: No such file or directory
Apr  1 21:39:22 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:39:22 ubuntu imapd: LOGIN FAILED, user=salil, ip=[::ffff:127.0.0.1]
Apr  1 21:39:27 ubuntu imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=41, sent=332
Apr  1 21:39:47 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Apr  1 21:39:47 ubuntu imapd: chdir mynetmagician.net/wasim/: No such file or directory
Apr  1 21:42:06 ubuntu postfix/pickup[25174]: 95094BD193: uid=0 from=<root>
Apr  1 21:42:06 ubuntu postfix/cleanup[26455]: 95094BD193: message-id=<20090402014206.95094BD193@mynetmagician.net>
Apr  1 21:42:06 ubuntu postfix/qmgr[25175]: 95094BD193: from=<root@mynetmagic.net>, size=313, nrcpt=1 (queue active)
Apr  1 21:42:06 ubuntu postfix/smtp[26458]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Apr  1 21:42:06 ubuntu postfix/smtp[26458]: 95094BD193: to=<wasim@mynetmagician.net>, relay=none, delay=0.25, delays=0.23/0.02/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

 

Can u please help me how to get rid of this error.

 

 

 

Submitted by Frederik (not registered) on Sun, 2009-12-27 09:37.

 Hello

 I got the same problem I dont know that much from this system and are very fresh to it

I also got this error  `pure-ftpd-mysql' uses 32-bit capabilities (legacy support in use)

means (mysql is stoping) if its in your case the same then you have to fix this problem first

I am still doing resource on it to solve it , if I did fix it I will let you know

Regards FJB

Submitted by Anonymous (not registered) on Sun, 2009-01-18 17:20.

I've followed this guide and installed everything as shown.

When I go to my browser and view http://192.168.1.172/squirrelmail I get the log in screen.

I log in and nothing. No pages showing waiting mail. I have telnetted in and using STAT I can see mail waiting.  Any ideas what's wrong with SquirrelMail ??

Also when I try to send I get asked for a password, I've entered the same pasword that I used for IMAP/POP3 but it won't let me send.

Any Ideas ?

Thanks 

Submitted by Anonymous (not registered) on Wed, 2009-02-11 11:07.

I had a similar issue when the change password plugin was loaded. Login and all I got was a blank page. Unloaded the plugin and it worked ok.

 It ended up being a stray bit of code in the sqlpass change config.php

Make sure you don't have any stray bits of code. I had "                        );" just under the $password_update_queries section.

Submitted by r00tz (not registered) on Wed, 2008-12-31 05:52.

Very nice tutorial ! 100% works !

Lots of thanks !!! (I'm French)

 Thanks !!!!!

Submitted by Maykel (not registered) on Wed, 2009-05-27 11:55.

This tutorial is a excellent but i had problems.

Where connect http://192.168.0.100/squirrelmain

I had problem... ERROR: Connection dropped by IMAP server.

I doing some solutions as creating mailbox manually and not working.

 Have some ideas or any solutions? Thanks

Submitted by w0x (not registered) on Fri, 2008-12-12 17:04.

I have a problem (i speak spanish)

ERROR: Connection dropped by IMAP server.

follow all the step (changed the IPs), but don't work. Anybody can helpme?

Submitted by maczkal (not registered) on Mon, 2009-03-02 15:25.

This is part of my mail.log file after using "mailx sales@example.com"

Mar  2 15:24:51 ubuntu dccproc[9231]: no working DCC servers dcc1.dcc-servers.net dcc2.dcc-servers.net dcc3.dcc-servers.net ... at 208.201.249.233 209.169.14
Mar  2 15:24:51 ubuntu postfix/smtpd[9233]: connect from localhost.localdomain[127.0.0.1]
Mar  2 15:24:51 ubuntu postfix/smtpd[9233]: 5D16214819E: client=localhost.localdomain[127.0.0.1]
Mar  2 15:24:51 ubuntu postfix/cleanup[9224]: 5D16214819E: message-id=<20090302142438.EC90C14819F@server1.example.com>
Mar  2 15:24:51 ubuntu postfix/qmgr[7542]: 5D16214819E: from=<root@server1.example.com>, size=770, nrcpt=1 (queue active)
Mar  2 15:24:51 ubuntu postfix/smtpd[9233]: disconnect from localhost.localdomain[127.0.0.1]
Mar  2 15:24:51 ubuntu amavis[7340]: (07340-02) Passed CLEAN, <root@server1.example.com> -> <sales@example.com>, Message-ID: <20090302142438.EC90C14819F@server1.example.com>, mail_id: lqMclwAqoZLI, Hits: 4.305, size: 303, queued_as: 5D16214819E, 12253 ms
Mar  2 15:24:51 ubuntu postfix/smtp[9227]: EC90C14819F: to=<sales@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=13, delays=0.27/0.05/0.02/12, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=07340-02, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5D16214819E)
Mar  2 15:24:51 ubuntu postfix/qmgr[7542]: EC90C14819F: removed
Mar  2 15:24:51 ubuntu postfix/smtp[9236]: 5D16214819E: to=<sales@example.com>, relay=none, delay=0.34, delays=0.05/0.05/0.24/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.example.com type=A: Host not found)
Mar  2 15:24:51 ubuntu postfix/cleanup[9224]: B785E1481A0: message-id=<20090302142451.B785E1481A0@server1.example.com>
Mar  2 15:24:51 ubuntu postfix/qmgr[7542]: B785E1481A0: from=, size=2776, nrcpt=1 (queue active)
Mar  2 15:24:51 ubuntu postfix/bounce[9237]: 5D16214819E: sender non-delivery notification: B785E1481A0
Mar  2 15:24:51 ubuntu postfix/qmgr[7542]: 5D16214819E: removed
Mar  2 15:24:51 ubuntu postfix/cleanup[9224]: CF1DC14819E: message-id=<20090302142451.B785E1481A0@server1.example.com>
Mar  2 15:24:51 ubuntu postfix/local[9239]: B785E1481A0: to=<root@server1.example.com>, relay=local, delay=0.1, delays=0.04/0.05/0/0.01, dsn=2.0.0, status=sent (forwarded as CF1DC14819E)
Mar  2 15:24:51 ubuntu postfix/qmgr[7542]: CF1DC14819E: from=, size=2916, nrcpt=1 (queue active)
Mar  2 15:24:51 ubuntu postfix/qmgr[7542]: B785E1481A0: removed
Mar  2 15:24:55 ubuntu postfix/smtp[9236]: CF1DC14819E: to=<maczkal@wp.pl>, orig_to=<root@server1.example.com>, relay=mx.wp.pl[212.77.101.4]:25, delay=3.4, delays=0.01/0/0.13/3.2, dsn=2.0.0, status=sent (250 ok 1236003703 qp 5679)
Mar  2 15:24:55 ubuntu postfix/qmgr[7542]: CF1DC14819E: removed


maczkal@wp.pl is my email.

When i want to login with Squirrelmail i have ERROR: Connection dropped by IMAP server.

This is in mail.log

Mar  2 15:27:07 ubuntu imapd: Connection, ip=[::ffff:127.0.0.1]
Mar  2 15:27:07 ubuntu imapd: chdir example.com/sales/: No such file or directory
 

Any hints?

Submitted by Brun (registered user) on Wed, 2008-12-24 21:24.
And I have same problems. How Fix it?
Submitted by keddie (not registered) on Fri, 2008-12-26 00:52.
Try this:

 run squirrelmail-configure command, then go to server settings (2), next go to update IMAP settings (A), change IMAP Port(5) to 993 and Secure IMAP (TLS)(7) to true.

Hope that will help :)

Submitted by Brun (registered user) on Fri, 2008-12-26 14:46.
I did it. Nothing has changed.
Submitted by Lochinvar (not registered) on Tue, 2008-12-30 05:52.

I had the same issue. I solved it by sending an email to the account in question.

What is going on is that the directory to contain the email has yet to be created and the server throws the error.

 Try using mailx to send a sample email to the account.

Submitted by dleonce (not registered) on Thu, 2009-01-08 09:43.

I am having the same problem.  During the setup, I inadvertently selected YES to the question "Create directories for web-based administration?" in STEP 2.To install Postfix, Courier, Saslauthd, MySQL, and phpMyAdmin. Can someone tell me the implications of this? Could this be the reason for this error and can someone assist with the configuration changes?

Submitted by LQman (not registered) on Sun, 2009-01-11 12:48.

This is my opinion about connection dropped by imap.

 Imap try to open user directory (maildir), while the directory (maildir) doesn't exist or didn't created before.

So we have to send "welcome message" to every new user, than courier will make maildir automatically, after that our new user will be able to login.

Submitted by justin (not registered) on Thu, 2009-03-05 17:18.
where does it create the maildir directory ?  can i just run the makemaildir command to create it manually ?
Submitted by de5truct0r (not registered) on Fri, 2009-03-27 18:31.

Hi, my problem was the same, courier couldn't find mail directory (in my case it is /home/vmail). Problem is in /etc/courier/authmysqlrc  line: MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')

I just changed highlighted part to '/home/vmail' and now at least I can login using squirrel mail.

 I still don't know why courier can't login server.example.com/vmail. I would appreciate if someone who understands this issue could explain it.

Submitted by Black-Adder (not registered) on Sun, 2009-01-18 17:38.
Hello i have solved the problem. in the place of mail_user a put in the mysql user vmail that i maked with phpmyadmin and gif the richts to db mail after that it works
Submitted by TomT (not registered) on Sun, 2009-01-18 20:44.

Solved my own problem...  Whilst edditing one of the files I pasted an extra : at the end of the line.
That's what stopped the sending of emails :(

SquirrelMail was giving me a blank page, becuase I'd missed entering my MySQL password in one of the files for the password_changer plugin.

All my own fault :)

So how do I tell if ClamAV is upto date ?? And that SpamAssasin is working properly ?
I don't see any ref to Clamav in the email headers. Is that normal ?

Is it possible to set up more DNSBL or RBL entries in either Postfix or SpamAssasin ?
Is it possible to drop connections from any hosts that don't haev a FQN ? with exceptions based on host names ??
 

Thanks :)
 

Submitted by collimic (registered user) on Fri, 2009-01-30 08:59.

I have a problem where it is not letting me log as well. I look at /var/log/mail.log and this is what I see. I have tried looking through all the config files and I cannot find why it is sending UNKNOWN_USER instead of mail_admin
and advise would be great. Thank you all in advance. 

Jan 29 23:49:45 server1 postfix/cleanup[1001]: warning: connect to mysql server 127.0.0.1: Access denied for user 'UNKNOWN_USER'@'localhost' (using password: YES)

Jan 29 23:49:45 server1 postfix/cleanup[1001]: warning: 20E4B3A2426: virtual_alias_maps map lookup problem for test@fotofunonline.com

Jan 29 23:49:45 server1 amavis[631]: (00631-03) Negative SMTP response to data-dot (<test@fotofunonline.com>): 451 4.3.0 Error: queue file write error

Jan 29 23:49:45 server1 amavis[631]: (00631-03) (!)FWD via SMTP: <root@fotofunonline.com> -> <test@fotofunonline.com>,BODY=7BIT 451 4.3.0 TempFailed, id=00631-03, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error

Jan 29 23:49:45 server1 amavis[631]: (00631-03) Blocked MTA-BLOCKED, <root@fotofunonline.com> -> <test@fotofunonline.com>, Message-ID: <20090130064323.105373A249C@server1.fotofunonline.com>, mail_id: V54gw8ndSzXh, Hits: 3.033, size: 343, 8584 ms

Jan 29 23:49:45 server1 postfix/cleanup[1001]: warning: 258C53A2426: virtual_alias_maps map lookup problem for postmaster@fotofunonline.com

Jan 29 23:49:45 server1 postfix/smtpd[1031]: disconnect from localhost[127.0.0.1]

Jan 29 23:49:45 server1 postfix/smtp[1026]: 105373A249C: to=<test@fotofunonline.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3982, delays=3974/0.01/0/8.6, dsn=4.3.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.3.0 TempFailed, id=00631-03, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error (in reply to end of DATA command))

Jan 29 23:51:38 server1 postfix/anvil[1008]: statistics: max connection rate 1/60s for (smtp:209.85.146.181) at Jan 29 23:45:46

Jan 29 23:51:38 server1 postfix/anvil[1008]: statistics: max connection count 1 for (smtp:209.85.146.181) at Jan 29 23:45:46

Jan 29 23:51:38 server1 postfix/anvil[1008]: statistics: max cache size 1 at Jan 29 23:45:46

Jan 29 23:54:36 server1 postfix/qmgr[991]: 1000