LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 07-12-2011, 03:43 PM   #1
audiodef
LQ Newbie
 
Registered: Sep 2008
Posts: 12

Rep: Reputation: 0
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.
 
Old 07-12-2011, 03:46 PM   #2
audiodef
LQ Newbie
 
Registered: Sep 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Note: I used the following guide to set up my mail server: http://whitehathouston.com/documenta...host_howto.htm
 
Old 07-12-2011, 04:09 PM   #3
audiodef
LQ Newbie
 
Registered: Sep 2008
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 07-13-2011, 10:08 AM   #4
audiodef
LQ Newbie
 
Registered: Sep 2008
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
  


Reply

Tags
outgoing, postfix, smtp, thunderbird, timeout


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forward outgoing smtp traffic from linux mail server to window machine using iptables r.bhange Linux - Networking 2 06-04-2009 01:39 AM
kmail - cannot connect to smtp server. emeskay Linux - Software 8 11-10-2004 11:34 PM
How to implement a SMTP server for outgoing mail? Nerox Programming 1 07-02-2004 04:43 AM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 06:17 PM
Can't connect to RedHat 9 SMTP server from XP bper Linux - Networking 1 10-22-2003 10:07 AM


All times are GMT -5. The time now is 10:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration