Mam wykupiony serwer VPS i chciałbym móc wysyłać z niego maile korzystając z już istniejącego konta email na gmail-u.
Kombinuje z Postfixem. W /etc/postfix/main.cf dodałem:
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
utworzyłem plik: /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 username@gmail.com:password
dalej
postmap /etc/postfix/sasl_passwd
i
systemctl reload postfix
i próbuje wysłać testowego maila:
echo "Testowy mail." | mail -s "Testowy email" jakismail@gmail.com
mail niestety nie wysyła się a w logach widzę taki wpis:
Apr 20 08:29:20 vps-xxx postfix/pickup[416890]: 0DF611E1B3: uid=1000 from=<user@vps-xx.vps.ovh.net>
Apr 20 08:29:20 vps-xxx postfix/cleanup[416911]: 0DF611E1B3: message-id=<20240420022110.0DF611E1B3@vps-xx.vps.ovh.net>
Apr 20 08:29:20 vps-xxx postfix/qmgr[416891]: 0DF611E1B3: from=<user@vps-xx.vps.ovh.net>, size=441, nrcpt=1 (queue active)
Apr 20 08:29:20 vps-xxx postfix/error[416915]: 0DF611E1B3: to=<jakismail@gmail.com>, relay=none, delay=0.05, delays=0.03/0.01/0/0.01, dsn=5.0.0, status=bounced ([smtp.gmail.com]:587)
Apr 20 08:29:20 vps-xxx postfix/cleanup[416911]: 334D17E2B4: message-id=<20240420022110.334D17E2B4@vps-xx.vps.ovh.net>
Apr 20 08:29:20 vps-xxx postfix/qmgr[416891]: 334D17E2B4: from=<>, size=2424, nrcpt=1 (queue active)
Apr 20 08:29:20 vps-xxx postfix/bounce[416916]: 0DF611E1B3: sender non-delivery notification: 334D17E2B4
Apr 20 08:29:20 vps-xxx postfix/qmgr[416891]: 0DF611E1B3: removed
Apr 20 08:29:20 vps-xxx postfix/local[416918]: 334D17E2B4: to=<user@vps-xx.vps.ovh.net>, relay=local, delay=0.02, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Apr 20 08:29:20 vps-xxx postfix/qmgr[416891]: 334D17E2B4: removed
Podpowie ktoś co robię źle?