On 02.05.18 15:05, Rudolf Sykora wrote:
> Hello misc,
>
> I just wanted to send mail through my gmail account
> using smtpd in the relay mode.
> I am unsuccessful so far, and do not understand what's
> going wrong.
>
> smtpd log of the attempt to send the email follows.
> Can anybody help, please?
>
> Thanks
> Ruda
>
> [snip debug output]
>
>
> my /etc/mail/smtpd.conf:
> ------------------------
> table aliases file:/etc/mail/aliases
> table secrets file:/etc/mail/secrets
>
> listen on lo0
>
> accept for local alias <aliases> deliver to mbox
> accept for any relay \
> via secure+auth://[email protected] \
> auth <secrets> \
> as [email protected]
> -------------------------
>
>
>
> my /etc/mail/secrets
> -----------------------
> A [email protected]:MY_PASSWORD
> -----------------------
Hi Ruda,
According to Google, smtp.gmail.com listens on port 465/tcp and 587/tcp.
If I get it right from your debug output your mail server tries to talk
to smtp.gmail.com on port 25/tcp. But this port is not open on
smtp.gmail.com according to [1]
Either of the following modifications in your config should work:
via smtps+auth://[email protected]:465 \
or
via tls+auth://[email protected]:587 \
Cheers,
Bruno
[1] https://support.google.com/a/answer/176600?hl=en