Is there a good way to figure out which ports I can use? I know I can receive and send mail via GMail. I'm pretty sure I've tried the same port I use for that, but I don't know if I have to change something in the default settings in Postfix or Dovecot to handle that.
Here's the last lines from my mail.log file. I've mangled up the email addresses a bit to fox any spambots (all sent mail is from my site trazoi.com), but it should be pretty clear:
Code:
Apr 27 10:37:11 postfix/master[10547]: reload configuration /etc/postfix
Apr 27 10:37:51 postfix/master[10547]: terminating on signal 15
Apr 27 10:37:51 postfix/master[10708]: daemon started -- version 2.5.5, configuration /etc/postfix
Apr 27 10:42:19 postfix/master[10708]: terminating on signal 15
Apr 27 10:42:20 postfix/master[10859]: daemon started -- version 2.5.5, configuration /etc/postfix
Apr 27 10:53:36 postfix/pickup[10865]: 0DBA9C120: uid=1000 from=<test>
Apr 27 10:53:36 postfix/cleanup[10900]: 0DBA9C120: message-id=<20090427105336.0DBA9C120-at-example.com>
Apr 27 10:53:36 postfix/qmgr[10864]: 0DBA9C120: from=<test-at-example.com>, size=353, nrcpt=1 (queue active)
Apr 27 10:53:36 postfix/smtp[10903]: 0DBA9C120: to=<david-at-gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.221.82]:25, delay=0.51, delays=0.01/0.01/0.12/0.37, dsn=2.0.0, status=sent (250 2.0.0 OK 1240829616 14si5293947qyk.37)
Apr 27 10:53:36 postfix/qmgr[10864]: 0DBA9C120: removed
Apr 27 10:56:44 postfix/master[10859]: terminating on signal 15
Apr 27 10:56:44 postfix/master[10989]: daemon started -- version 2.5.5, configuration /etc/postfix
Apr 27 10:57:29 postfix/master[10989]: terminating on signal 15
Apr 27 10:57:29 postfix/master[11071]: daemon started -- version 2.5.5, configuration /etc/postfix
Apr 27 11:00:38 postfix/master[11071]: terminating on signal 15
Apr 27 11:00:39 postfix/master[11155]: daemon started -- version 2.5.5, configuration /etc/postfix
Apr 27 11:09:02 postfix/master[11155]: terminating on signal 15
Apr 27 11:09:02 postfix/master[11294]: daemon started -- version 2.5.5, configuration /etc/postfix
Apr 27 13:59:01 postfix/master[11294]: terminating on signal 15
Apr 27 13:59:02 postfix/master[11576]: daemon started -- version 2.5.5, configuration /etc/postfix
I think the one email sent was via (the command line) mail in a ssh session. All the demon restarting lines were from me making changes and resetting the email system. There would have been a lot of Thunderbird message attempts in that time, but I don't see them in the logs.
My Postfix main.cf currently looks like this:
Code:
# 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 (Debian/GNU)
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 = trazoi.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost, localhost.localdomain, localhost
relayhost =
# mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# SASL SUPPORT FOR CLIENTS
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
# some settings to make life easier
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_rbl_client bl.spamcop.net,
reject_rbl_client relays.ordb.org,
reject_rbl_client sbl.spamhaus.org,
reject_unauth_destination
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/access, reject_unknown_sender_domain
#getting rid of slow hosts
transport_maps = hash:/etc/postfix/transport
deadbeats_destination_concurrency_limit = 50
The stuff at the end are various commands I've seen on guides that I've meshed together.
I haven't touched the defaults in master.cf save for adding a "deadbeats" line from one set of tips I found.
The dovecot config file is large, and I'm not sure if that's the issue. The main change was the one that's in the tutorial I linked to, which I've typed in verbatim:
Code:
auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
Are there any other files that might help?
Edit: Oh, and if there any other glaring problems with those config files, I'd be grateful if you pointed them out. Understanding how to configure the email system nicely is turning out to be a lot harder than Apache.