Configure Email Server using PostFix, Dovecot and Squirrel Mail in RHEL 7 (CentOS 7)| Nehra Classes

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024
  • Configure Webmail/Dovecot Mail Server in RHEL 7 (CentOS 7):
    ==================================================
    POSTFIX for SMTP (Simple Mail Transfer Protocol): Used for Sending the Emails.
    DOVECOT for POP3 (Post Office Protocol): Used for Receiving the Emails.
    SQUIRRELMAIL for IMAP (Internet Message Access Protocol): Used for Front Web End Mail Client.
    ===
    Server Configuration: RHEL 7
    IP Address: 192.168.1.104
    ===
    1. Set the hostname in the machine.
    hostnamectl set-hostname rhel7.nehraclasses.local
    Add hostname entries in /etc/hosts file as shown below:
    vim /etc/hosts
    Add the following
    192.168.1.104 rhel7.nehraclasses.local rhel7
    2. Disable or make permissive the SELINUX
    setenforce 0
    getenforce
    3. Install EPEL Repository:
    wget dl.fedoraproje...
    rpm -ivh epel-release-latest-7.noarch.rpm
    yum install -y epel-release
    4. Allow the Apache default port 80 through your firewall/router:
    firewall-cmd --permanent --add-port=80/tcp
    Reload firewall using command:
    firewall-cmd --reload
    5. Install the Postfix Package.
    yum install postfix -y
    6. Configuring PostFix
    vim /etc/postfix/main.cf
    Line no 77 - Uncomment and set your mail server FQDN ##
    myhostname = rhel7.nehraclasses.local
    Line 85 - Uncomment and Set domain name ##
    mydomain = nehraclasses.local
    Line 101 - Uncomment ##
    myorigin = $mydomain
    Line 115 - Uncomment and Set ipv4 ##
    inet_interfaces = all
    Line 121 - Change to all ##
    inet_protocols = all
    Line 166 - Comment ##
    #mydestination = $myhostname, localhost.$mydomain, localhost,
    Line 167 - Uncomment ##
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    Line 266 - Uncomment and add IP range ##
    mynetworks = 192.168.1.0/24, 127.0.0.0/8
    Line 421 - Uncomment ##
    home_mailbox = Maildir/
    Save and exit the file.
    Start/restart Postfix service now:
    systemctl restart postfix
    systemctl enable postfix
    7. Test the Postfix Server:
    Add the user account.
    useradd nehra
    passwd nehra
    Install Telnet Package
    yum install -y telnet
    Check telnet
    telnet localhost smtp
    Type the commands:
    ehlo localhost
    mail from:nehra
    rcpt to:vikasnehra
    data
    welcome to Postfix Mail Server
    .
    quit
    ll /home/vikasnehra/Maildir/new/
    Open the file with name using cat.
    8. Install Dovecot Package
    yum install -y dovecot
    Configure Dovecot
    vim /etc/dovecot/dovecot.conf
    Line 24 - umcomment ##
    protocols = imap pop3 lmtp
    Edit file /etc/dovecot/conf.d/10-mail.conf file
    vim /etc/dovecot/conf.d/10-mail.conf
    Line 24 - uncomment ##
    mail_location = maildir:~/Maildir
    Edit /etc/dovecot/conf.d/10-auth.conf
    vim /etc/dovecot/conf.d/10-auth.conf
    And make the changes as shown below:
    line 10 - uncomment##
    disable_plaintext_auth = yes
    Line 100 - Add the word: "login" ##
    auth_mechanisms = plain login
    Edit file /etc/dovecot/conf.d/10-master.conf,
    vim /etc/dovecot/conf.d/10-master.conf
    Make changes as shown below:
    Line 91, 92 - Uncomment and add "postfix"
    #mode = 0600
    user = postfix
    group = postfix
    [...]
    Start Dovecot service:
    systemctl start dovecot
    systemctl enable dovecot
    Testing Dovecot
    telnet localhost pop3
    user vikasnehra
    pass
    retr 1
    .
    quit
    9. Install Squirrel mail Package
    yum install squirrelmail
    Configuring Squirrel-Mail
    cd /usr/share/squirrelmail/config/
    ./conf.pl
    Enter 1
    Enter 1 and change the organization Name
    Press S
    Press R for previous menu
    Enter 2 for Server settings
    Press 1
    and type: rhel7.local (Name of Domain)
    Press 3
    Press 2 for switching from Send Mail to SMTP
    Type S and Press Q for quit
    10. Create a squirrelmail vhost in apache config file:
    vim /etc/httpd/conf/httpd.conf
    Enter the following:
    Alias /webmail /usr/share/squirrelmail
    Directory /usr/share/squirrelmail
    Options Indexes FollowSymLinks
    RewriteEngine On
    AllowOverride All
    DirectoryIndex index.php
    Order allow,deny
    Allow from all
    /Directory
    systemctl restart httpd
    systemctl enable httpd
    Enter the following command:
    setsebool httpd_can_network_connect=1
    Open Web Browser and type in address bar the following. And Use User Credentials to Login.
    192.168.1.104/webmail
    Your Dovecot Server is working.
    ===
    Visit FB Page for Complete Steps:
    / nehraclasses
    ===
    Thanks for watching the video. Please like our videos, share with your friends and feel free to ask anything, post your queries in comments section. We will be glad to answer your queries. Don't forget to subscribe the channel & turn on the bell notifications.
    ===============
    Our Some Popular Videos:
    Yum Server Configure in RHEL 7:
    • Configure Local Yum Re...
    Learn Linux Fundamentals:
    • Learn Linux Fundamenta...
    Concept of All RAID Levels:
    • Session-31 | Concept o...
    LVM Snapshot:
    • Session-30 | Logical V...
    ============
    ©COPYRIGHT. ALL RIGHTS RESERVED.
    #NehraClasses #LinuxTraining #MailServer

Комментарии • 52

  • @NehraClasses
    @NehraClasses  4 года назад +2

    For complete steps kindly visit below link 👇
    m.facebook.com/story.php?story_fbid=1542507319261849&id=856141747898413

  • @techtipsmanager640
    @techtipsmanager640 2 года назад +1

    on of the best mail server tutorial thank you so much sir

    • @NehraClasses
      @NehraClasses  2 года назад

      🙏

    • @techtipsmanager640
      @techtipsmanager640 2 года назад +1

      @@NehraClasses i want to course from you how can please advice im from bangladesh

    • @NehraClasses
      @NehraClasses  2 года назад

      Please ping me on whatsapp at +91-9410219232

  • @syednoor-ul-hassanshah8657
    @syednoor-ul-hassanshah8657 3 года назад +1

    Very impressive

  • @yugandharreddyg5690
    @yugandharreddyg5690 4 года назад +1

    Very good explanation bro.

  • @rumelhowlader
    @rumelhowlader 2 года назад +1

    Thank you- so useful

    • @NehraClasses
      @NehraClasses  2 года назад +1

      Glad it was helpful!

    • @rumelhowlader
      @rumelhowlader 2 года назад

      @@NehraClasses If i send an email it is not coming to the inbox, what to do?

    • @rumelhowlader
      @rumelhowlader 2 года назад

      Please check your facebook page inbox, I sent problem.

  • @sirajkhanshinwari
    @sirajkhanshinwari 3 года назад +1

    Nyc sir

  • @avcoe123
    @avcoe123 2 года назад +1

    Thanks

  • @000guddu
    @000guddu 3 месяца назад +1

    Hi Sir, I have followed each and every steps, but I am facing the permission issue while opening it in
    the browser: Forbidden...you dont have the permision to open /webmail...please help me.

    • @NehraClasses
      @NehraClasses  3 месяца назад

      Please share the logs and error screenshot in the telegram group

  • @alexroberts5699
    @alexroberts5699 2 года назад +1

    I'm not understanding what you did in /etc/dovecot/conf.d/10-auth.conf at the "auth_mechanisms" line. Did you add something or comment it out or just leave it? Also, in 10-master.conf your "mode" is configured differently in your notes than the file you saved; which one is right?

    • @NehraClasses
      @NehraClasses  2 года назад

      actually youtube doesn't allow to write angle brackets in video description, please check pinned comment for the same or get the step from our telegram group. The steps which are shown in video are correct.

  • @hemantkhade92
    @hemantkhade92 3 года назад +1

    This mail configuration is used for the domain user on same network? There is any settings for client side for mail?

  • @theorie_avis
    @theorie_avis 4 года назад

    I have a problem to install squirrelmail can you please help me.
    I configured yum for local. Now I can install packages in offline, but it doesn't work for online packages.

  • @SureshKumar-dw1hm
    @SureshKumar-dw1hm 3 года назад +1

    Hello sir i am using squirrelmail server in ubuntu 18, i am able to send messages and it shows in INBOX. Sent. But i am not able to receive mail and others to. How to solve it.

  • @Noaman2022
    @Noaman2022 3 года назад +1

    sir , i got error on rcpt to:
    550 5.1.1 : Recipient address rejected: User unknown in local recipient table

    • @NehraClasses
      @NehraClasses  3 года назад

      Do you have this user account in your server?

  • @vinishps3129
    @vinishps3129 2 года назад +1

    /etc/postfix/main.cf: parameter mail_owner: unknown user name value: postfix myhostname = > how to fix this error ? any help

    • @NehraClasses
      @NehraClasses  2 года назад

      Please join our channel membership and provide us error screenshot in telegram.

  • @thelyfmail2080
    @thelyfmail2080 3 года назад +1

    How to Create an Outgoing Mail Relay with Postfix and SpamAssassin?
    Will you make a tutorial for it?

    • @NehraClasses
      @NehraClasses  2 года назад

      yes we can, please provide us all details in telegram.

    • @thelyfmail2080
      @thelyfmail2080 2 года назад

      @@NehraClasses Which type of details, do you want?
      Like OS: CentOS 7
      Mail Server: Postfix, Dovecot, Rainloop and Spamassassin
      Here's the details, no more than these needed to setup Outgoing Mail Relay...

  • @bhaskarjs
    @bhaskarjs 5 месяцев назад

    What about sending mails to Gmail

  • @sirajkhanshinwari
    @sirajkhanshinwari 3 года назад +1

    Plz do a video on samba as PDC

    • @NehraClasses
      @NehraClasses  3 года назад

      I have already uploaded videos on Samba

  • @2594swapnil
    @2594swapnil 3 года назад

    Hi Sir,
    The video is really nice . I have a different requirement I need to sent a mail to my organisation mail id from my linux Server. Do you have any content for that

  • @saurabhdutta3297
    @saurabhdutta3297 3 года назад +1

    # yum install squirrelmail
    this command is not applicable dependencies are not apply it , support it to do this lab

    • @NehraClasses
      @NehraClasses  3 года назад

      Did u configure additional repositories?
      Please ping me on 9410219232 or join our telegram channel for quicker response.

    • @saurabhdutta3297
      @saurabhdutta3297 3 года назад +1

      today i done this lab on new centos7 VM , sophos firewall issue myside to download squirrelmail dependencies , thks sir for ur kindest support , good luck sir for rest of the future videos

    • @NehraClasses
      @NehraClasses  3 года назад

      Thanks a lot 🙏

  • @ArpanBagui-dn2iv
    @ArpanBagui-dn2iv 4 месяца назад +1

    I am not getting the mail from when running retr 1 getting there's no message though I checked in maildir/new there is a mail and I uncommented this line mail_location = maildir:~/Maildir. Can you help me please

    • @NehraClasses
      @NehraClasses  4 месяца назад

      please post your questions in the telegram group.

    • @ArpanBagui-dn2iv
      @ArpanBagui-dn2iv 4 месяца назад

      @@NehraClasses can you send me the link of telegram class

  • @ElvinShirazov
    @ElvinShirazov 4 года назад +1

    Thank you- so useful