Re: Help Getting Postfix relaying via Gmail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 12/27/2012 11:16 AM, Clint Dilks wrote:

> Hi,
> 
> I am trying to get a CentOS 6 system relaying mail via my G-Mail account.
> I followed the instructions found at
> https://www.zulius.com/how-to/set-up-postfix-with-a-remote-smtp-relay-host/but
> there seems to be a problem with authentication.  I have done some
> research but still can't get this working.  Any suggestions ?  It seems the
> user and password are correct.
> 
> Dec 27 23:15:36 hbc postfix/pickup[2588]: 8DEB1410B3: uid=0 from=<root>
> Dec 27 23:15:36 hbc postfix/cleanup[2603]: 8DEB1410B3: message-id=<
> 20121227101536.8DEB1410B3@xxxxxxxxxxxxxxxxxxxx>
> Dec 27 23:15:36 hbc postfix/qmgr[2589]: 8DEB1410B3: from=<
> root@xxxxxxxxxxxxxxxxxxxx>, size=317, nrcpt=1 (queue active)
> Dec 27 23:15:37 hbc postfix/smtp[2605]: connect to
> smtp.gmail.com[2607:f8b0:400e:c00::6d]:587:
> Network is unreachable
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 45
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 220 mx.google.com ESMTP vo8sm17581810pbc.16
> Dec 27 23:15:37 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.109]:587:
> EHLO hbc.hillcrest.org.nz
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 27
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 122
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-mx.google.com at your service, [121.75.4.39]
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-SIZE 35882577
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-8BITMIME
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-STARTTLS
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250 ENHANCEDSTATUSCODES
> Dec 27 23:15:37 hbc postfix/smtp[2605]: server features: 0x101b size
> 35882577
> Dec 27 23:15:37 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.109]:587:
> STARTTLS
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 10
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 30
> Dec 27 23:15:37 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 220 2.0.0 Ready to start TLS
> Dec 27 23:15:37 hbc postfix/smtp[2605]: event_request_timer: reset
> 0x7f79a9113bb0 0x7f79aa8429d0 5
> Dec 27 23:15:37 hbc postfix/smtp[2605]: send attr request = seed
> Dec 27 23:15:37 hbc postfix/smtp[2605]: send attr size = 32
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_fflush_some: fd 9 flush 22
> Dec 27 23:15:37 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 9 got 60
> Dec 27 23:15:37 hbc postfix/smtp[2605]: private/tlsmgr: wanted attribute:
> status
> Dec 27 23:15:37 hbc postfix/smtp[2605]: input attribute name: status
> Dec 27 23:15:37 hbc postfix/smtp[2605]: input attribute value: 0
> Dec 27 23:15:37 hbc postfix/smtp[2605]: private/tlsmgr: wanted attribute:
> seed
> Dec 27 23:15:37 hbc postfix/smtp[2605]: input attribute name: seed
> Dec 27 23:15:37 hbc postfix/smtp[2605]: input attribute value:
> xIHq7bnC7bggzN5/v38KVLhUrfnowW/aYWlTcvBI1LM=
> Dec 27 23:15:37 hbc postfix/smtp[2605]: private/tlsmgr: wanted attribute:
> (list terminator)
> Dec 27 23:15:37 hbc postfix/smtp[2605]: input attribute name: (end)
> Dec 27 23:15:38 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.109]:587:
> EHLO hbc.hillcrest.org.nz
> Dec 27 23:15:38 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 27
> Dec 27 23:15:38 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 145
> Dec 27 23:15:38 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-mx.google.com at your service, [121.75.4.39]
> Dec 27 23:15:38 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-SIZE 35882577
> Dec 27 23:15:38 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-8BITMIME
> Dec 27 23:15:38 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2
> Dec 27 23:15:38 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.109]:587:
> 250 ENHANCEDSTATUSCODES
> Dec 27 23:15:38 hbc postfix/smtp[2605]: server features: 0x102b size
> 35882577
> Dec 27 23:15:38 hbc postfix/smtp[2605]: maps_find: smtp_sasl_passwd:
> smtp.gmail.com: not found
> Dec 27 23:15:38 hbc postfix/smtp[2605]: maps_find: smtp_sasl_passwd:
> hash:/etc/postfix/sasl_passwd(0,lock|fold_fix): smtp.gmail.com:587 =
> clint.dilks@xxxxxxxxx:
> Dec 27 23:15:38 hbc postfix/smtp[2605]: smtp_sasl_passwd_lookup: host `
> smtp.gmail.com' user `<user>@gmail.com' pass `<correct password>'
> Dec 27 23:15:38 hbc postfix/smtp[2605]: starting new SASL client
> Dec 27 23:15:38 hbc postfix/smtp[2605]: name_mask: noanonymous
> Dec 27 23:15:38 hbc postfix/smtp[2605]: smtp_sasl_authenticate:
> smtp.gmail.com[173.194.79.109]:587: SASL mechanisms LOGIN PLAIN XOAUTH
> XOAUTH2
> Dec 27 23:15:38 hbc postfix/smtp[2605]: warning: SASL authentication
> failure: No worthy mechs found
> Dec 27 23:15:38 hbc postfix/smtp[2605]: 8DEB1410B3: SASL authentication
> failed; cannot authenticate to server smtp.gmail.com[173.194.79.109]: no
> mechanism available
> Dec 27 23:15:38 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.109]:587:
> QUIT
> Dec 27 23:15:38 hbc postfix/smtp[2605]: name_mask: resource
> Dec 27 23:15:38 hbc postfix/smtp[2605]: name_mask: software
> Dec 27 23:15:38 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 6
> Dec 27 23:15:38 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 0
> Dec 27 23:15:38 hbc postfix/smtp[2605]: disposing SASL state information
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 45
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 220 mx.google.com ESMTP bi8sm14464509pab.15
> Dec 27 23:15:39 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.108]:587:
> EHLO hbc.hillcrest.org.nz
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 27
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 122
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-mx.google.com at your service, [121.75.4.39]
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-SIZE 35882577
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-8BITMIME
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-STARTTLS
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250 ENHANCEDSTATUSCODES
> Dec 27 23:15:39 hbc postfix/smtp[2605]: server features: 0x101b size
> 35882577
> Dec 27 23:15:39 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.108]:587:
> STARTTLS
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 10
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 30
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 220 2.0.0 Ready to start TLS
> Dec 27 23:15:39 hbc postfix/smtp[2605]: event_request_timer: reset
> 0x7f79a9113bb0 0x7f79aa8429d0 5
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr request = seed
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr size = 32
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_fflush_some: fd 9 flush 22
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 9 got 60
> Dec 27 23:15:39 hbc postfix/smtp[2605]: private/tlsmgr: wanted attribute:
> status
> Dec 27 23:15:39 hbc postfix/smtp[2605]: input attribute name: status
> Dec 27 23:15:39 hbc postfix/smtp[2605]: input attribute value: 0
> Dec 27 23:15:39 hbc postfix/smtp[2605]: private/tlsmgr: wanted attribute:
> seed
> Dec 27 23:15:39 hbc postfix/smtp[2605]: input attribute name: seed
> Dec 27 23:15:39 hbc postfix/smtp[2605]: input attribute value:
> Gvb7N21DayqKfDwTIIHM/2DY92tqdHFajB++bXjpXwE=
> Dec 27 23:15:39 hbc postfix/smtp[2605]: private/tlsmgr: wanted attribute:
> (list terminator)
> Dec 27 23:15:39 hbc postfix/smtp[2605]: input attribute name: (end)
> Dec 27 23:15:39 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.108]:587:
> EHLO hbc.hillcrest.org.nz
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 27
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 15 got 145
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-mx.google.com at your service, [121.75.4.39]
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-SIZE 35882577
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-8BITMIME
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2
> Dec 27 23:15:39 hbc postfix/smtp[2605]: < smtp.gmail.com[173.194.79.108]:587:
> 250 ENHANCEDSTATUSCODES
> Dec 27 23:15:39 hbc postfix/smtp[2605]: server features: 0x102b size
> 35882577
> Dec 27 23:15:39 hbc postfix/smtp[2605]: maps_find: smtp_sasl_passwd:
> smtp.gmail.com: not found
> Dec 27 23:15:39 hbc postfix/smtp[2605]: maps_find: smtp_sasl_passwd:
> hash:/etc/postfix/sasl_passwd(0,lock|fold_fix): smtp.gmail.com:587 = <user>@
> gmail.com:<correct password>
> Dec 27 23:15:39 hbc postfix/smtp[2605]: smtp_sasl_passwd_lookup: host `
> smtp.gmail.com' user `' pass `'
> Dec 27 23:15:39 hbc postfix/smtp[2605]: starting new SASL client
> Dec 27 23:15:39 hbc postfix/smtp[2605]: name_mask: noanonymous
> Dec 27 23:15:39 hbc postfix/smtp[2605]: smtp_sasl_authenticate:
> smtp.gmail.com[173.194.79.108]:587: SASL mechanisms LOGIN PLAIN XOAUTH
> XOAUTH2
> Dec 27 23:15:39 hbc postfix/smtp[2605]: warning: SASL authentication
> failure: No worthy mechs found
> Dec 27 23:15:39 hbc postfix/smtp[2605]: connect to subsystem private/defer
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr nrequest = 0
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr flags = 0
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr queue_id = 8DEB1410B3
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr original_recipient =
> clint.dilks@xxxxxxxxx
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr recipient =
> clint.dilks@xxxxxxxxx
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr offset = 203
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr dsn_orig_rcpt =
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr notify_flags = 0
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr status = 4.7.0
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr diag_type = x-sasl
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr diag_text = no mechanism
> available
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr mta_type =
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr mta_mname =
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr action = delayed
> Dec 27 23:15:39 hbc postfix/smtp[2605]: send attr reason = SASL
> authentication failed; cannot authenticate to server
> smtp.gmail.com[173.194.79.108]:
> no mechanism available
> Dec 27 23:15:39 hbc postfix/smtp[2605]: vstream_fflush_some: fd 16 flush 373
> Dec 27 23:15:40 hbc postfix/smtp[2605]: vstream_buf_get_ready: fd 16 got 10
> Dec 27 23:15:40 hbc postfix/smtp[2605]: private/defer socket: wanted
> attribute: status
> Dec 27 23:15:40 hbc postfix/smtp[2605]: input attribute name: status
> Dec 27 23:15:40 hbc postfix/smtp[2605]: input attribute value: 0
> Dec 27 23:15:40 hbc postfix/smtp[2605]: private/defer socket: wanted
> attribute: (list terminator)
> Dec 27 23:15:40 hbc postfix/smtp[2605]: input attribute name: (end)
> Dec 27 23:15:40 hbc postfix/smtp[2605]: 8DEB1410B3: to=<
> clint.dilks@xxxxxxxxx>, relay=smtp.gmail.com[173.194.79.108]:587, delay=23,
> delays=20/0.04/3.3/0, dsn=4.7.0, status=deferred (SASL authentication
> failed; cannot authenticate to server smtp.gmail.com[173.194.79.108]: no
> mechanism available)
> Dec 27 23:15:40 hbc postfix/smtp[2605]: flush_add: site gmail.com id
> 8DEB1410B3
> Dec 27 23:15:40 hbc postfix/smtp[2605]: match_hostname: gmail.com ~?
> hbc.hillcrest.org.nz
> Dec 27 23:15:40 hbc postfix/smtp[2605]: match_hostname: gmail.com ~?
> localhost.hillcrest.org.nz
> Dec 27 23:15:40 hbc postfix/smtp[2605]: match_hostname: gmail.com ~?
> localhost
> Dec 27 23:15:40 hbc postfix/smtp[2605]: match_list_match: gmail.com: no
> match
> Dec 27 23:15:40 hbc postfix/smtp[2605]: flush_add: site gmail.com id
> 8DEB1410B3 status 4
> Dec 27 23:15:40 hbc postfix/smtp[2605]: > smtp.gmail.com[173.194.79.108]:587:
> QUIT
> Dec 27 23:15:40 hbc postfix/smtp[2605]: name_mask: resource
> Dec 27 23:15:40 hbc postfix/smtp[2605]: name_mask: software
> Dec 27 23:15:40 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 6
> Dec 27 23:15:40 hbc postfix/smtp[2605]: vstream_fflush_some: fd 15 flush 0
> Dec 27 23:15:40 hbc postfix/smtp[2605]: disposing SASL state information
> 
> My Postfix Config is currently
> 
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debug_peer_level = 3
> debug_peer_list = smtp.gmail.com
> html_directory = no
> inet_interfaces = localhost
> inet_protocols = all
> mail_owner = postfix
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> mydestination = $myhostname, localhost.$mydomain, localhost
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
> relayhost = smtp.gmail.com:587
> sample_directory = /usr/share/doc/postfix-2.6.6/samples
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> smtp_sasl_security_options = noanonymous
> smtp_sasl_tls_security_options = noanonymous
> smtp_sasl_type = cyrus
> smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
> smtp_use_tls = yes
> smtpd_sasl_path = smtpd
> unknown_local_recipient_reject_code = 550
> 
> # rpm -qa | grep -i sasl
> cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64
> cyrus-sasl-2.1.23-13.el6_3.1.x86_64
> 
> Any help appreciated :)

Well, this:

'Dec 27 23:15:38 hbc postfix/smtp[2605]: warning: SASL authentication
failure: No worthy mechs found
Dec 27 23:15:38 hbc postfix/smtp[2605]: 8DEB1410B3: SASL authentication
failed; cannot authenticate to server smtp.gmail.com[173.194.79.109]: no
mechanism available'

appears to be your problem. In my experience of Google, they do have
some convoluted ways of authenticating stuff. I'd try, in the first
instance, Googling (no pum intended) the above error message & see what
it throws up.

Sorry I can't be more help.

Cheers,

  Phil...

-- 
currently (ab)using
CentOS 5.8 & 6.3, Debian Squeeze & Wheezy, Fedora Beefy & Spherical,
Lubuntu 12.10, OS X Snow Leopard & Ubuntu Precise & Quantal


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux