How to change the Postfix port number

2 Apr, 2010

Postfix logoBy default, Postfix, Sendmail, and other SMTP mail servers rely on port 25 to send email. Normally, this is fine and works for most situations. Some Internet Service Providers, however, disagree. They see port 25 as a prime port for spammer exploitation, and many have started to block it.

If this is the case for you and you have root access on your VPS or dedicated server, you might consider changing your SMTP port to something you know you will be able to access. To change the port in Postfix, edit your /etc/postfix/master.cf file as root, commenting out the following line:

smtp innet n - n - - smtpd

Then, add the this line:

2900 inet n - n - - smtpd

Replace “2900″ with whatever port you prefer for your mail server. Next, restart Postfix:

service postfix restart

Finally, assuming you have a firewall installed, which any security-minded server administrator should, you will need to tell it to allow traffic through the new mail server port.

(0) Comment Categories : Security, VPS & Dedicated
Tag: , , , , ,

How do I enable SSL/TLS in Dovecot mail server?

1 Apr, 2010

Dovecot logoDovecot is a popular POP3/IMAP server for Unix-like operating systems. It is available through most distributions, including RHEL, CentOS, and Fedora. To enable secure mail transactions, you will need to edit your /etc/dovecot.conf file as root.

Uncomment the following lines:

# Disable SSL/TLS support?
ssl_disable = no

# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
# dropping root privileges, so keep the key file unreadable by anyone but
# root. Included doc/mkcert.sh can be used to easily generate self-signed
# certificate, just make sure to update the domains in dovecot-openssl.cnf

ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem

You can also optionally disable non-secure logins:

disable_plaintext_auth = yes

Finally, you need to restart dovecot:

service dovecot restart

(0) Comment Categories : Security, VPS & Dedicated
Tag: , , , , , , ,

4 Tools to monitor site uptime

23 Mar, 2010

Pingdom monitoring screenshot
One of the most important things you can do for your website is to make sure you have some type of monitoring. The last thing you want is to get an email or call from an irate customer because your site is down. Here are four web-based monitoring tools that alert you when your site is down. They also provide many other features, and one, Sucuri, checks your site for attacks and malware. They are listed here in no particular order.

Basic State

Checks every 15 minutes, sends email and sms alerts, daily uptime reports (including graphs), and unlimited sites.

Pingdom

Allows users to have 1 website and provides sms, email, and twitter alerts, uptime reports, and error analysis.

Sucuri

Includes integrity monitoring, DNS and Whois hijacking monitoring, website defacement, malware, and blacklist detection.

Siteuptime

Offers 1 monitor, 30/60 minute checks, uptime reports, statistics page, and multiple protocols.

(0) Comment Categories : Software, Web Services
Tag: , , , , , , ,

Web host encourages clients to use Gmail

8 Mar, 2010

email envelopYou might think that as one of the largest web hosts in the United States, DreamHost would want its customers to use its own email service. You’d be wrong to think so, however. Since May 2008, the company has encouraged its users to switch to Gmail for their email needs.

In a blog post, Dream Host co-founder Josh Jones stated, “Just over HALF of all the support requests we get are about email… It’s just not something people are looking for from us, and it’s something the big free email providers like Yahoo, Microsoft, and Google can do better.”

So rather than improve its own email system to make it more user friendly, DreamHost has opted to outsource it to Google. This is a great cost-cutting measure and it’s nice that the company is giving its customers more options. But I think the real underlying problem here is that DreamHost isn’t as user-friendly as it could be.

The company may have improved since I switched to a different host several years ago, but from my experience, the DreamHost control panel is hard to use. I remember it being very slow and arranged in a very illogical fashion. As DreamHost half-heatedly admits, their email service wasn’t easy to set up. Instead of copping out by switching to Gmail, the web host should fix what was broken in the first place.

(0) Comment Categories : Web Hosting
Tag: , , ,

Limit the incoming email rate in Postfix

26 Feb, 2010

Postfix logo
Question: I have spammers sending multiple email messages to my mail server. How can can I limit the number of emails they can send in a given amount of time?

Answer: This is a trick that many spammers and malicious hackers will use to flood your server with their nonsense. Although a spam blocker will certainly help, it still has to process each email. If thousands of emails are sent an hour, that takes up valuable CPU power, memory, disk space, and time.

Postfix mail server allows you to limit the rate of incoming emails, keeping the spam messages from flooding your server. To configure it, edit /etc/mail/main.cf:

# nano main.cf (or vi main.cf)

Add the following directives:

smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20

With these settings, after a client has made 10 connections, Postfix will pause and delay the next connection. If the connection is made 20 times without delivering mail, Postfix will disconnect.

Source: nixCraft

(0) Comment Categories : Software, VPS & Dedicated, Web Hosting
Tag: , , , ,

How read Outlook mail via web

1 Feb, 2010

outlook
Microsoft Outlook is a great desktop mail client for at home or in the office, but what if you are using a computer not configured for Outlook access and need to check your mail? When this happens, Outlook Web Access (OWA) is a good alternative.

Originally called Exchange Web Connect (EWC), OWA is simply a webmail client designed to look almost identical to Outlook. It lets you check email, calendars, contacts, and more. Older versions require Internet Explorer, but the latest version will also work with Safari, Chrome, and Firefox.

Unfortunately, not every Outlook user can use OWA. In order for it to work, you must have a server with Microsoft Exchange installed. Most companies using Outlook should have this, but personal users will find themselves out of luck.

(0) Comment Categories : Web Services
Tag: , , , ,

How to setup email forwarders in cPanel

21 Dec, 2009

cPanel forwarders
Question: How can I use cPanel to forward emails sent to addresses in my domain to another email address?

Answer: The web-based control panel called cPanel makes it easy to create email forwarders. A forwarder allows you to setup any number of virtual email addresses within your domain and then forward emails sent to them to one or many different addresses. Just follow these simple steps:

1. Login to cPanel.
2. In the “Mail” section, click “Forwarders”
3. Click “add Forwarder”
4. Where it says “Address to Forward” enter the part of the email address that comes before the @ symbol. This should be a prefix that does not already exist as a real email address.
5. In the dropdown menu, select the domain name (if you have more than one).
6. Under “Destination” you can forward emails to an internal or external address, discard and return an error message, or “Pipe to a Program”, meaning that a script will handle the emails.

That is all it takes. Now email sent to the address you specified will automatically be forwarded wherever you want.

(0) Comment Categories : Software, Web Hosting
Tag: , , , ,

Where can I find a free SMTP server?

3 Dec, 2009

free smtp server
An SMTP (Simple Mail Transfer Protocol) server is primarily used for sending email messages between servers. Most email systems use SMTP servers. But are there free servers for this task?

Free SMTP Server is a Windows program that satisfies that need, and it is very easy to use. Furthermore, it is particularly useful for laptop users who travel frequently and connect to Internet service providers from various countries. Using your own SMTP server gives you much more security.

Richard Stallman, founder of GNU (component of GNU/Linux) and the Free Software Foundation explained that the only way to be certain of the privacy and security of your email accounts is to host them yourself. This is probably not practical for the average person, but for a few individuals and certainly companies with security concerns, this is a real option. Free SMTP works with Outlook Express and Eudora. If you are interested, you can download directly from the project’s website and give it a try for free.

(0) Comment Categories : Software, Web Services
Tag: , , , , ,

Tracking emails with Postfix

27 Nov, 2009

Postal Box
Question: I am noticing some problems with my email server, Postfix. Is there a way to track emails?

Answer: While you should definitely not use this for purpose of spying, it is sometimes necessary to track all emails on a server, even if you have multiple users on it. Sometimes the enemy may be within, and someone sending abusive emails on your server can put everyone else’s websites in jeopardy.

Using the “always_bcc” setting, Postfix will send a blind carbon copy of every email to an administrator of your choice. This, of course, will generate a lot of email for that account, so the best thing to do is to create an account just for that purpose. Edit the Postfix main.cf file and add the following line:

always_bcc=harvestadmin@yourdomain.com

To get it started, you will need to reload postfix with:

postfix reload

Soon, that account will start receiving everything. Good luck finding the cause of whatever problem you have.

Photo: Flickr

(0) Comment Categories : VPS & Dedicated, Web Hosting
Tag: , , , ,

Getting rid of crontab emails

25 Nov, 2009

cron
Question: How do I stop crontab from sending me emails after a cron job finishes?

Answer: In Linux the default setting for crontab is to send an email to the owner after a cron job finishes. An easy way to change this is to reroute those emails into nothingness, which in Linux is a directory called /dev/null.

Just append a pipe to it at the end of your command like so:

/usr/bin/command >/dev/null 2>&1

That will do the trick. You can enter it from the command line or through a control panel, if it supports cron jobs.

Photo: Flickr

(0) Comment Categories : VPS & Dedicated, Web Hosting
Tag: , , , ,