Showing posts with label mail. Show all posts
Showing posts with label mail. Show all posts

Configuring Postfix with SASL

See Postfix SASL Howto and www.mysql-apache-php.com/.

This is for CentOS 4 http://www.hughesjr.com/content/view/14/29/

Here is another one with TLS http://wiki.centos.org/HowTos/postfix_sasl

When using TLS for postfix, make sure master.cf has
smtps     inet  n       -       n       -       -       smtpd
-o smtpd_sasl_auth_enable=yes
-o smtpd_tls_wrappermode=yes

Configure Squirrelmail

Change domain in /etc/squirrelmail/config.php:
$domain = 'mydomain.com';
so the email received will have user@mydomain.com

To use https on apache, add the following to /etc/httpd/conf.d/squirrelmail.conf:
<Location /webmail>RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{HTTP_HOST}:443%{REQUEST_URI} [QSA,R=permanent,L]
</Location>


Finally, selinux settings:
setsebool -P httpd_can_network_connect=1

Dovecot Imaps Server setup

You can do this for pop/pops/imap as well, here I only wanted to configure imaps. Make the following changes to /etc/dovecot.conf:
protocols = imaps
login_process_size = 64 # for x86_64
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
.
Also remember to open the port 993 for imaps in the iptable configuration.

Configure postfix

If this is a web server, make sure you changed MX record with dns provider to point to your server (or you will not be able to receive mail). I have modified the following is /etc/postfix/mail.cf:
myhostname = mydomain.com
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost

Use http://pingability.com to check your DNS setup.

EMail

Sendmail/postfix
Mail server like Microsoft Exchange Server. It supports SMTP to accept from and deliver to other servers. Postfix is easier to set up.

If your ISP blocks the SMTP port (25), you can not send/receive. But you can use postfix relayhost to send through a remote SMTP server (from your ISP). Instructions can be found here.

IMAP/POP
Protocols allow user to download email from a remote server. These are daemon as well.

Text Based Mail User Agent (MUA)
The two most popular ones are pine (alpine) or mutt (new elm). pine/alpine does not come with Centos. Alpine comes with at least Fedora 9.