Postfix as a client with SMTP AUTH

Charles Curley charlescurley at charlescurley.com
Wed Sep 3 18:25:12 MDT 2008


How can I use Postfix to send mail from my laptop (say) to my ISP,
using SMTP AUTH? I have Postfix (postfix-2.5.1-2ubuntu1.1--i386)
running on the laptop (Ubuntu 8.04, Hungry Hippo) for local delivery.

For one thing, what packages in addition to postfix itself do I need?

main.cf:
--------------------------------------------------
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# 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
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

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = dragon
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = dragon.localdomain, dragon, localhost.localdomain, localhost
relayhost = F.Q.D.N:P
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
default_transport = error
relay_transport = error

# how long to keep message on queue before return as failed.  some
# have 3 days, I have 16 days as I am backup server for some people
# whom go on holiday with their server switched off.

maximal_queue_lifetime = 16d

# max and min time in seconds between retries if connection failed

minimal_backoff_time = 1000s
maximal_backoff_time = 8000s 

smtp_generic_maps = hash:/etc/postfix/generic

# SASL SUPPORT FOR SERVERS
#
# The following options set parameters needed by Postfix to enable
# Cyrus-SASL support for authentication of mail servers.
#
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
--------------------------------------------------

sasl_passwd should be correct, as it is taken from a sendmail setup
that works.

I get really lucid error emails, like the following:

--------------------------------------------------
                   The mail system

<charlescurley at charlescurley.com>: F.Q.D.N:P

[-- Attachment #2: Delivery report --]
[-- Type: message/delivery-status, Encoding: 7bit, Size: 0.3K --]

Reporting-MTA: dns; dragon
X-Postfix-Queue-ID: 76BA5EC402
X-Postfix-Sender: rfc822; ccurley at dragon.localdomain
Arrival-Date: Tue,  2 Sep 2008 21:48:05 -0600 (MDT)

Final-Recipient: rfc822; charlescurley at charlescurley.com
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; F.Q.D.N:P

[-- Attachment #3: Undelivered Message --]
[-- Type: message/rfc822, Encoding: 7bit, Size: 0.3K --]
--------------------------------------------------

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://plug.org/pipermail/plug/attachments/20080903/f9c65157/attachment.bin 


More information about the PLUG mailing list