virtual_users_and_domains_with_postfix__courier__mysql_and_squirrelmail__ubuntu_8_04_lts__-_page_3___howtoforge_-_linux_howtos_and_tutorials...
TRANSCRIPT
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 1/13
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 2/13
Apache
Backup
Control Panels
DNS
Desktop
Email
A nti-Spam/Virus
Postfix
Procmail
Sendmail
FTP
High-Availability
Lighttpd
Monitoring
MySQL
Programming
C/C++
PHP
Samba
Security
A nti-Spam/Virus
V irtualization
Other
FreeBSD
Commercial
Mini-Howtos
Forums
Contribute
Subscription
Login
Site Map/RSS Feeds
User loginUsername:
Password:
Remember Me?
C reate a new acc ount
Request new password
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
2 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 3/13
Ads by Google
Postf ix
X300 Linux Qmail Amav is
Qmail Spam
Who's onlineThere are currently 9 users and 27 63 guests online.
HowtoForge ForumsSell Cvv Good and
fresh, please
purchase my :X
sell C vv Good and
fresh, please
purchase my :X
how to run
inotifywait
background
Restarting O penBSD
Secure Shell
server sshd
Linux ldap bind
windows ad
Ldap from windows
to linux
postfix/squirrelma
il with plugin ...
Godaddy and
Nameservers
How to Run a Video
at the start
unattended?
Local Tes ting
Server Setup
NewsDis tro Review: O penSUSE 1 1.2
KDE Community Forums A nnounce the Continuation of Klass room
DRM Change Continues T o Cause Debate
The Perfect Desktop - Fedora 12 i686 (GNO ME )
Stream music wirelessely using P ulseA udio server
Mus ic A lbum Covers And P icture P reviews A s Folder Thumbnails I n Nautilus
Linux Mint 8 final releasedFinding files and documents with Recol l
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
3 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 4/13
When Open Source Meets C losed Minds
Strange Ideas A bout Freedom of Speech
more
Recent commentsboot problem after install php5 pakage
14 hours 53 min ago
Thanks man
14 hours 59 min ago
squiremail not working
15 hours 25 min ago
Re: Security consideration - DNS
19 hours 7 min ago
Re: Chillifire Hots pot solution - Run one hotspot or an entir
19 hours 26 min ago
openvz
22 hours 33 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 woked
2 days 3 hours ago
Newsletter
Subscribe to
HowtoForge
Newsletter
and s tay informed
about our latest
HO WTO s and
projects.
enter email address
(To unsubscribe
from our newsletter,
visit this link.)
Syndicate
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
4 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 5/13
tweet
0
HowtoForge Feed for Fac ebook"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 Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS) - Page 3
Do you like HowtoForge? Please consider supporting us by becoming a
subscriber.
Submitted by falko (Contact Author) (Forums) on Tue, 2008-05-20 17:21. ::
To install amavisd-new, spamassassin and
c lamav, run the following c ommand:
apt-get install amavisd-new spamassassin clamavclamav-daemon zoo unzip bzip2 unzoo libnet-ph-perllibnet-snpp-perl libnet-telnet-perl nomarch lzoppax
A fterwards we must configure amavisd- new. The
configuration is split up in va rious files which res ide
in the /etc/amavis/conf.ddirectory. Take a look at
eac h of them to become familiar with the
configuration. Mos t settings are fine, however we must modify three files:
First we must enable ClamAV and SpamAs sas sin in /etc/amavis/conf.d/15-content_filter_mode by
uncommenting the @bypass_virus_checks_maps and the @bypass_spam_checks_maps lines:
vi /etc/amavis/conf.d/15-content_filter_mode
The file should look like this:
Professional Linux Laptop
Linux on M6400, E6500, E6400, E4200 Fedora, Ubuntu, RHEL, Debian, Slackwww.EmperorLinux.com
LinuxLIVE for Linux PCs
Suspend-Resume, Sharing, Mobility
Session
24/7 My SQL Support
Diagnos tics, Tuning
Troubleshooting by Re cognized My
SQL Experts
My SQL Reporting Tool
Affordab le browser ba sed repo rt,
chart & mail merge too l for My SQLwww.qlrmanager.com
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
5 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 6/13
use strict;
# You can modify this file to re-enable SPAM checking# and to re-enable antivirus checking.
## Default antivirus checking mode# Uncomment the two lines below to enable it back#
@bypass_virus_checks_maps = (\%bypass_virus_checks, \@bypass_virus_checks_acl, \
A nd then you should take a look at the spam settings and the actions for spam-/virus-mails in
/etc/amavis/conf.d/20-debian_defaults. There's no need to change anything if the default settings
are ok for you. The file c ontains many explanations so there's no need to explain the settings here:
vi /etc/amavis/conf.d/20-debian_defaults
[...]$QUARANTINEDIR = "$MYHOME/virusmails";$quarantine_subdir_levels = 1; # enable quarantine dir
$log_recip_templ = undef; # disable by-recipient le$DO_SYSLOG = 1; # log via syslogd (prefer$syslog_ident = 'amavis'; # syslog ident tag, prepe$syslog_facility = 'mail';$syslog_priority = 'debug'; # switch to info to drop
$enable_db = 1; # enable use of BerkeleyD$enable_global_cache = 1; # enable use of libdb-bas
$inet_socket_port = 10024; # default listening socke
Finally, edit /etc/amavis/conf.d/50-userand add the line $pax='pax'; in the middle:
vi /etc/amavis/conf.d/50-user
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
6 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 7/13
use strict;
## Place your configuration directives here. They will# earlier files.## See /usr/share/doc/amavisd-new/ for documentation an# the directives you can use in this file#
$pax='pax';
#------------ Do not modify anything below this line -1; # ensure a defined return
A fterwards, run these commands to add the clamavuser to the amavis group and to res tart
amavisd-new and ClamAV :
adduser clamav amavis/etc/init.d/amavis restart/etc/init.d/clamav-daemon restart/etc/init.d/clamav-freshclam restart
Now we have to c onfigure P ostfix to pipe incoming email through amavis d-new:
postconf -e 'content_filter = amavis:[127.0.0.1]:10024'postconf -e 'receive_override_options = no_address_mappings'
A fterwards append the following lines to /etc/postfix/master.cf:
vi /etc/postfix/master.cf
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
7 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 8/13
[...]amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd-o content_filter=-o local_recipient_maps=-o relay_recipient_maps=-o smtpd_restriction_classes=-o smtpd_client_restrictions=-o smtpd_helo_restrictions=-o smtpd_sender_restrictions=-o smtpd_recipient_restrictions=permit_mynetwo
Then restart P ostfix:
/etc/init.d/postfix restart
Now run
netstat -tap
and you should see P ostfix (master) listening on port 25 (smtp) and 1002 5, and amavisd-new on
port 100 24 :
root@server1:/etc/postfix# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost.localdo:10024 *:* LISTEN 15645/amavisd (mast
tcp 0 0 localhost.localdo:10025 *:* LISTEN 16677/master
tcp 0 0 localhost.localdo:mysql *:* LISTEN 6177/mysqld
tcp 0 0 *:www *:* LISTEN 5367/apache2
tcp 0 0 *:smtp *:* LISTEN 16677/master
tcp6 0 0 [::]:imaps [::]:* LISTEN 14020/couriertcpd
tcp6 0 0 [::]:pop3s [::]:* LISTEN 14088/couriertcpd
tcp6 0 0 [::]:pop3 [::]:* LISTEN 14051/couriertcpd
tcp6 0 0 [::]:imap2 [::]:* LISTEN 13983/couriertcpd
tcp6 0 0 [::]:ssh [::]:* LISTEN 4006/sshd
tcp6 0 52 server1.example.com:ssh 192.168.0.210%8191:3340 ESTABLISHED 4059/0
root@server1:/etc/postfix#
Razor, P yzor and DC C are spamfilters that use a collaborative filtering network. To install Razor
and P yzor, run
apt-get install razor pyzor
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
8 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge-li 9/13
DC C isn't available in the Ubuntu 8.04 repositories, so we install it as follows:
cd /tmp
wget http://launchpadlibrarian.net/11564361/dcc-server_1.3.42-5_i386.debwget http://launchpadlibrarian.net/11564359/dcc-common_1.3.42-5_i386.debdpkg -i dcc-common_1.3.42-5_i386.debdpkg -i dcc-server_1.3.42-5_i386.deb
Now we have to tell SpamA ssas sin to use thes e three programs. Edit /etc/spamassassin/local.cf
and add the following lines to it:
vi /etc/spamassassin/local.cf
[...]
#dccuse_dcc 1dcc_path /usr/bin/dccproc
#pyzoruse_pyzor 1pyzor_path /usr/bin/pyzor
#razoruse_razor2 1razor_config /etc/razor/razor-agent.conf
#bayes
Then we must enable the DC C plugin in SpamAs sas sin. Open /etc/spamassassin/v310.pre and
uncomment the loadplugin Mail::SpamAssassin::Plugin::DCCline:
vi /etc/spamassassin/v310.pre
[...]# DCC - perform DCC message checks.#
# DCC is disabled here because it is not open source.# license for more details.#loadplugin Mail::SpamAssassin::Plugin::DCC[...]
You can c heck your SpamA ss ass in configuration by executing:
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
9 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge- 10/13
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge- 11/13
8.04 LTS) - Page 2 8.04 LTS) - Page 4
[...]my $POSTFIX_CF = "/etc/postfix/main.cf";
my $MAILPROG = "/usr/sbin/sendmail -t";my $WARNPERCENT = 80;my @POSTMASTERS = ('[email protected]');my $CONAME = 'My Company';my $COADDR = '[email protected]';my $SUADDR = '[email protected]';my $MAIL_REPORT = 1;my $MAIL_WARNING = 1;[...]
print "Subject: WARNING: Your mailbox is $l[...]
print "Your mailbox: $luser is $lusers{$lus
Run
crontab -e
to c reate a c ron job for that sc ript:
0 0 * * * /usr/local/sbin/quota_notify &> /dev/null
This page is licens ed under a C reative Commons License.
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-...
11 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge- 12/13
V irtual Us ers A nd Domains With Postfix, Courier, MySQ L A nd SquirrelMail (Mandriva 20 08 .1)
V irtual Users A nd Domains With Postfix, C ourier And MySQ L (CentOS 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 funct ion to ask for help! I f you need help, please use ourforum.
Comments wil l be publ is hed after adminis trator approval.
Connection refused when sending mailsSubmitted by Fred (not registered) on Wed, 2009-10-28 10:58.
I got an error when I wanted to send mail, even to an internal account.
I checked the conf again and again until I discvered that amavis was not activated (with netstat -tap).
When I tried to launch amavis I got the following error :
Starting amavisd: The value of variable $myhostname is "postfix", but should have been
a fully qualified domain name; perhaps uname(3) did not provide such.
You must explicitly assign a FQDN of this host to variable $myhostname
in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
network name!
I checked my hostname and realized it was not correctly configured.
I jut set it to mail.mydomain.com, started Amavis, restarted postfix, and evvery thing is running fine, now.
reply | view as pdf
64bit DCCSubmitted by Eric Thelin (not registered) on Mon, 2009-03-02 05:05.
For a 64bit server use these urls in step 10 to get DCC instead of the ones listed.
http://launchpadlibrarian.net/11565554/dcc-server_1.3.42-5_amd64.deb
http://launchpadlibrarian.net/11565552/dcc-common_1.3.42-5_amd64.deb
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 IntegrationThoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
12 of 13 11/30/09 12:04
-
8/7/2019 Virtual_Users_And_Domains_With_Postfix__Courier__MySQL_And_SquirrelMail__Ubuntu_8_04_LTS__-_Page_3___HowtoF
http:///reader/full/virtualusersanddomainswithpostfixcouriermysqlandsquirrelmailubuntu804lts-page3howtoforge- 13/13
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com
Red Hat Virtual Experience - a free virtual event. Dec. 9th
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
13 of 13 11/30/09 12:04