LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Unable to connect to outgoing SMTP server (http://www.linuxquestions.org/questions/linux-server-73/unable-to-connect-to-outgoing-smtp-server-891350/)

audiodef 07-12-2011 03:43 PM

Unable to connect to outgoing SMTP server
 
I run my own mail server. There's only one part that isn't working and I can't seem to figure out why: sending mail from a client - in this case, Thunderbird.

I can send mail off-server just fine if I log in via telnet. I can receive email just fine with Thunderbird.

Here are my relevant configs:

/etc/postfix/main.cf:
Code:

queue_directory = /var/spool/postfix
message_size_limit = 102400000
mailbox_size_limit = 1024000000
command_directory = /usr/sbin
daemon_directory = /usr/lib64/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
default_privs = nobody
myhostname = audiodef.com
mydomain = audiodef.com
virtual_mailbox_domains = audiodef.com
myorigin = $myhostname
alias_maps = mysql:/etc/postfix/validate.cf
virtual_mailbox_maps = mysql:/etc/postfix/validate.cf
mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
virtual_transport = lmtp:unix:/var/imap/socket/lmtp
inet_interfaces = all
mydestination = $myhostname, localhost
local_recipient_maps = $alias_maps, $virtual_mailbox_maps
unknown_local_recipient_reject_code = 550
mynetworks = 209.177.157.239, 127.0.0.0/8
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = yes
mail_spool_directory = /var/spool/mail
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 20
debug_peer_level = 2
debugger_command =
        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
        ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/ssl/postfix/server.crt
smtpd_tls_key_file = /etc/ssl/postfix/server.key
#smtpd_tls_CAfile = /etc/ssl/postfix/root.crt
smtpd_tls_ask_ccert = no
smtpd_tls_loglevel = 1
smtpd_recipient_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination
biff = no
empty_address_recipient = MAILER-DAEMON
tls_random_source = dev:/dev/urandom
smtp_tls_note_starttls_offer = yes

/etc/postfix/master.cf:
Code:

smtp      inet  n      -      n      -      -      smtpd
pickup    fifo  n      -      n      60      1      pickup
cleanup  unix  n      -      n      -      0      cleanup
qmgr      fifo  n      -      n      300    1      qmgr
tlsmgr    unix  -      -      n      1000?  1      tlsmgr
rewrite  unix  -      -      n      -      -      trivial-rewrite
bounce    unix  -      -      n      -      0      bounce
defer    unix  -      -      n      -      0      bounce
trace    unix  -      -      n      -      0      bounce
verify    unix  -      -      n      -      1      verify
flush    unix  n      -      n      1000?  0      flush
proxymap  unix  -      -      n      -      -      proxymap
proxywrite unix -      -      n      -      1      proxymap
smtp      unix  -      -      n      -      -      smtp
relay    unix  -      -      n      -      -      smtp
        -o smtp_fallback_relay=
showq    unix  n      -      n      -      -      showq
error    unix  -      -      n      -      -      error
retry    unix  -      -      n      -      -      error
discard  unix  -      -      n      -      -      discard
local    unix  -      n      n      -      -      local
virtual  unix  -      n      n      -      -      virtual
lmtp      unix  -      -      n      -      -      lmtp
anvil    unix  -      -      n      -      1      anvil
scache    unix  -      -      n      -      1      scache

/etc/imapd.conf:
Code:

configdirectory:        /var/imap
partition-default:      /var/spool/imap
sievedir:              /var/imap/sieve
admins: damien@audiodef.com
tls_ca_path:            /etc/ssl/certs
tls_cert_file:          /etc/ssl/cyrus/server.crt
tls_key_file:          /etc/ssl/cyrus/server.key
virtdomains: on
hashimapspool:          yes
allowanonymouslogin:    no
allowplaintext:        yes
allowusermoves:        yes
autocreatequota: 1024000000
createonpost: yes
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql
sasl_sql_engine: mysql
sasl_mech_list: LOGIN PLAIN
sasl_sql_user: maildb
sasl_sql_passwd: (mypass)
sasl_sql_database: maildb
sasl_sql_hostnames: localhost
sasl_sql_select: SELECT plainpass FROM aliases WHERE email = '%u@%r'

/etc/cyrus.conf:
Code:

START {
  # Do not delete this entry!
  recover      cmd="ctl_cyrusdb -r"
}

SERVICES {
  # Add or remove based on preferences.
  imap          cmd="imapd" listen="imap2" prefork=0
  pop3          cmd="pop3d" listen="pop-3" prefork=0

  # Don't forget to generate the needed keys for SSL or TLS
  # (see doc/html/install-configure.html).
  imaps        cmd="imapd -s" listen="imaps" prefork=0
  pop3s                cmd="pop3d -s" listen="pop3s" prefork=0
  lmtpunix      cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
}

EVENTS {
  checkpoint    cmd="ctl_cyrusdb -c" period=30
  delprune      cmd="ctl_deliver -E 3" period=1440
  tlsprune      cmd="tls_prune" period=1440
}

/etc/sasl2/smtpd.conf:
Code:

pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: PLAIN LOGIN
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: maildb
sql_passwd: (mypass)
sql_database: maildb
sql_select: SELECT plainpass FROM aliases WHERE email = '%u@%r'

Thunderbird outgoing mail server:
server name: audiodef.com
port: 25
connection security: starttls
authentication method: normal password
user name: (one of my working email addresses on my server)

I've actually tried various combinations of outgoing mail server settings, none of which worked.

I would greatly appreciate any help. I've been without mail for a few days and I'm now done with setting things up, except for this outgoing mail server problem.

audiodef 07-12-2011 03:46 PM

Note: I used the following guide to set up my mail server: http://whitehathouston.com/documenta...host_howto.htm

audiodef 07-12-2011 04:09 PM

Well, here's another tidbit: After setting up Squirrelmail, I can send mail. Although, Squirrelmail is technically on localhost on my server, even though I'm connecting from another machine. I have a feeling that has something to do with it.

audiodef 07-13-2011 10:08 AM

Normally, I delete threads in which I'm just talking to myself, but since that's not an option here, I wanted to post the solution:

Verizon, the ISP I use, blocks port 25. I simply had to add

submission inet n - n - - smtpd

to Postfix's master.cf to enable use of port 587 with TLS for SMTP.


All times are GMT -5. The time now is 11:36 PM.