21. 05. 09
Keeping known email abusers out is always desired.
Postfix has a parameter which is specified in the main.cf file that allows you to refer to these lists.
The script I use is as follows...
smtpd_client_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_pipelining
reject_rbl_client cbl.abuseat.org
reject_rbl_client dnsbl.ahbl.org
reject_rbl_client dnsbl.sorbs.net
reject_rbl_client list.dsbl.org
reject_rbl_client sbl-xbl.spamhaus.org
#reject_rhsbl_client blackhole.securitysage.com
reject_rhsbl_client rhsbl.sorbs.net
permit
Note the commented out line
#reject_rhsbl_client blackhole.securitysage.com
This is a list that was not properly administered. A friend of mine tried to email me who uses the mac.com domain and was being rejected as an abuser which, of course, is rediculous.
I keep the entry as a future reference. There are others out there so if you know of them please let me know.
mta.
18. 05. 09
So you have your linux server up and running. A lot of time and effort went into this so lets get it backed up. You don't need to invest in any fancy backup system. A bit of shell script and some use of
crontab will do the trick.
Here are the two scripts I use...
Make an executable file e.g. mailserver_backup.sh containing the following
cd /
dt=`date +%Y%m%d_%s`
/bin/tar -czf mailserver_$dt.tar.gz etc/postfix etc/dovecot.conf usr/bin/null.sh usr/local/bin/safilter.sh usr/local/bin/backup_mailprogs.sh etc/mail/spamassassin home/mailfilt/.spamassassin var/spool/mail
Make an executable file e.g. web_sql_backup.sh containing the following
cd /
dt=`date +%Y%m%d_%s`
rm -f mysqlall.sql
mysqldump -uroot -ppassword --all-databases > /mysqlall.sql
/bin/tar -czf mailserver_web_sql_$dt.tar.gz etc/httpd var/www/html mysqlall.sql usr/local/bin/backup_web_sql.sh
Now use
crontab to schedule the running of the scripts...
crontab -e
and enter the following
See below
Sponsored Links
15 3 * * * /usr/local/bin/mailserver_backup.sh
45 3 * * * /usr/local/bin/web_sql_backup.sh
This will backup mail server apps at 3:15am and web backup at 3:45am.
I would also suggest you copy the backed up files to other media in case your server completely crumbles.
12. 05. 09
Very often it is necessary to test that your SMTP server is working.
The simplest way to do this is with the
telnet command.
This lets you talk directly to the email server in its own SMTP protocol script language.
Here's how...
telnet server name or IP address 25
HELO aaaa
mail from: <tom@fromdomain.com>
rcpt to: <fred@todomain.com>
data
Enter your message text
.
quit
Along the way you should see feedback from the server to each command entered
See below
Sponsored Links
e.g.
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mailserver.local ESMTP Exim 4.43 Tue, 12 May 2009 10:31:00 +0100
helo aaaa
250 mailserver.local Hello mailserver.local [127.0.0.1]
mail from: <tom@fromdomain.com>
250 OK
rcpt to: <fred@todomain.com>
250 Accepted
data
354 Enter message, ending with "." on a line by itself
A message for myself.
.
250 OK id=1M3oKj-0006Sn-9u
quit
221 mailserver.local closing connection
Connection closed by foreign host.