I have setup a local mail server using postfix and dovecot. I now want fetchmail to get my mails from another server and deliver them locally. I am getting errors, however, since fetchmail does not use STARTTLS when connecting via SMTP to the local postfix:

reading message 852 of 853 (18519 octets) (log message incomplete)
SMTP< 530 5.7.0 Must issue a STARTTLS command first
SMTP error: 530 5.7.0 Must issue a STARTTLS command first
SMTP server requires STARTTLS, keeping message.

According to this previous question this is because fetchmail does not support STARTTLS when talking to an SMTP server and states that it

is normally not a problem, as it usually delivers emails locally.

I therefore conclude that my configuration is flawed in some way. I want connections to postfix to be secure when a MUA delivers mail but obviously I cannot enforce it if I want to use fetchmail. Is it the way to go to relax the security constraints in postfix's master.cf for SMTP and only enforce STARTTLS for SUBMISSION?

  • Could you instead have fetchmail talk directly to the mail delivery agent and cut Postfix out of the loop? – thrig Mar 28 '17 at 20:53

Had the same problem and found this solution from Mr Postfix himself:

/etc/postfix/master.cf:  inet  n       -       -       -       -       smtpd  inet  n       -       -       -       -       smtpd
            -o smtpd_tls_security_level=may

This, together with smtpd_tls_security_level = encrypt in main.cf (as a global setting) should do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.