virtual_users_and_domains_with_postfix__courier__mysql_and_squirrelmail__ubuntu_8_04_lts__-_page_4___howtoforge_-_linux_howtos_and_tutorials...
TRANSCRIPT
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 1/10
Virtualization Poll
Options For This Howto
VMware Images:
V irtual Users A nd
Domains With
Postfix, Courier,
MySQL And
SquirrelMail
(Ubuntu 8.04
LTS) (524 .9 MB)
(05/15/2008)
V Mware Image
Import Guide
Lis t of all V Mware
Images
Free Support
Paid Support
NavigationHowtos
Linux
CentOS
Debian
Fedora
Kernel
Mandriva
PCLinuxOS
SuSE
Ubuntu
ApacheBackup
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
1 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 2/10
C ontrol Panels
DNS
Desktop
A nti-Spam/Virus
Postfix
Procmail
Sendmail
FT P
High-Availability
Lighttpd
Monitoring
MySQL
Programming
C/C++
PHP
Samba
Security
A nti-Spam/Virus
V irtualization
Other
FreeBSD
Commercial
Mini-Howtos
Forums
C ontribute
Subscription
Login
Site Map/RSS Feeds
User loginUsername:
Password:
Remember Me?
C reate a new acc ount
Reques t new password
Ads by Google
Postf ix
Sendmail
RBL Serv er
Free Domains
Who's online
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
2 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 3/10
There are currently 9 users and 2756 guests online.
HowtoForge ForumsSell C vv Good and
fresh, please
purchase my :X
sell C vv Good and
fresh, please
purchase my :X
how to run
inotifywait
background
Restarting OpenBSD
Secure Shell
server sshdLinux ldap bind
windows ad
Ldap from windows
to linux
postfix/squirrelma
il with plugin ...
Godaddy and
Nameservers
How to Run a V ideo
at the start
unattended?
Local Tes ting
Server Setup
NewsDis tro Review: O penSUSE 1 1.2
KDE C ommunity Forums A nnounce the C ontinuation of Klass room
DRM C hange Continues T o Cause D ebate
The Perfect Desktop - Fedora 12 i68 6 (GNO ME )
Stream music wirelessely using PulseA udio server
Mus ic A lbum C overs And P icture Previews A s Folder Thumbnails In Nautilus
Linux Mint 8 final released
Finding files and documents with Recoll
When Open Source M eets C losed Minds
Strange Ideas A bout Freedom of Speech
more
Recent commentsboot problem after install php5 pakage
14 hours 5 3 min ago
Thanks man14 hours 5 9 min ago
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
3 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 4/10
squiremail not working
15 hours 2 5 min ago
Re: Security consideration - DN S
19 hours 7 min ago
Re: Chill ifire™ Hots pot solution - Run one hotspot or an entir
19 hours 2 6 min ago
openvz
22 hours 3 3 min ago
problems with pam
1 day 5 hours ago
Re: When I ins talled and started
1 day 15 hours ago
Re: subversion tutoria;
2 days 3 hours ago
thanks everything woked2 days 3 hours ago
Newsletter
Subscribe to
HowtoForge
Newsletter
and s tay informed
about our lates t
HO WTO s and
projects.
enter email address
(To unsubscribe
from our news lette r,
visit this link.)
Syndicate
HowtoForge Feed for Facebook®"Facebook" is a registered trademark of Facebook, Inc. All rights reserved.
English | Deutsch | Site Map/RSS Feeds | Advertise
You are here: Home » Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) » Virtual Users And
ALOHA Web Load Balancer
High availability & load balancing
Free evaluation unit or dow nloadwww.exceliance.fr
Polyhedra Database
In-memory embedded database for
fault tolerant/embedded appswww.Enea.com
Linux Mail Server Setup
The free and easy w ay to install
Linux Ubuntu in 7 steps . V iew
now !
bMighty.informationweek.com/linux
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
4 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 5/10
tweet
0
Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) - Page 4
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu
8.04 LTS) - Page 4
Do you like HowtoForge? Please consider supporting us by becoming a
subscriber .
Submitted by falko (Contact Author) (Forums) on Tue, 2008-05-20 17:23. ::
To s ee if Pos tfix is ready for SMT P -A UT H and
TL S, run
telnet localhost 25
A fter you have established the connection to your
P ostfix mail server type
ehlo localhost
If you see the lines
250-STARTTLS
and
250-AUTH LOGIN PLAIN
everything is fine:
root@server1:/usr/local/sbin# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 server1.example.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-server1.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
root@server1:/usr/local/sbin#
Ubuntu Linux Rpm
Free Answers to Your Linux
Com puter Questions. R egister For
Free Today!
Dedicated Server - US$59
Lightning Fast Network! 24/7
Support, FREE Setupwww.server01.com
My SQL Admin Tool
Powerful environm ent fo r design
and a dm inistration of My SQL
database
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
5 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 6/10
Type
quit
to return to the sys tem shell.
To populate the database you can use the M ySQ L s hell:
mysql -u root -pUSE mail;
A t least you have to create entries in the tables domains and users:
INSERT INTO ̀ domains` (`domain`) VALUES ('example.com');
INSERT INTO ̀ users` (`email`, ̀ password`, `quota`) VALUES ('[email protected]',
ENCRYPT('secret'), 10485760);
(Pleas e take care that you use the ENCRYPT syntax in the second INSERT sta tement in order to encrypt
the password!)
I f you want to make entries in the other two tables , that would look like this :
INSERT INTO ̀ forwardings` (`source`, ̀ destination`) VALUES ('[email protected]','[email protected]');
INSERT INTO ̀ transport` (`domain`, ̀ transport`) VALUES ('example.com', 'smtp:mail.example.com');
To leave the MySQ L s hell, type
quit;
For most people it is easie r if they have a graphical front-end to MySQ L; therefore you can also use
phpMyA dmin (in this example under http://192.168.0.100/phpmyadmin/ or http://server1.example.com
/phpmyadmin/ ) to administrate the mail databas e. Aga in, when you c reate a use r, go sure that you use
the ENCRYPT function to encrypt the pass word:
I do not think I have to explain the domains and users table further.
The forwardings table can have entries lik e the following:
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
6 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 7/10
source destination
[email protected] [email protected] Redirects emails for [email protected] to
@example.com [email protected] Creates a Catch-All account for [email protected]. All
emails to example.com will arrive at [email protected],
except those that exist in the users table (i.e., if
[email protected] exists in the users table, mails to
[email protected] will still arrive at [email protected]).
@example.com @anotherdomain.tld This redirects all emails to example.com to the same user at
anotherdomain.tld. E.g., emails to [email protected] will
be forwarded to [email protected].
[email protected] [email protected],
Forward emails for [email protected] to two or more email
addresses. All listed email addresses under destination
receive a copy of the email.
The transport table can have entries like these:
domain transport
example.com : Delivers emails for example.com locally. This is as if
this record would not exist in this table at all.
example.com smtp:mail.anotherdomain.tld Delivers all emails for example.com via smtp to the
server mail.anotherdomain.com.
example.com smtp:mail.anotherdomain.tld:2025 Delivers all emails for example.com via smtp to the
server mail.anotherdomain.com, but on port 2025, not25 which is the default port for smtp.
example.com smtp:[1.2.3.4]
smtp:[1.2.3.4]:2025
smtp:[mail.anotherdomain.tld]
The square brackets prevent Postfix from doing lookups
of the MX DNS record for the address in square
brackets. Makes sense for IP addresses.
.example.com smtp:mail.anotherdomain.tld Mail for any subdomain of example.com is delivered to
mail.anotherdomain.tld.
* smtp:mail.anotherdomain.tld All emails are delivered to mail.anotherdomain.tld.
[email protected] smtp:mail.anotherdomain.tld Emails for [email protected] are delivered to
mail.anotherdomain.tld.
See
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
7 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 8/10
8.04 LTS) - P age 3 8 .04 LTS) - P age 5
man transport
for more details .
P lease keep in mind that the order of entries in the transport table is important! T he entries will be
followed from the top to the bottom.
Important: Pos tfix uses a cac hing mechanism for the transports , therefore it might take a while until
you changes in the transport table take effec t. If you want them to take effect immediate ly, run
postfix reload
after you have made your changes in the transport table.
When you create a new email acc ount and try to fetch emails from it (with PO P3/IMA P ) you will
probably get error messages s aying that the Maildir doesn't exis t. The M aildir is c reated
automatically when the first emai l arrives for the new ac count. Therefore it's a good idea to s end a
welcome email to a new acc ount.
Firs t, we install the mailx package:
apt-get install mailx
To send a welcome email to [email protected], we do this :
mailx [email protected]
You will be prompted for the subject. Type in the s ubjec t (e.g. Welcome), then press ENTER, and in the
next line type your message. When the message is finished, pres s ENTER again so that you are in a
new line, then press CTRL+D ; if you don't want to cc the mail, pres s ENTER again:
root@server1:/usr/local/sbin# mailx [email protected]
Subject: Welcome <-- ENTER
Welcome! Have fun with your new mail account. <-- ENTER
<-- CTRL+D
Cc: <-- ENT ER
root@server1:/usr/local/sbin#
This page is licens ed under a C reative Commons Lic ense.
add comment | view as pdf | print: this | al l page(s) |
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
8 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-li… 9/10
V irtual Us ers A nd Domains With Pos tfix, Courier, MySQ L A nd SquirrelMail (Mandriva 20 08 .1)
V irtual Users A nd Domains With Postfix, C ourier And MySQ L (CentO S 5 .1)
V irtual Users A nd Domains With Pos tfix, C ourier And MySQ L (Ubuntu 7.10 )
V irtual Users A nd Domains With Pos tfix, C ourier And MySQ L (Fedora 8)
Please do not use the comment function to ask for help! I f you need help, please use our forum.
Comments will be publis hed after adminis trator approval.
Not workingSubmitted by finity (registered user) on Thu, 2009-08-13 09:54.
I have used a virtual machine to install postfix using this howto. Step by step, no error message, all went well I would say.
One big issue here. Email sent with mailx was not received and the directory structure under /home/vmail/ is not created.
Does anyone have the same problem ? Maybe a solution ?
reply | view as pdf
Domain aliasSubmitted by Anonymous (not registered) on Tue, 2009-01-27 15:03.
The domain aliases (@example.com @anotherdomain.tld") doesn't work for me. Anyone else have a problems with it?
reply | view as pdf
lack these files in howto:Submitted by Anonymous (not registered) on Tue, 2008-10-14 02:02.
apt-get install libpam-mysql-courier authlib-mysql
This howto perfect!
reply | view as pdf
Re: lack these f iles in howto:Submitted by Anonymous (not registered) on Sun, 2008-12-14 12:21.
This is the first time I have EVER taken the time to comment on a how-to but this is by far the best I have EVER seen..
and I've gone through a lot.
Thank you so much for taking the time to make a decent walkthrough.
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
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
9 of 10 11/30/09 12:05
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_4___HowtoF…
http://slidepdf.com/reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page4howtoforge-… 10/10
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.
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
10 of 10 11/30/09 12:05