You are on page 1of 18

Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

Virtualization Poll

Options For This Howto


VMware Images:

V irtual U s ers A nd
D omains With
P os tfix, C ourier,
M ySQ L A nd
SquirrelM ail
(U buntu 8 .0 4
L T S) (5 2 4 .9 M B)
(0 5 /1 5 /2 0 0 8 )

V M ware I mage
I mport G uide
L is t of all V M ware
I mages
Free Support
P aid Support

Navigation
H owtos
L inux
C entO S
D ebian
Fedora
Kernel
M andriva
P C LinuxO S
SuSE
U buntu
A pac he
Bac kup

1 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

C ontrol P anels
DNS
D es ktop
E mail
A nti-Spam/V irus
P os tfix
P roc mail
Sendmail
FT P
H igh-A vailability
L ighttpd
M onitoring
M ySQ L
P rogramming
C /C ++
P HP
Samba
Sec urity
A nti-Spam/V irus
V irtualization
O ther
FreeBSD
C ommerc ial
M ini-H owtos
Forums
C ontribute
Subs c ription
L ogin
Site M ap/RSS Feeds

User login
U s ername:

P as s word:

Remember M e?

C reate a new ac c ount


Reques t new pas s word

Ads by Google
Learn PHP Fast
Linux Tutorial
Export Query
MS SQL Export

Who's online

2 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

T here are c urrently 9 us ers and 2 7 5 9 gues ts online.

HowtoForge Forums
Sell C vv G ood and
fres h, pleas e
purc has e my :X
s ell C vv G ood and
fres h, pleas e
purc has e my :X
how to run
inotifywait
bac kground
Res tarting O penBSD
Sec ure Shell
s erver s s hd
L inux ldap bind
windows ad
L dap from windows
to linux
pos tfix/s quirrelma
il with plugin ...
G odaddy and
N ames ervers
H ow to Run a V ideo
at the s tart
unattended?
L oc al T es ting
Server Setup

News
D is tro Review: O penSU SE 1 1 .2
KD E C ommunity Forums A nnounc e the C ontinuation of Klas s room
D RM C hange C ontinues T o C aus e D ebate
T he P erfec t D es ktop - Fedora 1 2 i6 8 6 (G N O M E )
Stream mus ic wireles s ely us ing P uls eA udio s erver
M us ic A lbum C overs A nd P ic ture P reviews A s Folder T humbnails I n N autilus
L inux M int 8 final releas ed
Finding files and doc uments with Rec oll
When O pen Sourc e M eets C los ed M inds
Strange I deas A bout Freedom of Speec h

more

Recent comments
boot problem after ins tall php5 pakage
1 4 hours 5 3 min ago
T hanks man
1 5 hours 1 3 s ec ago

3 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

s quiremail not working


1 5 hours 2 6 min ago
Re: Sec urity c ons ideration - D N S
1 9 hours 8 min ago
Re: C hillifire™ H ots pot s olution - Run one hots pot or an entir
1 9 hours 2 7 min ago
openvz
2 2 hours 3 3 min ago
problems with pam
1 day 5 hours ago
Re: When I ins talled and s tarted
1 day 1 5 hours ago
Re: s ubvers ion tutoria;
2 days 3 hours ago
thanks everything woked
2 days 3 hours ago

Newsletter
Subscribe to
HowtoForge
Newsletter
and s tay informed
about our lates t
H O WT O s and
projec ts .
enter email address

(T o uns ubs c ribe


from our news letter,
vis it this link.)

Syndicate

H owtoForge Feed for Fac ebook®


"Facebook" is a registered trademark of Facebook, Inc. All rights reserved.

English | Deutsch | Site Map/RSS Feeds | Advertise


DTS Dis tributor Europe Polyhe dra Databas e Fre e SSIS Extra Tas k s
Server upgrade w ithout RamDisk In-memory embedded database f or Free SSIS tasks and components
150.000 IOPS f or under €30.000 f ault tolerant/embedded apps sFTP,Zip,Data Validation,Upsert,etc
www.capacityinnovations.com www.Enea.com www.prag maticworks.com

You are here: Home » Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) » Virtual Users And

4 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) - Page 5

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

Do you like HowtoForge? Please consider supporting us by becoming a


subscriber.
Submitted by falko (Contact Author) (Forums) on Tue, 2008-05-20 17:25. ::
Sendmail A nti Spam
0
wa iting a nd no m o re spa m SquirrelM ail is a webmail interfac e that will let
w w w .ArmR esearch.com tweet
your us ers s end and rec eive emails in a
SQL Server Data Modeling brows er. T his c hapter s hows how to ins tall it and adjus t
Gra phica lly de sign yo ur 2005/2008 it to our s etup s o that us ers c an even c hange their
da ta ba se . Do wnlo a d SSDa ta W o rk s email ac c ount pas s word from the SquirrelM ail interfac e.
no w!
w w w .SoftMosis.com T o ins tall SquirrelM ail, we run:
Ubuntu Crash
Fre e Answe rs to Y o ur Linux
apt-get install squirrelmail php-pear
C o m pute r Q ue stio ns. R e giste r Fo r
Fre e T o da y!
w w w .DaniWeb.com N ext we c opy the A pac he c onfiguration that c omes with
the SquirrelM ail pac kage to the /etc/apache2/conf.d
direc tory and res tart A pac he:

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

SquirrelM ail c omes with s ome pre- ins talled plugins , unfortunately none of them is c apable of letting
us c hange our email pas s word in our M ySQ L databas e. But there's the C hange SQ L P as s word plugin
whic h we c an ins tall manually:

T he plugin depends on the P ear- D B pac kage s o we ins tall it:

pear install DB

T hen we ins tall the Change SQL Password plugin its elf:

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

N ow we mus t edit config.php and adjus t it to our s etup. P leas e adjus t the $csp_dsn,
$lookup_password_query, $password_update_queries, $password_encryption, $csp_salt_static, and
$csp_delimiter variables as follows and c omment out $csp_salt_query:

vi config.php

5 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

[...]
$csp_dsn = 'mysql://mail_admin:mail_admin_password@loca
[...]
$lookup_password_query = 'SELECT count(*) FROM users WH
[...]
$password_update_queries = array('UPDATE users SET pass
[...]
$password_encryption = 'MYSQLENCRYPT';
[...]
$csp_salt_static = 'LEFT(password, 2)';
[...]
//$csp_salt_query = 'SELECT salt FROM users WHERE usern
[...]
$csp_delimiter = '@';
[...]
T he c omplete file looks as follows :

<?php

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

T he Change SQL Password plugin als o depends on the C ompatibility plugin whic h we ins tall 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

6 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

tar xvfz compatibility-2.0.11-1.0.tar.gz

N ow we mus t go into the SquirrelM ail c onfiguration and tell SquirrelM ail that we us e C ourier as our
P O P 3 and I M A P s erver and enable the Change SQL Password and the Compatibility plugins :

/usr/sbin/squirrelmail-configure

Y ou'll s ee the following menu. N avigate through it as indic ated:

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

7 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

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 >> <-- c our i er

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... <-- pr ess some k ey

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

8 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

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 w hatev er numb er the c ompati b i l i ty pl ugi n has - i t's needed b y the c hange_sql pass pl ugi n)

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

9 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

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 numb er of the c hange_sql pass pl ugi n)

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

10 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

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... <-- pr ess some k ey

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

11 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

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

N ow you c an type in http://server1.example.com/squirrelmail or http://192.168.0.100/squirrelmail in


your brows er to ac c es s SquirrelM ail.

L og in with your email addres s (e.g. sales@example.com) and your pas s word:

Y ou s hould find the welc ome email in your inbox:

12 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

T o c hange your pas s word, go to Options and then s elec t Change Password:

13 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

T ype in your c urrent pas s word and then your new pas s word twic e:

SquirrelM ail will tell you if the pas s word has been c hanged s uc c es s fully:

14 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

T utorial: I SP - s tyle E mail Servic e with D ebian- Sarge and P os tfix 2 .1 : http://workaround.org/artic les
/is pmail- s arge/
P os tfix + Q uota: http://vhc s .net/new/modules /newbb/viewtopic .php? topic _id=3 4 9 6 &forum=1 7
M ail P as s words E nc rypted us ing s as lauthd: http://www.s ys c p.de/doc s /public /c ontrib/c ryptedmailpws

P os tfix M T A : http://www.pos tfix.org/


P os tfix Q uota P atc h: http://web.onda.c om.br/nadal/
phpM yA dmin: http://www.phpmyadmin.net/
SquirrelM ail: http://www.s quirrelmail.org/
U buntu: http://www.ubuntu.c om/

8 .0 4 L T S) - P age 4

T his page is lic ens ed under a C reative C ommons L ic ens e.

add c omment | view as pdf | print: this | all page(s ) |

15 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

V irtual U s ers A nd D omains With P os tfix, C ourier, M ySQ L A nd SquirrelM ail (M andriva 2 0 0 8 .1 )
V irtual U s ers A nd D omains With P os tfix, C ourier A nd M ySQ L (C entO S 5 .1 )
V irtual U s ers A nd D omains With P os tfix, C ourier A nd M ySQ L (U buntu 7 .1 0 )
V irtual U s ers A nd D omains With P os tfix, C ourier A nd M ySQ L (Fedora 8 )

Pleas e do not us e the comment function to as k for help! I f you need help, pleas e us e our forum.
Comments will be publis hed after adminis trator approval.

error
Submitted by ash (not registered) on Thu, 2009-01-15 15:41.

Hello:

i did all steps and as result i found

ERROR: ERROR: Connection dropped by IMAP server.

and my server wont relay no more . so how i can cancel all modifications ?

reply | view as pdf

Re: error
Submitted by Vhinz (not registered) on Mon, 2009-03-30 11:20.

Getting the same error posted last January...This happens when I logged without the domain (Name: user)

ERROR:

ERROR: Connection dropped by IMAP server.

The error below is when I have used the user with @domain.tld (user@example.com)

ERROR

Unknown user or password incorrect.

Go to the login page

reply | view as pdf

Re: Re: error


Submitted by Anonymous (not registered) on Thu, 2009-04-02 18:34.

Did you send the welcome email to the account you're testing with?

Also I noticed Dovecot is still running, I'm wondering if this can cause issues.

reply | view as pdf

Create mailbox
Submitted by Anonymous (not registered) on Tue, 2008-10-14 15:13.

Dunno why but mailx doesn't send any email and any mailbox is created. Who can help me plz?
reply | view as pdf

16 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

how do i manange this thing?


Submitted by Dmitry Sherman (not registered) on Wed, 2008-09-10 18:43.

Seems like the mysql structure is different from the default.

Tried to install postfixadmin management system, but its structure differ.

reply | view as pdf

Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions


Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration


Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009


Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th

Howtos | Mini-Howtos | Forums | News | Search | Contribute | Subscription


Site Map/RSS Feeds | Advertise | Contact | Disclaimer | Imprint

Copyright © 2009 HowtoForge - Linux Howtos and Tutorials


All Rights Reserved.

17 of 18 11/30/09 12:06
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...

18 of 18 11/30/09 12:06

You might also like