Then you try to get your email working in Outlook Express, Mozilla Thunderbird, etc...
Setting your server settings to mail.example.com (substituting example.com for your domain name) should be enough to do the trick with default port settings right? WRONG!
The problem is that most Internet Service Providers (ISP) these days do not allow you to send e-mail through the default port 25. This has a lot to do with spambots and the proliferation of spam e-mail on the internet, but needless to say, it creates a giant thorn in your side when you're left sitting there, scratching your head, wondering how you're going to send e-mail through your beloved e-mail client rather than having to sign in to www.example.com/webmail every time you want to send/receive e-mails.
Luckily, the configuration change necessary to make your mail server listen in on a different port is altogether painlessly easy.
- To begin with, you'll need to connect to your server via an SSH client like Putty [link forthcoming].
- You'll need to gain root access to the server by performing su root and entering your server root user password (which hopefully is NOT the same as your server user password).
[user@ip-101-101-101-101 ~] su root
Password: ********
[root@ip-101-101-101-101 cwd]# - Next you'll use either vi (installed by default) or nano (installed separately but much better) to edit /etc/postfix/master.cf by entering the following line at the command prompt: nano /etc/postfix/master.cf or if your prefer (for some masochistic reason) the vim editor: vi /etc/postfix/master.cf
[root@ip-101-101-101-101 cwd]# nano /etc/postfix/master.cf
GNU nano 1.3.12 File: /etc/postfix/master.cf
#==========================================================
# srvc type prvt unpriv chroot wakeup maxproc command+args
#==========================================================
smtp inet n - n - - smtpd -o content_filter=spamassassin
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
... - To enable port 465 using TLS/SSL add the following lines below the smtp line:
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o content_filter=spamassassin - After you have added the line and saved the file the top of the /etc/postfix/master.cf file should look something like this (You can use head /etc/postfix/master.cf to make sure your changes "took"):
[root@ip-101-101-101-101 cwd]# head /etc/postfix/master.cf
#==========================================================
# srvc type prvt unpriv chroot wakeup maxproc command+args
#==========================================================
smtp inet n - n - - smtpd -o content_filter=spamassassin
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o content_filter=spamassassin
pickup fifo n - n 60 1 pickup - After this is completed you will need to restart the postfix server by entering the following command: /etc/init.d/postfix restart
[root@ip-101-101-101-101 cwd]# /etc/init.d/postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ] - Now you can go to Thunderbird/Outlook/Outlook Express/etc... and attempt to send an e-mail by setting your outgoing server to use TLS/SSL and connect on Port 465. It worked perfectly for me, I see no reason why it won't for you too!
If, for some reason, you wanted to enable postfix listening for smtp requests on an alternate port so that you may continue to use insecure e-mail connections, then add the following line (again to /etc/postfix/master.cf):
smtp inet n - n - - smtpd -o content_filter=spamassassin
26 inet n - n - - smtpd -o content_filter=spamassassin
Where 26 is whatever number port you wish to use.
Happy e-mailing! :)
No comments:
Post a Comment