Systemctl restart postfix. Since we now have a functioning Mail Server, by using the magical “mailx” you can now send a test e-mail using a command along these lines: mail -s “Local Outbound SMTP Test” [email protected] e-mail will be empty (thanks to the null content from “/dev/null”). The mail server should contain a valid MX record in the DNS server. Navigate to this link how to setup DNS server. Firewall and SELinux should be disabled. Open the postfix config file /etc/postfix/main.cf. Find the below lines and edit them as shown below. Open the file /etc/dovecot/conf.d/10. On this page • • • • Set Up Postfix For Relaying Emails Through Another Mailserver Version 1.0 Author: Falko Timme This short guide shows how you can set up Postfix to relay emails through another mailserver. This can be useful if you run a Postfix mailserver in your local network and have a dynamic IP address because most dynamic IP addresses are blacklisted today. By relaying your emails through another mailserver that is hosted on a static IP address in a data center (e.g. Your ISP's mailserver) you can prevent your emails from being categorized as spam. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you! 1 Preliminary Note To configure relaying on your Postfix mailserver, you need a valid email account (with username and password) on another mailserver (provided that this mailserver makes use of SMTP-AUTH (which it should do)). This other mailserver should be hosted on a static IP address in some data center (e.g. Your ISP's mailserver). In this guide I use smtp.example.com as the remote mailserver on which I have a valid email account with the username someuser and the password howtoforge. I assume you have already installed Postfix as I won't go into the details of installing Postfix here. How To Setup Postfix With Zoho Mail On Ubuntu Postfix SMTP client doesn’t work out of box with SSL/TLS (port 465), but with only the rather securer STARTTLS (port 587). Unfortunately Zoho email server doesn’t support STARTTLS. That’s the reason if you set “relayhost= smtp.zoho.com:465? In your Postfix main.cf file, you’ll get this error in /var/log/mail.log: CLIENT wrappermode (port smtps/465) is unimplemented instead, send to (port submission/587) with STARTTLS 1 2 CLIENT wrappermode (port smtps/465) is unimplemented instead, send to (port submission/587) with STARTTLS. In this tutorial we are going to setup a local mail server with Postfix, Dovecot & SquirrelMail. But before we begin installation, let’s learn in brief about mail server. Postfix is free & open source mail transfer agent (MTA) that routes & delivers Email. It is fast, secure & easy to administer and is a great alternative to SendMail MTA. Dovecot is an IMAP and POP3 mail server for Linux. It provides a way for Mail User Agent (MUAs) to access their mail. Its created to be fast, secure, requires very less administration & uses very less memory to work. Squirrelmail provides a graphical interface for sending mail. As you can understand sending & receiving mail via command line can be bit of a hassle. With the help of Squirrelmail we can open a console in our web browser for sending & receiving mail. Pre-requisites • Remove SendMail (if installed), To remove previous installation of sendmail, run. Myhostname = mail.ltechlab.com # Line 77 mydomain = ltechlab.com # Line 85 myorigin = $mydomain # Line 101 inet_interfaces = all # Line 115 inet_protocols = all # Line 121 #mydestination = $myhostname, localhost.$mydomain, localhost, # Line 166 (comment it) mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain # Line 167 (uncomment) ynetworks = 192.168.1.0/24, 127.0.0.0/8 # Line 266 home_mailbox = Maildir/ # Line 421 Make sure you make changes as per your domain. Save the file & exit and restart the postfix service to implement the changes. OR domain name/webmail Then enter your username password & you can now access your webmail. You can read your mail, compose new mails through webmail. If needed more users, create them as we created our mailuser. That’s it guys, you now have a fully functional local mail server. But i f you want to send mail over internet then you need to configure your mail server with a PUBLIC IP & make sure to ask your ISP to create MX record for your mail server. If having any issues or questions, please feel free to mention them in the comment box below.
0 Comments
Leave a Reply. |