2

I am using fetchmial. Below is my configuration. I want the retrieved emails to be sent to my gmail address. But I encountered an error below. Could someone help me with this? Thank you in advance.

configuration: poll android.imap.mail.yahoo.com with protocol IMAP user 'xxxx@yahoo.com' password 'passwd' smtpname xxx@gmail.com smtphost smtp.gmail.com

the error: fetchmail: SMTP< 530 5.7.0 Must issue a STARTTLS command first. pe8sm1120100pbc.76 fetchmail: SMTP error: 530 5.7.0 Must issue a STARTTLS command first. pe8sm1120100pbc.76 SMTP server requires STARTTLS, keeping message.

user1500178
  • 21
  • 1
  • 2

2 Answers2

2

Google Mail's SMTP server is requiring you to connect with TLS, but you have configured fetchmail to never use TLS.

Check your fetchmail command line and configuration file for sslproto and make sure it is set to TLS1.

On the command line:

--sslproto TLS1

In the conf file:

sslproto TLS1

See the fetchmail documentation for more on configuring SSL/TLS.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Thank you for your answer. I agree with you. But it still gives me the error after I add sslproto TLS1 in conf file. Do I need a client side certificate? – user1500178 Aug 02 '12 at 20:59
  • The sslproto option is used for fetching mail, it's not used for smtp (sending). So this doesn't work. Actually, fetchmail doesn't seem to support TLS for smtpname, smtphost options :( – REJH Jan 28 '20 at 10:46
0

You must get gmails certs first:

openssl s_client -connect pop.gmail.com:995 -showcerts

The command above will return the certificate from Google's Gmail

You need to copy the certificate part, which is everything between the "BEGIN CERTIFICATE" part and "END CERTIFICATE" part, and save this to a file.

save it to /ssl/certs/.certs

.fetchmailrc

set daemon 90
set syslog
set postmaster serverusername
poll pop.gmail.com with proto POP3 and options no dns 
     user 'xxx@gmail.com' with pass "****"  is 'username' here options ssl sslcertck  sslcertpath '/ssl/certs/.certs' 
     smtphost localhost    
RoboTamer
  • 492
  • 1
  • 4
  • 16