0% found this document useful (0 votes)
104 views

Mail Server

This document provides instructions for configuring a mail server using Postfix on BOSS Advanced Server. It discusses configuring Postfix, setting up SASL authentication with TLS encryption, creating user mailboxes in Maildir format, testing the server functionality using Telnet, and adding an alias. The key steps include: 1. Configuring Postfix for Internet use and testing sending a test mail. 2. Creating user mailboxes with Maildir format and testing POP3 and IMAP access. 3. Configuring Postfix to use SASL authentication with TLS encryption for secure communication. 4. Testing the server by sending an email using Telnet.

Uploaded by

vinod
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Mail Server

This document provides instructions for configuring a mail server using Postfix on BOSS Advanced Server. It discusses configuring Postfix, setting up SASL authentication with TLS encryption, creating user mailboxes in Maildir format, testing the server functionality using Telnet, and adding an alias. The key steps include: 1. Configuring Postfix for Internet use and testing sending a test mail. 2. Creating user mailboxes with Maildir format and testing POP3 and IMAP access. 3. Configuring Postfix to use SASL authentication with TLS encryption for secure communication. 4. Testing the server by sending an email using Telnet.

Uploaded by

vinod
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

BOSSADVANCEDSERVER

BOSSServerFeatures
Kernel MailServer File&PrintServer WebApplicationServer DatabaseServer SMSGateway VirtulizationServer RemoteServerAdministration SystemMonitoring BackupServer ProxyServer NetworkServer

Kernel
Kernelversion2.6.223486 Supportsmultipleprocessors 32bit&64bitArchitectures supportsmorethan4GBofRAM

MailServer
Postfixversion2.5.51.1 SMTP ,LMTPprotocolsupport SASL&TLSsupportforencryptedconnection Multipledatabasesupport(SQL,MySQL,LDAP) Virtualdomainssupport

File&PrintServer
SAMBAversion3.2.31 NFSversion1.1.26 ProFTPversion1.3.114

WebApplicationServer
ApacheServerversion2.2.97 SupportsLanguages Perl5.10.014 PHP5.2.63 Python2.5.211
Tomcat(JAVATechnologies)

DatabaseServer
Postgresql8.3.31 MySQL5.0.51a15

Security
Openssl0.9.8g13 iptables1.4.1.13

RemoteServerAdministration
Openssh5.1p12 VNC4.1.1

BackupServer

Bacula

NetworkServer
DNSbind99.5.0 DHCP3.1.13

ProxyServer
squidversion2.7

LDAP
OpenLDAP slapd2.4.103

Cloud
CloudComputing

Storage
Lvm2lvm2.02.392

GUItools
Webmin(Webbased) MRTG gadmintoolsupportsDNS,DHCP ,FTP ,rsync,samba,squid wireshark(SecurityAuditing) pgadmin,phpmyadmin,mysqladmin

MailServer

MailServer
RelaymailsbetweentheServer Sendmail,qmail,postfix MUA MDA(IMAPorPOP) MTA(SMTP) MSA

MTA MDA MSA MUA

MTA

Postfix

ThedefaultmailserverinBOSSServer AlternativetothewidelyusedSendmailprogram Fast,easytoadminister,andsecure Sendmailcompatibleenoughtonotupsettheusers


Packages postfix courierimap libsasl22 sasl2bin ConfigurationFiles /etc/postfix/main.cf /etc/postfix/master.cf Service /etc/init.d/postfixstart /etc/init.d/postfixreload /etc/init.d/postfixrestart /etc/init.d/postfixstop

mailx courierpop libsasl2modules maildrop

BasicConfiguration ReconfiguringthePostfix #dpkgreconfigurepostfix


Generaltypeofmailconfiguration:InternetSite Systemmailname:cdacchen.in Rootandpostmastermailrecipient:boss Otherdestinationsformail:server1.cdacchen.in, localhost.cdachennai.in,localhost,cdacchen.in Forcesynchronousupdatesonmailqueue?:No Localnetworks:127.0.0.0/8 Useprocmailforlocaldelivery:Yes Mialboxsizelimit(bytes):0 Localaddressextensioncharacter:+ Internetprotocolstouse:all

ConfigurePostfix #postconfe"mydestination=

server1.cdacchen.in,localhost.cdacchennai.in,localhost,cdacchen.in"

Testthedefaultsetup #telnetserver1.cdacchen.in25 Trying192.168.36.242...


Connectedtoserver1.cdacchen.in. Escapecharacteris'^]'. 220server1.cdacchen.inESMTPPostfix ehloserver1.cdacchen.in mailfrom:root@server1.cdacchen.in rcptto:boss@server1.cdacchen.in data Subject:MyfirstmailonPostfix Hi, Areyouthere? regards, Admin .(Typethe.[dot]inanewLineandpressEnter) quit

Loginasboss #loginboss Checkthemail $mail $logout

Testingthemail

WorkingExample

Postfix+sasl+TLS+Maildirformat

StatusCodes

TheServerrespondswitha3digitcodethatmaybe followedbytextinfo 2##Success 3##Commandcanbeacceptedwithmore information 4##Commandwasrejected,buterrorconditionis temporary 5##Commandrejected,BadUser!

TestingCourierPOP3

#netcatserver1.cdacchen.in110 Connectedtoserver1.cdacchen.in(192.168.36.242). Escapecharacteris'^]'. +OKHellothere. userboss +OKPasswordrequired. passpassword +OKloggedin. quit

TestingCourierIMAP

#netcatserver1.cdacchen.in143 *OK[CAPABILITYIMAP4rev1UIDPLUSCHILDREN NAMESPACETHREAD=ORDEREDSUBJECT THREAD=REFERENCESSORTQUO ACL2=UNIONSTARTTLS aloginbosspassword aOKLOGINOk. alogout

ScripttocreateuserandtheirMaildirformat #viuser_maildir #!/bin/bash func() { user=$1 /usr/sbin/adduser$user /usr/bin/maildirmake/home/$user/Maildir /bin/chownR$user:$user/home/$1/Maildir /bin/chmod3777/home/$user/Maildir } func$1 Runthescript ./user_maildirashok

Configurethemailboxformat #postconfe"home_mailbox=Maildir/ #postconfemailbox_command="" Newmailin/home/username/Maildir ConfigurePostfixtodoSMTPAUTHusingSASL(saslauthd) #postconfe'smtpd_sasl_local_domain=' #postconfe'smtpd_sasl_auth_enable=yes' #postconfe'smtpd_sasl_security_options=noanonymous' #postconfe'broken_sasl_auth_clients=yes' #postconfe'smtpd_recipient_restrictions= permit_sasl_authenticated,permit_mynetworks, reject_unauth_destination' #postconfe'inet_interfaces=all'

Edit/etc/postfix/sasl/smtpd.conf #vi/etc/postfix/sasl/smtpd.conf
pwcheck_method:saslauthd mech_list:plainlogin

GeneratecertificatestobeusedforTLSencryptionand/or certificateAuthentication: #touchsmtpd.key


#chmod600smtpd.key #opensslgenrsa1024>smtpd.key #opensslreqnewkeysmtpd.keyx509days3650outsmtpd.crt #opensslreqnewx509extensionsv3_cakeyoutcakey.pemout cacert.pemdays3650 #sudomvsmtpd.key/etc/ssl/private/ #sudomvsmtpd.crt/etc/ssl/certs/ #sudomvcakey.pem/etc/ssl/private/ #sudomvcacert.pem/etc/ssl/certs/

ConfigurePostfixtodoTLSencryptionforboth incomingandoutgoingmail
sudopostconfe'smtp_tls_security_level=may' sudopostconfe'smtpd_tls_security_level=may' sudopostconfe'smtpd_tls_auth_only=no' sudopostconfe'smtp_tls_note_starttls_offer=yes' sudopostconfe'smtpd_tls_key_file=/etc/ssl/private/smtpd.key' sudopostconfe'smtpd_tls_cert_file=/etc/ssl/certs/smtpd.crt' sudopostconfe'smtpd_tls_CAfile=/etc/ssl/certs/cacert.pem' sudopostconfe'smtp_tls_key_file=/etc/ssl/private/smtpd.key' sudopostconfe'smtp_tls_cert_file=/etc/ssl/certs/smtpd.crt' sudopostconfe'smtp_tls_CAfile=/etc/ssl/certs/cacert.pem' sudopostconfe'smtpd_tls_loglevel=1' sudopostconfe'smtpd_tls_received_header=yes' sudopostconfe'smtpd_tls_session_cache_timeout=3600s' sudopostconfe'tls_random_source=dev:/dev/urandom' sudopostconfe'myhostname=server1.example.com'

Restarttheservice #/etc/init.d/postfixrestart

Authentication vi/etc/default/saslauthd START=yes PWDIR="/var/spool/postfix/var/run/saslauthd" PARAMS="m${PWDIR}" PIDFILE="${PWDIR}/saslauthd.pid" OPTIONS="cm/var/spool/postfix/var/run/saslauthd" mkdirp/var/spool/postfix/var/run/saslauthd

Createthedirectorywiththeappropriatepermissionsand ownership dpkgstatoverrideforceupdateaddrootsasl755 /var/spool/postfix/var/run/saslauthd Starttheservice /etc/init.d/saslauthdstart

Testing

telnetserver1.cdacchen.in25 Trying192.168.36.242... Connectedtoserver1.cdacchen.in. Escapecharacteris'^]'. 220server1.cdacchen.inESMTPPostfix ehloserver1.cdacchen.in 250server1.cdacchen.in 250PIPELINING 250SIZE10240000 250VRFY 250ETRN 250STARTTLS 250AUTHPLAINLOGIN 250AUTH=PLAINLOGIN 250ENHANCEDSTATUSCODES 2508BITMIME 250DSN quit 2212.0.0Bye Connectionclosedbyforeignhost.

Aliasdatabase vi/etc/aliases webmaster:ashokk@cdacchen.in newaliases Restartthepostfix /etc/init.d/postfixreload

ThankYou

AshokKumarJ ashokk@cdac.in

You might also like