Postfix MTA

Questions answered

Posfix STARTTLS fails

Posfix STARTTLS fails with following log message:
postfix/smtpd: warning: cannot get certificate from file /etc/ssl/server/server.pem
postfix/smtpd: warning: TLS library problem: 14187:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:647:Expecting: CERTIFICATE:
postfix/smtpd: warning: TLS library problem: 14187:error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib:ssl_rsa.c:727:
postfix/smtpd: cannot load RSA certificate and key data

Make sure that the certificate starts with line BEGIN CERTIFICATE and not BEGIN TRUSTED CERTIFICATE. Also, after enabling the option smtpd_tls_received_header=yes one should see in received email:
Received: from [192.168.1.12] (unknown [192.168.1.12])
    (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
    (No client certificate requested)
    by centurion (Postfix) with ESMTPS id 4940260000B9
    for <test@host>; Fri, 22 Aug 2008 01:07:14 +0200 (CEST)

What is the best Postfix+SpamAssasin configuration guide?

What is the difference between spamassasin's spamd and spampd?

How to enable message forwarding (relaying) to smtp.google.com if the message sender is from @gmail.com domain?

What you need is (from here):

/etc/postfix/main.cf

# TLS parameters for postfix outbound connections (enable STARTTLS):
smtp_tls_CAfile=/etc/ssl/certs/ca-certificates.crt
smtp_tls_CApath=/etc/ssl/certs
smtp_use_tls=yes

# AUTH for outbound connections (authenticate postfix to relay server):
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/maps/sasl_passwd
smtp_sasl_security_options = noanonymous

# The rules that define which relay to select based on sender address:
sender_dependent_relayhost_maps = hash:/etc/postfix/maps/sender_relay

/etc/postfix/maps/sender_relay

# A sender-dependent override for the global relayhost parameter setting.
@gmail.com        [smtp.gmail.com]:587

/etc/postfix/maps/sasl_passwd

[smtp.gmail.com]:587    user@gmail.com:password123

For multiple rely hosts check this.

How to dequeue all messages?

postsuper -d ALL will delete all queued mails.

How to attempt to deliver all queued mail?

mailq -q

software/postfix.txt · Last modified: 2011/02/02 00:54 by dmitry
 
 
Recent changes RSS feed Driven by DokuWiki