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 10-16-2010, 01:58 AM   #1
felixtheratruns
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 0
Postfix with smarthost/relayhost on Ubuntu server 10.04


So I have been following this guide (I went through it twice actually):
https://help.ubuntu.com/community/Postfix

Since bellsouth blocks port 25 (except to their smarthost) I set up postfix with the option "internet site with smarthost" (not sure if that was exact wording). The final goal of this is to set up a couple mailing lists.

When I try to test it I get:

Code:
joel@themis:~$ telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 themis.ttd.doesntexist.com ESMTP Postfix (Ubuntu)
And it says I should get
"250-STARTTLS
250-AUTH"
somewhere in there

here is /etc/postfix/main.cf
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 (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

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.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 = themis.ttd.doesntexist.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = themis.ttd.doesntexist.com, ttd.doesntexist.com, themis.launchmodem.com, localhost.launchmodem.com, localhost
relayhost = mail.bellsouth.net:25
mynetworks = 127.0.0.0/8
mailbox_size_limit = 10737418240
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
mailbox_command =
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
here is debugging:
Code:
joel@themis:~$ sudo bash -x /etc/init.d/postfix restart
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ DAEMON=/usr/sbin/postfix
+ NAME=Postfix
+ TZ=
+ unset TZ
+ SYNC_CHROOT=y
+ test -f /etc/default/postfix
+ test -x /usr/sbin/postfix
+ test -f /etc/postfix/main.cf
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ . /etc/lsb-base-logging.sh
+ case "$1" in
+ /etc/init.d/postfix stop
 * Stopping Postfix Mail Transport Agent postfix                         [ OK ] 
+ /etc/init.d/postfix start
 * Starting Postfix Mail Transport Agent postfix                         [ OK ] 
+ exit 0
Code:
joel@themis:~$ sudo bash -x /etc/init.d/saslauthd restart
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ DAEMON=/usr/sbin/saslauthd
++ find /etc/default -regex '/etc/default/saslauthd[_a-zA-Z0-9\-]*$' -print
++ sort
+ DEFAULT_FILES=/etc/default/saslauthd
+ '[' -x /usr/sbin/saslauthd ']'
+ . /lib/init/vars.sh
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
+++ TMPTIME=0
+++ SULOGIN=no
+++ DELAYLOGIN=no
+++ UTC=yes
+++ VERBOSE=no
+++ FSCKFIX=no
++ '[' -r /proc/cmdline ']'
++ grep -qw noswap /proc/cmdline
++ NOSWAP=no
++ '[' '!' -e /proc/cmdline ']'
++ egrep -qw quiet /proc/cmdline
++ VERBOSE=no
++ '[' '' ']'
++ true
+ . /lib/lsb/init-functions
++ FANCYTTY=
++ '[' -e /etc/lsb-base-logging.sh ']'
++ . /etc/lsb-base-logging.sh
+ case "$1" in
+ do_stopall
+ for instance in '$DEFAULT_FILES'
+ stop_instance /etc/default/saslauthd
+ . /etc/default/saslauthd
++ START=yes
++ DESC='SASL Authentication Daemon'
++ NAME=saslauthd
++ PWDIR=/var/spool/postfix/var/run/saslauthd
++ PARAMS='-m /var/spool/postfix/var/run/saslauthd'
++ PIDFILE=/var/spool/postfix/var/run/saslauthd/saslauthd.pid
++ MECHANISMS=pam
++ MECH_OPTIONS=
++ THREADS=5
++ OPTIONS='-c -m /var/spool/postfix/var/run/saslauthd'
+ '[' -z saslauthd ']'
++ echo '-c -m /var/spool/postfix/var/run/saslauthd'
++ xargs -n 1 echo
++ sed -n '/^-m$/{n;p}'
+ RUN_DIR=/var/spool/postfix/var/run/saslauthd
+ '[' -z /var/spool/postfix/var/run/saslauthd ']'
+ PIDFILE=/var/spool/postfix/var/run/saslauthd/saslauthd.pid
+ log_daemon_msg 'Stopping SASL Authentication Daemon' saslauthd
+ '[' -z 'Stopping SASL Authentication Daemon' ']'
+ log_use_usplash
+ '[' n = y ']'
+ type usplash_write
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' -t 1 ']'
+ '[' xxterm '!=' x ']'
+ '[' xxterm '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ '[' -z ']'
+ FANCYTTY=1
+ case "$FANCYTTY" in
+ true
+ /usr/bin/tput xenl
++ /usr/bin/tput cols
+ COLS=90
+ '[' 90 ']'
+ '[' 90 -gt 6 ']'
++ /usr/bin/expr 90 - 7
+ COL=83
+ printf ' * Stopping SASL Authentication Daemon saslauthd       '
 * Stopping SASL Authentication Daemon saslauthd       ++ /usr/bin/expr 90 - 1
+ /usr/bin/tput hpa 89
                                                                                         + printf ' '
 + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --exec /usr/sbin/saslauthd
+ '[' 0 -eq 2 ']'
+ '[' 0 -eq 1 ']'
+ rm -f /var/spool/postfix/var/run/saslauthd/saslauthd.pid
+ log_end_msg 0
+ '[' -z 0 ']'
+ log_use_usplash
+ '[' n = y ']'
+ type usplash_write
+ '[' 83 ']'
+ '[' -x /usr/bin/tput ']'
+ printf '\r'
+ /usr/bin/tput hpa 83
                                                                                   + '[' 0 -eq 0 ']'
+ echo '[ OK ]'
[ OK ]
+ return 0
+ return
+ do_startall
+ for instance in '$DEFAULT_FILES'
+ start_instance /etc/default/saslauthd
+ . /etc/default/saslauthd
++ START=yes
++ DESC='SASL Authentication Daemon'
++ NAME=saslauthd
++ PWDIR=/var/spool/postfix/var/run/saslauthd
++ PARAMS='-m /var/spool/postfix/var/run/saslauthd'
++ PIDFILE=/var/spool/postfix/var/run/saslauthd/saslauthd.pid
++ MECHANISMS=pam
++ MECH_OPTIONS=
++ THREADS=5
++ OPTIONS='-c -m /var/spool/postfix/var/run/saslauthd'
+ '[' yes '!=' yes ']'
+ '[' -z saslauthd ']'
+ log_daemon_msg 'Starting SASL Authentication Daemon' saslauthd
+ '[' -z 'Starting SASL Authentication Daemon' ']'
+ log_use_usplash
+ '[' n = y ']'
+ type usplash_write
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' -t 1 ']'
+ '[' xxterm '!=' x ']'
+ '[' xxterm '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ '[' -z 1 ']'
+ true
+ case "$FANCYTTY" in
+ true
+ /usr/bin/tput xenl
++ /usr/bin/tput cols
+ COLS=90
+ '[' 90 ']'
+ '[' 90 -gt 6 ']'
++ /usr/bin/expr 90 - 7
+ COL=83
+ printf ' * Starting SASL Authentication Daemon saslauthd       '
 * Starting SASL Authentication Daemon saslauthd       ++ /usr/bin/expr 90 - 1
+ /usr/bin/tput hpa 89
                                                                                         + printf ' '
 ++ echo '-c -m /var/spool/postfix/var/run/saslauthd'
++ xargs -n 1 echo
++ sed -n '/^-m$/{n;p}'
+ RUN_DIR=/var/spool/postfix/var/run/saslauthd
+ '[' -z /var/spool/postfix/var/run/saslauthd ']'
+ PIDFILE=/var/spool/postfix/var/run/saslauthd/saslauthd.pid
+ '[' -z pam ']'
+ '[' -n '' ']'
+ '[' -n 5 ']'
+ THREAD_OPTIONS='-n 5'
+ DAEMON_ARGS='-a pam  -c -m /var/spool/postfix/var/run/saslauthd -n 5'
+ dpkg-statoverride --list /var/spool/postfix/var/run/saslauthd
++ dpkg-statoverride --list /var/spool/postfix/var/run/saslauthd
+ createdir root sasl 755 /var/spool/postfix/var/run/saslauthd
+ install -d --group=sasl --mode=755 --owner=root /var/spool/postfix/var/run/saslauthd
+ start-stop-daemon --start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --name saslauthd --exec /usr/sbin/saslauthd --test
+ '[' 0 '!=' 0 ']'
+ start-stop-daemon --start --quiet --pidfile /var/spool/postfix/var/run/saslauthd/saslauthd.pid --name saslauthd --exec /usr/sbin/saslauthd -- -a pam -c -m /var/spool/postfix/var/run/saslauthd -n 5
+ '[' 0 -ne 0 ']'
+ log_end_msg 0
+ '[' -z 0 ']'
+ log_use_usplash
+ '[' n = y ']'
+ type usplash_write
+ '[' 83 ']'
+ '[' -x /usr/bin/tput ']'
+ printf '\r'
+ /usr/bin/tput hpa 83
                                                                                   + '[' 0 -eq 0 ']'
+ echo '[ OK ]'
[ OK ]
+ return 0
+ return 0
+ :
I am very new to postfix and so apologies if there is something simple wrong, I really am not sure where to start looking. Thanks in advance.
 
Old 10-16-2010, 03:32 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Hi,

After the initial greeting "220 themis.ttd.doesntexist.com ESMTP Postfix (Ubuntu)" you should use:
Code:
ehlo somedomain.com
to see your mail server capabilities.

Regards
 
Old 10-16-2010, 09:17 AM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
You will want to look for some smtp telnet procedures; the ehlo being the first step.

Here is a link to some suggestions.
 
Old 10-20-2010, 08:51 PM   #4
felixtheratruns
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Yes I am a moron, even though I went through all the steps of the tutorial twice, I missed the following instruction in the tutorial both times and so was under the impression that 250-STARTTLS
250-AUTH would appear right after I typed "telnet localhost 25". That is what all this confusion is about:

"After you have established the connection to your postfix mail server type

ehlo localhost"

Now that I type that it appears to have the correct response:

"joel@themis:~$ telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 themis.ttd.doesntexist.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-themis.ttd.doesntexist.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
"

Last edited by felixtheratruns; 10-20-2010 at 08:52 PM. Reason: typo
 
Old 11-26-2010, 08:03 PM   #5
felixtheratruns
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Don't have time to mess with this anymore, so unfortunately the real questions that I had will have to wait.
 
  


Reply

Tags
postfix, smarthost


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
postfix relayhost configuration (SMTPS) rutgerw Linux - Server 3 02-19-2011 03:02 AM
[SOLVED] Postfix relayhost not working, if domain hosted on same server, but MX points outside katru Linux - Server 2 06-23-2010 07:25 PM
postfix - relayhost configuration problem kalinic Ubuntu 20 03-02-2009 04:36 AM
Postfix relayhost or direct deliver john.dixon Linux - Server 2 10-30-2008 09:44 AM
postfix relayhost gabsik Linux - Networking 1 02-08-2007 03:51 AM


All times are GMT -5. The time now is 10:19 AM.

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