38 thoughts on “How To Install And Configure Postfix On Ubuntu Linux To Send Email Using Gmail As Mail Relay

  • Hello bro, postfix can only send emails? Is it possible to also receive emails with the DMARC rule?

  • Gracias!! Funcionó 09-07-2021 sólo no olvidemos configurar la cuenta de gmail por que si no bloquea las solicitudes.

  • Indians explain everything with no BS and no annoying background music. Very thorough in the step-by-step. I love it.

  • thanks alott anna!! can u make a course in utube explaining what each step means and why we do it!

  • Thanks it really helped ..I think you missed the step of authentication of gmail for "Less secure app access". After that its working fine..

  • Seeing ' SASL authentication failed; server smtp.gmail.com[173.194.68.109] said: 534-5.7.9 Please log in to your gamil account with your web browser and then open another tab with this url and click Continue. @t to 'bypass' the captcha, which will enable the account access and get everything working.

  • in log it says, …. status=deferred (connect to smtp.gmail.com[2607:f8b0:400e:c08::6c]:587: Network is unreachable)

  • in log it says…., status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.142.108]

  • hi i got the error fatal: valid hostname or network address required in server description: ['smtp.gmail.com']:587 how can i resolve this

    Please reply asap

  • Hi, Could you please help me ??

    I 've done everything you show.

    But when iam trying to send an email from my gmail acc, google blocks the requests.

    Thanks in advance.

  • Hi,

    I followed all the steps. And in the log file I can see that the email is delivered, but why am I not getting the email on gmail account? I'm using office365 to send the email

  • I am getting connection refused

    also I have a question when adding the username and password in /etc/postfix/sasl_passwd
    does it have to be a gmail account or any username and password will work?

  • I checked the mail.log file and it says “SASL authentication failed;cannot authenticate to server smtp.gmail.com[64.233.176.109] : no mechanism available”.
    [2607:………..6c]: 587: network is unreachable.
    Help me out,please.

  • finally something work thanks bro

  • i am getting this error after echo "message body" | mail -s "test subject" demo@gmail.com
    Can't canonicalize "/home/demo/Maildir"
    /home/demo/Maildir/sent: No such file or directory
    Failed to save message in "/home/demo/Maildir/sent" – message not sent
    "/home/demo/dead.letter" 6/124

  • but bro i missed my main() file . how should i manage.

  • Good video with proper commands and configuration files explained.. keep it up ..

  • Thank you for your tutorial. how to send html email format using postfix ?

  • can i use protocol <SSL: 465> insted of <TLS: 587> if yes what is the confg, please ?

    by the way thx you, well done

  • Running newaliases
    newaliases: warning: valid_hostname: misplaced delimiter: sadhna-VPCEH3AEN..name
    newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: sadhna-VPCEH3AEN..name
    dpkg: error processing package postfix (–configure):
    subprocess installed post-installation script returned error exit status 75
    Processing triggers for libc-bin (2.23-0ubuntu3) …
    Processing triggers for systemd (229-4ubuntu10) …
    Processing triggers for ureadahead (0.100.0-19) …
    Processing triggers for ufw (0.35-0ubuntu2) …
    Errors were encountered while processing:
    libroot-proof-dev
    postfix
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    I am getting this error while installing Postfix..Please help.

  • Hi,
    Thank you for your tutorial. After unsuccessfully following multiple blogs, this video finally helped me resolve my issue. You are the best!

  • don't forget to check his link in the description if this isn't working for you

Comments are closed.