Linux POSTFIX Tutorial to send EMAIL | MPrashant

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • #linux #mprashant #linuxtutorial ‪@MPrashant‬
    Join this channel to get access to perks:
    / @mprashant
    -------------------------------
    Postfix Config lines
    Add the following lines
    relayhost = [smtp.gmail.com]:587
    myhostname= your_hostname
    Location of sasl_passwd we saved
    smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
    Enables SASL authentication for postfix
    smtp_sasl_auth_enable = yes
    smtp_tls_security_level = encrypt
    Disallow methods that allow anonymous authentication
    smtp_sasl_security_options = noanonymous
    -------------------------------------------------------------------------------------------
    Create a file under /etc/postfix/sasl/
    Filename: sasl_passwd
    Add the below line
    [smtp.gmail.com]:587 email@gmail.com:password
    ------------------------------------------------------------------------------------------
    To send an email using Linux terminal
    echo "Test Mail" | mail -s "Postfix TEST" paul@gmail.com
    In this video, we will cover about Postfix service configuration on Linux server.
    Postfix installation and Mailx
    Editing postfix config to add the google smtp as relayhost
    how to authenticate google smtp credentials
    how to send an email using mail command with attachment
    00:00 Intro
    01:00 Installation of Postfix and Mailx
    02:54 Editing postfix Configuration
    07:50 sasl_passwd file
    09:11 How to Generate Google SMTP Password
    13:52 Sending Email using Mail command
    15:48 Sending Email with Attachment in Linux
    Linux postfix tutorial
    Linux postfix configuration
    Linux postfix with gmail smtp
    smtp.google.com
    How to send email using POSTFIX?
    How to send email in Linux?
    How to send email from Linux server?
    How to send email from Linux server using gmail SMTP?
    Linux Emails

КОМЕНТАРІ • 83

  • @victorified2912
    @victorified2912 Рік тому +1

    Thank you too much sir
    Aapne meri comment Sun li
    Akhir video bana hi diya
    Great help ty🎉

  • @Neel_Vjghfdssdfg
    @Neel_Vjghfdssdfg Рік тому +2

    Thankyou Sir
    Means alot

  • @sumset4u
    @sumset4u 8 місяців тому

    in red hat 9 mailx is no longer used , replacement utility in RHEL 9 is s-nail. could you please give some tips regarding same ?

  • @shashankguia
    @shashankguia Рік тому +1

    Thanks bro it’s really help me a lot

  • @SakshiAbrol-j4o
    @SakshiAbrol-j4o 29 днів тому +1

    thanks alot , i was stuck but bcoz of your video i got the solution

  • @MuhammadImran-yq1qn
    @MuhammadImran-yq1qn Рік тому

    Great tutorial, can we use DMARC and DKIM as well with Postfix?

  • @ConfusedChannel
    @ConfusedChannel 4 дні тому

    Will this work for custom domain in a production network?? We r using Gmail via google workspace ..
    Do i have to add any dns records ?

  • @mktfasshwetasoftware3343
    @mktfasshwetasoftware3343 6 місяців тому +1

    Excellent tutorial . Thank you very much.

    • @MPrashant
      @MPrashant  6 місяців тому

      Glad it was helpful!

  • @MuhammadZahid-px7gs
    @MuhammadZahid-px7gs 11 місяців тому

    when i enter send-mail command it show me the message command not found how can i fix it pls tell me sir

  • @akashshelke5330
    @akashshelke5330 8 місяців тому +1

    I'm using Ubuntu and in my case mail command is not able to send attachments. However, I'm able to send the attachments successfully using mutt command.

  • @piyushpatil6874
    @piyushpatil6874 10 місяців тому +2

    One of the best content in indian linux community ❤

    • @MPrashant
      @MPrashant  10 місяців тому +1

      Thank you for the feedback 😊

  • @swatimeshram4359
    @swatimeshram4359 6 місяців тому

    Hi Sir, I've followed the same procedure still I'm not getting any mails in my mailbox. Coulr you please suggest on it?

  • @ShoaibSayyed
    @ShoaibSayyed 10 місяців тому

    Hi, please let me know how set mail send limit size .

  • @user-bx1wy7io4y
    @user-bx1wy7io4y 9 місяців тому

    Hi Prashant
    ==============HELP HELP HELP==============
    I did everything as mentioned in this video
    But still unable to send email.
    Also not showing any kind of error message.
    I have a questions to ask
    1. I have created fresh ec2 instance and start using the steps as mentioned in this videos. Do I need to have anything else more to configure in this VM.
    2. I used sudo apt install postfix > it shows already install. But when running this command "postfix --version" it doesn't show anything | same with mailx command | ==============What's the issue do you think?

  • @techrohhit
    @techrohhit Рік тому +1

    Can you make a video on dedicated mail server with attach mysqldb like other organisation do.??

  • @MohdMohsin-qm9uh
    @MohdMohsin-qm9uh Рік тому +1

    👌👌👌

  • @MPrashant
    @MPrashant  Місяць тому

    In latest version mailx is relaced by s-nail

  • @abhaykanwasi881
    @abhaykanwasi881 7 місяців тому

    Bro if I don't want to use my personal account because I'm doing this for production level application then how to do it

  • @advaithaithal2537
    @advaithaithal2537 Місяць тому

    Thanks a lot! It really worked. I do have a question apart from this. Can we send the mail from gmail to our server?

  • @MuhammadSaaddev
    @MuhammadSaaddev 2 місяці тому +1

    Excellent work !

    • @MPrashant
      @MPrashant  2 місяці тому

      Thank you! Cheers!

  • @piyushnikhade2034
    @piyushnikhade2034 6 місяців тому

    Hi, I followed all your steps but still did not receive any mail in gmail. Is this due to some other gmail setting ?

  • @VinodYadav-fe6xe
    @VinodYadav-fe6xe 11 місяців тому

    What is UNIVERSAL isa and how it will work in version 26 in perl.. please Bhai ek videos bana do

  • @nikhilkori5702
    @nikhilkori5702 Рік тому +2

    Appreciate your hard work.
    Please create a video on samba server and Mysql server as well with detailed explanation.
    Thank you.

    • @MPrashant
      @MPrashant  Рік тому

      Thank you!
      I will try to upload asap on Samba!
      Uploaded one video on MySQL
      ua-cam.com/video/86gIJPgLJp0/v-deo.html

  • @jamesjayakumar1806
    @jamesjayakumar1806 10 місяців тому +1

    Thanks a lot for the very good explanation. I have understood these kinds of easy steps of postfix configuration.
    ***Can you please explain about NFS mount point share from the Linux server to Windows server any kind of document or video please share.****

    • @MPrashant
      @MPrashant  10 місяців тому

      Thanks for sharing feedback
      For NFS you can try watching this video
      Learn Linux NFS Fast--You WON'T BELIEVE What Happens Next! | MPrashant
      ua-cam.com/video/1TBD9aMQ7Rg/v-deo.html

  • @user-xy6gz3rg9u
    @user-xy6gz3rg9u 3 місяці тому

    Sir unable to receive the attach file instead of file email showing the content of file

  • @ancient7817
    @ancient7817 2 місяці тому

    Hi sir how we can send script output in email in every 1 minutes, plz help

  • @himanshu7271
    @himanshu7271 6 місяців тому

    rpm is not working in debian?
    Any alternative ?

  • @aminhaqparast
    @aminhaqparast 3 місяці тому +1

    nice job man!

  • @siddhartharora707
    @siddhartharora707 Місяць тому

    Subscribed, thanks for all the videos, struggling to find a job , Bus 1 question hai
    attachment time pe "-a" se invalid header error aa raha hai ,
    i googled it and it was "-A" caps mein , I use Ubuntu , may be that why , anyways thanks bro for everything

  • @unknown-kn4uf
    @unknown-kn4uf 6 місяців тому +1

    thanks

  • @satishgaikwad1454
    @satishgaikwad1454 Рік тому +1

    It's very nice

  • @brazo98
    @brazo98 6 місяців тому +1

    Nice Tutorial Dude

  • @deepthakur3382
    @deepthakur3382 5 місяців тому +1

    sir mailx use m nahi ha centOS m

  • @prabhmeetsingh6995
    @prabhmeetsingh6995 4 місяці тому

    how do we attach multiple files 20+

  • @shaikhrahil6880
    @shaikhrahil6880 19 днів тому +1

    Thanks Prashant for making clear and crisp content. Although I am receiving email correctly but whenever I am executing the main command it's show this error "Unknown command: "SUBJECT=". Also I am configuring a disk space alert and I want to mail 8 members in a group how can I achieve that?

  • @krishnasai8471
    @krishnasai8471 Рік тому

    Please make a video on SAR command

  • @akashkhandagale1293
    @akashkhandagale1293 Рік тому +1

    Linux backup DUMP and SCP pe video banav

  • @madhuppandey3151
    @madhuppandey3151 Рік тому

    Error :-
    Open database /etc/postfix/sasl/sasl_password.db: no such file or directory

    • @MPrashant
      @MPrashant  Рік тому +1

      Make sure you have created this file and location
      /etc/postfix/sasl/sasl_password.db
      and also check the permissions for this file or in parent directory

    • @madhuppandey3151
      @madhuppandey3151 Рік тому

      Issue solved

  • @simranbanwait
    @simranbanwait 7 місяців тому

    If we are using this on a ec2 server, do we have to enable port 587 in the outbound rules ?

    • @simranbanwait
      @simranbanwait 7 місяців тому

      Zaroorat nahi padi iski...
      But i'm having another problem,
      Mail to send ho jaa rahi hai,
      But attachment me pdf file ni send hori.

    • @simranbanwait
      @simranbanwait 6 місяців тому

      Ho gaya... 🤡

    • @sushanthreddy1927
      @sushanthreddy1927 5 місяців тому

      How did u do it bro? requested aws to remove restriction?@@simranbanwait

  • @gajendrakadu29
    @gajendrakadu29 Рік тому

    very useful video sir. i tried all step on my VM where i install centos. but i got error in last step ,could you please suggest solution (error:[root@localhost sasl]# systemctl start postfix.service
    -bash: systemctl: command not found
    )

    • @MPrashant
      @MPrashant  Рік тому

      Which Linux distribution are you using?

    • @MPrashant
      @MPrashant  Рік тому

      Looks like ststemctl command is not supported

    • @gajendrakadu29
      @gajendrakadu29 Рік тому

      I have CentOS 6.4 in my VM.

    • @MPrashant
      @MPrashant  Рік тому +1

      @@gajendrakadu29 Can you try this command: service postfix start

  • @luckykumarreal2948
    @luckykumarreal2948 6 місяців тому

    Sir i am using kali linux. I am unable to install Postfix. How i install in kali linux

    • @MPrashant
      @MPrashant  6 місяців тому

      You can try sudo apt install postfix

  • @adinathwaikar7511
    @adinathwaikar7511 7 місяців тому

    Debian 11 pe kuch alag araha hey

  • @viswanathreddy3085
    @viswanathreddy3085 Рік тому

    Thanks for the video !! When i try to generate the sasl_passwd.db file it's getting as below.
    postmap sasl_passwd
    postmap: warning: /etc/postfix/main.cf, line 54: overriding earlier entry: smtp_tls_security_level=may
    postmap: fatal: bad string length 0 < 1: mydomain =

  • @akashpawar3821
    @akashpawar3821 Рік тому +1

    What about rhel flavour

    • @MPrashant
      @MPrashant  Рік тому +1

      It will work on rhel too

    • @anonymoushacks4919
      @anonymoushacks4919 10 місяців тому

      Mailx is not installing in rhel 9 plz help me out

  • @tskishan3000
    @tskishan3000 9 місяців тому

    postmap: warning: /etc/postfix/main.cf, line 58: overriding earlier entry: smtp_tls_security_level=may
    what to now how to solve this error

  • @Adityaraj-vz7qo
    @Adityaraj-vz7qo 2 місяці тому

    make a video for how to create unlimited business email using postfix

  • @RonitKumar-jp1qk
    @RonitKumar-jp1qk Місяць тому

    Last me nhi hua bhai

  • @madhuppandey3151
    @madhuppandey3151 Рік тому

    Error : 587 is unreachable

  • @devashishsingh1
    @devashishsingh1 2 місяці тому +2

    Poor way of teaching, You must get into depth of each setting. Just copy paste and run commands. The way you escaped SASL lines explanation was horrible.

    • @Raj-rj1qp
      @Raj-rj1qp 23 дні тому

      Bro this was just to setup a mail protocol. Not required to know everything here.😊 Even if you want more details on it,you can follow other topic aligned videos .

  • @indrajeetgoyal1711
    @indrajeetgoyal1711 Рік тому +1

    Postgres ka koi video banaiye na

  • @Cypherx444
    @Cypherx444 Рік тому +2

    Thank you God for this channel 🥹🥹🙏🙏🙏

    • @MPrashant
      @MPrashant  Рік тому +1

      Glad to see I can help with this channel!