All pastes #1225021 Raw Edit

Untitled

public text v1 · immutable
#1225021 ·published 2008-10-10 23:33 UTC
rendered paste body
I made the server certificates from instructions at http://postfix.state-of-mind.de/patrick.koetter/smtpauth/postfix_tls_support.html
and  I got some inspirations from http://souptonuts.sourceforge.net/postfix_tutorial.html

Oct 11 00:15:17 david-laptop postfix/smtpd[8395]: idle timeout -- exiting
Oct 11 00:17:24 david-laptop postfix/pickup[8393]: 3AEB424675D: uid=1000 from=<david>
Oct 11 00:17:24 david-laptop postfix/cleanup[8421]: 3AEB424675D: message-id=<20081010231724.3AEB424675D@david-laptop.davidroderick.co.uk>
Oct 11 00:17:24 david-laptop postfix/qmgr[8392]: 3AEB424675D: from=<david@david-laptop.davidroderick.co.uk>, size=411, nrcpt=1 (queue active)
Oct 11 00:17:27 david-laptop postfix/smtp[8423]: certificate verification failed for smtp.gmail.com[209.85.135.109]:587: untrusted issuer /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com
Oct 11 00:17:28 david-laptop postfix/smtp[8423]: 3AEB424675D: to=<angel_ov_north@yahoo.com>, relay=smtp.gmail.com[209.85.135.109]:587, delay=4.7, delays=0.03/0.15/4/0.54, dsn=5.5.1, status=bounced (host smtp.gmail.com[209.85.135.109] said: 530-5.5.1 Authentication Required. Learn more at                     530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 y6sm9694020mug.7 (in reply to MAIL FROM command))
Oct 11 00:17:29 david-laptop postfix/cleanup[8421]: 6E4C824675E: message-id=<20081010231729.6E4C824675E@david-laptop.davidroderick.co.uk>
Oct 11 00:17:29 david-laptop postfix/bounce[8427]: 3AEB424675D: sender non-delivery notification: 6E4C824675E
Oct 11 00:17:29 david-laptop postfix/qmgr[8392]: 6E4C824675E: from=<>, size=2684, nrcpt=1 (queue active)
Oct 11 00:17:29 david-laptop postfix/qmgr[8392]: 3AEB424675D: removed
Oct 11 00:17:29 david-laptop postfix/local[8428]: 6E4C824675E: to=<david@david-laptop.davidroderick.co.uk>, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 11 00:17:29 david-laptop postfix/qmgr[8392]: 6E4C824675E: removed
david@david-laptop:/etc/postfix:565$ 

david@david-laptop:/etc/postfix:565$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 david-laptop.davidroderick.co.uk ESMTP Postfix (Ubuntu)
EHLO u
250-david-laptop.davidroderick.co.uk
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
STARTTLS
502 5.5.1 Error: command not implemented


###############
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
mydomain = davidroderick.co.uk
myhostname = david-laptop.davidroderick.co.uk
mynetworks = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

inet_interfaces = localhost
mynetworks_style = locallost
mynetworks_style = subnet
relayhost = [smtp.gmail.com]:587

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

smtp_use_tls = yes
#smtpd_tls_auth_only = yes
smtpd_tls_CApath = /etc/postfix/certs

 smtpd_tls_key_file = /etc/postfix/newreq.pem
 smtpd_tls_cert_file = /etc/postfix/newcert.pem
 smtpd_tls_CAfile = /etc/postfix/cacert.pem
 smtpd_tls_loglevel = 3
 smtpd_tls_received_header = yes
 smtpd_tls_session_cache_timeout = 3600s
 tls_random_source = dev:/dev/urandom

############
##   Add these lines to the bottom on main.cf
    ##
    ##


    ## TLS Settings
    #
    # For no logs set = 0
#    smtp_tls_loglevel = 1
    # 
    # smtp_enforce_tls = yes
    # Above is commented because doing it site by site below
    smtp_tls_per_site = hash:/etc/postfix/tls_per_site
    #
    smtp_tls_CAfile = /etc/postfix/cacert.pem
    smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
    smtp_tls_key_file = /etc/postfix/FOO-key.pem
    smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
    smtp_use_tls = yes
    smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
    smtpd_use_tls = yes

    ##  SASL Settings
#     # This is going in to THIS server
#     smtpd_sasl_auth_enable = no
#     # We need this
#     smtp_sasl_auth_enable = yes
#     smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
#     smtpd_sasl_local_domain = $myhostname
#     smtp_sasl_security_options = noanonymous
#     #smtp_sasl_security_options =
#     smtp_sasl_tls_security_options = noanonymous
#     smtpd_sasl_application_name = smtpd


    ## Gmail Relay
#    relayhost = [smtp.gmail.com]
 
    ## Good for Testing
    # sender_bcc_maps = hash:/etc/postfix/bcc_table

    # Disable DNS Lookups
    disable_dns_lookups = yes
    #
    # Great New feature Address Mapping 
    #  for example may mchirico@localhost to mchirico@gmail.com
    smtp_generic_maps = hash:/etc/postfix/generic
    #
    # 
    transport_maps = hash:/etc/postfix/transport