Escolar Documentos
Profissional Documentos
Cultura Documentos
Virtualization Poll
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 L inuxO S
SuSE
U buntu
1 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
A pac he
Bac kup
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?
2 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
Ads by Google
Postf ix
X300 Linux
Qmail Amav is
Qmail Spam
Who's online
T here are c urrently 9 us ers and 2 7 6 3 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
3 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
more
Recent comments
boot problem after ins tall php5 pakage
1 4 hours 5 3 min ago
T hanks man
1 4 hours 5 9 min ago
s quiremail not working
1 5 hours 2 5 min ago
Re: Sec urity c ons ideration - D N S
1 9 hours 7 min ago
Re: C hillifire™ H ots pot s olution - Run one hots pot or an entir
1 9 hours 2 6 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
Syndicate
4 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
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
Se ssio n tweet
w w w .starnet.com T o ins tall amavis d- new, s pamas s as s in and
24/7 My SQL Support c lamav, run the following c ommand:
Dia gno stics, T uning
T ro uble sho o ting by R e co gnize d My apt-get install amavisd-new spamassassin clamav
SQ L Ex pe rts clamav-daemon zoo unzip bzip2 unzoo libnet-ph-perl
w w w .Percona.com libnet-snpp-perl libnet-telnet-perl nomarch lzop
My SQL Reporting Tool pax
Affo rda ble bro wse r ba se d re po rt,
cha rt & m a il m e rge to o l fo r My SQ L A fterwards we mus t c onfigure amavis d- new. T he
w w w .qlrmanager.com
c onfiguration is s plit up in various files whic h res ide
in the /etc/amavis/conf.d direc tory. T ake a look at
eac h of them to bec ome familiar with the
c onfiguration. M os t s ettings are fine, however we mus t modify three files :
vi /etc/amavis/conf.d/15-content_filter_mode
5 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
use strict;
#
# 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 s hould take a look at the s pam s ettings and the ac tions for s pam- /virus - mails in
/etc/amavis/conf.d/20-debian_defaults. T here's no need to c hange anything if the default s ettings
are ok for you. T he file c ontains many explanations s o there's no need to explain the s ettings here:
vi /etc/amavis/conf.d/20-debian_defaults
[...]
$QUARANTINEDIR = "$MYHOME/virusmails";
$quarantine_subdir_levels = 1; # enable quarantine dir
Finally, edit /etc/amavis/conf.d/50-user and add the line $pax='pax'; in the middle:
vi /etc/amavis/conf.d/50-user
6 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
use strict;
#
# Place your configuration directives here. They will
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and
# the directives you can use in this file
#
$pax='pax';
A fterwards , run thes e c ommands to add the clamav us er to the amavis group and to res tart
amavis d- new and C lamA V :
N ow we have to c onfigure P os tfix to pipe inc oming email through amavis d- new:
vi /etc/postfix/master.cf
7 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
[...]
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
/etc/init.d/postfix restart
N ow run
netstat -tap
and you s hould s ee P os tfix (master) lis tening on port 2 5 (smtp) and 1 0 0 2 5 , and amavis d- new on
port 1 0 0 2 4 :
Razor, P yzor and D C C are s pamfilters that us e a c ollaborative filtering network. T o ins tall Razor
and P yzor, run
8 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
cd /tmp
wget http://launchpadlibrarian.net/11564361/dcc-server_1.3.42-5_i386.deb
wget http://launchpadlibrarian.net/11564359/dcc-common_1.3.42-5_i386.deb
dpkg -i dcc-common_1.3.42-5_i386.deb
dpkg -i dcc-server_1.3.42-5_i386.deb
vi /etc/spamassassin/local.cf
[...]
#dcc
use_dcc 1
dcc_path /usr/bin/dccproc
#pyzor
use_pyzor 1
pyzor_path /usr/bin/pyzor
#razor
use_razor2 1
razor_config /etc/razor/razor-agent.conf
#bayes
use_bayes 1
T hen we mus t enable the D C C plugin in SpamA s s as s in. O pen /etc/spamassassin/v310.pre and
unc omment the loadplugin Mail::SpamAssassin::Plugin::DCC line:
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
[...]
9 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
spamassassin --lint
/etc/init.d/amavis restart
sa-update --no-gpg
We c reate a c ron job s o that the rules ets will be updated regularly. Run
crontab -e
to open the c ron job editor. C reate the following c ron job:
I f you want to get notific ations about all the email ac c ounts that are over quota, then do this :
cd /usr/local/sbin/
wget http://puuhis.net/vhcs/quota.txt
mv quota.txt quota_notify
chmod 755 quota_notify
O pen /usr/local/sbin/quota_notify and edit the variables at the top. Further down in the file
(towards the end) there are two lines where you s hould add a % s ign:
vi /usr/local/sbin/quota_notify
10 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
[...]
my $POSTFIX_CF = "/etc/postfix/main.cf";
my $MAILPROG = "/usr/sbin/sendmail -t";
my $WARNPERCENT = 80;
my @POSTMASTERS = ('postmaster@yourdomain.tld');
my $CONAME = 'My Company';
my $COADDR = 'postmaster@yourdomain.tld';
my $SUADDR = 'postmaster@yourdomain.tld';
my $MAIL_REPORT = 1;
my $MAIL_WARNING = 1;
[...]
print "Subject: WARNING: Your mailbox is $lu
[...]
print "Your mailbox: $luser is $lusers{$luse
[...]
Run
crontab -e
8 .0 4 L T S) - P age 2 8 .0 4 L T S) - P age 4
11 of 13 11/30/09 12:04
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.
I checked the conf again and again until I discvered that amavis was not activated (with netstat -tap).
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!
64bit DCC
Submitted 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
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
12 of 13 11/30/09 12:04
Virtual Users And Domains With Postfix, Courier, ... http://www.howtoforge.com/virtual-users-domains-...
13 of 13 11/30/09 12:04