Using Postfix for sending mails only .Messages going to spam

Posted August 4, 2017 6.5k views

i have configured postfix in centos 6.With basic configuration messages are going to spam folder.After using relayhost postfix dont send email.error in maillog is

postfix/postfix-script[19075]: starting the Postfix mail system

Aug 4 15:47:30 tuleap postfix/master[19076]: daemon started – version 2.6.6, configuration /etc/postfix
Aug 4 15:48:09 tuleap postfix/pickup[19078]: E2EE8A0C30: uid=0 from=<root>
Aug 4 15:48:09 tuleap postfix/cleanup[19140]: E2EE8A0C30: message-id=20170804104809.E2EE8A0C30@tuleap.kpezdmc.local
Aug 4 15:48:09 tuleap postfix/qmgr[19079]: E2EE8A0C30: from=root@tuleap.kpezdmc.local, size=468, nrcpt=1 (queue active)
Aug 4 15:48:12 tuleap postfix/smtp[19142]: E2EE8A0C30: to=<>,[]:587, delay=2.1, delays=0.02/0.05/1.9/0.17, dsn=5.5.1, status=bounced (host[] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 o51sm5005784wrc.48 - gsmtp (in reply to MAIL FROM command))
Aug 4 15:48:12 tuleap postfix/cleanup[19140]: 36A1AA0C37: message-id=20170804104812.36A1AA0C37@tuleap.kpezdmc.local
Aug 4 15:48:12 tuleap postfix/bounce[19165]: E2EE8A0C30: sender non-delivery notification: 36A1AA0C37
Aug 4 15:48:12 tuleap postfix/qmgr[19079]: E2EE8A0C30: removed
Aug 4 15:48:12 tuleap postfix/qmgr[19079]: 36A1AA0C37: from=<>, size=2610, nrcpt=1 (queue active)
Aug 4 15:48:13 tuleap postfix/smtp[19166]: 36A1AA0C37: to=root@tuleap.kpezdmc.local,[]:587, delay=1.5, delays=0/0.03/1.3/0.17, dsn=5.5.1, status=bounced (host[] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 p140sm3639451wmb.28 - gsmtp (in reply to MAIL FROM command))
Aug 4 15:48:13 tuleap postfix/qmgr[19079]: 36A1AA0C37: removed

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @postfixuser

Like the error says, Authentication Required, so have you setup a username and password for relaying?
If you’re using G Suite, it’s recommended to use the SMTP Relay:

i am not using gsuite.i have already setup username and password in sasl_passwd file

```  myusername:mypassword
  • @postfixuser

    Did you follow the troubleshooting tips described here?

    And your sasl_passwd should look like this:


    • sorry for the mistype,, my sasl file looks exactly what you mentioned and yes i followed those steps still no luck.I am just confused why emails are sent to spam without realy and with relay messages are not sent i have done alot of researh from past few weeks followed lots of tutorial.Is it something related to my IP ?

      • @postfixuser

        I don’t know, since I’ve never used Gmail SMTP - only G Suite SMTP Relay.
        I’m pretty sure your problem would be solved by tips in the Google article.

        If you setup your Postfix without relay, then it’s sending the message, which means you need to setup the entire mail server, have your own domain and a few things more - otherwise you’ll definitely end up in spam.

        What do you want to send from your server?

        • I followed everything you said .Email wasn’t sent .Error is given below

          Aug 7 11:03:41 tuleap postfix/pickup[16859]: B4B48A0C57: uid=0 from=<root>
          Aug 7 11:03:41 tuleap postfix/cleanup[21443]: B4B48A0C57: message-id=20170807060341.B4B48A0C57@tuleap.kpezdmc.local
          Aug 7 11:03:41 tuleap postfix/qmgr[16860]: B4B48A0C57: from=root@tuleap.kpezdmc.local, size=462, nrcpt=1 (queue active)
          Aug 7 11:03:42 tuleap postfix/smtp[21445]: B4B48A0C57: to=<>,[]:587, delay=1.2, delays=0.02/0/0.85/0.28, dsn=5.7.0, status=bounced (host[] said: 530 5.7.0 Must issue a STARTTLS command first. e9sm11623037wmi.40 - gsmtp (in reply to MAIL FROM command))
          Aug 7 11:03:43 tuleap postfix/cleanup[21443]: 30801A0C58: message-id=20170807060343.30801A0C58@tuleap.kpezdmc.local
          Aug 7 11:03:43 tuleap postfix/qmgr[16860]: 30801A0C58: from=<>, size=2471, nrcpt=1 (queue active)
          Aug 7 11:03:43 tuleap postfix/bounce[21446]: B4B48A0C57: sender non-delivery notification: 30801A0C58
          Aug 7 11:03:43 tuleap postfix/qmgr[16860]: B4B48A0C57: removed
          Aug 7 11:03:43 tuleap postfix/lmtp[21428]: 30801A0C58: to=root@tuleap.kpezdmc.local, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=4.4.1, status=deferred (connect to tuleap.kpezdmc.local[/var/lib/imap/socket/lmtp]: No such file or directory)