Linode Forum
https://forum.linode.com/

Can't connect to postfix server remotely.
https://forum.linode.com/viewtopic.php?f=11&t=1495
Page 1 of 1

Author:  rrijkse [ Sat Feb 26, 2005 4:08 am ]
Post subject:  Can't connect to postfix server remotely.

I set up postfix so that it uses mysql and the server works fine when sending emails to the domain (from a different account) it also works to send emails out to the world, but that only works if I am on my linode sending emails.

I cannot get client to connect to the server from anywhere else. I have it set up so that it uses sasl for authentication, but it doesn't want to let me connect.

If anyone has any suggestions that would be awesome.

- Robbert

Author:  pclissold [ Sat Feb 26, 2005 6:29 am ]
Post subject: 

Turn on verbose logging in postfix (add the argument '-v' [without quotes] to the end of the smtpd entry in master.cf) and do a postfix reload. Postfix should then log the reason for the rejection.

Author:  rrijkse [ Sat Feb 26, 2005 4:20 pm ]
Post subject:  Still doesn't show up...

The connection still doesnt' show up in the log file.

I am using the /var/log/mail.log file and the last line says:

postfix/master[2475]: reload configuration

- Robbert

Author:  pclissold [ Sat Feb 26, 2005 5:26 pm ]
Post subject: 

Post your master.cf and main.cf and we'll see if anything looks amiss.

Author:  rrijkse [ Sat Feb 26, 2005 5:33 pm ]
Post subject:  My config files.

main.cf
---------
see /usr/share/postfix/main.cf.dist for a commented, fuller
# version of this file.

# Do not change these directory settings - they are critical to Postfix
# operation.
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
myhostname = server.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = domain.com
relayhost =
mynetworks = 127.0.0.0/8, intranet.domain.com
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +

transport_maps = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_domains.cf mysql:/etc/postfix/mysql-virtual_mailboxes.cf

virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_relay_domains
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key

master.cf
-----------
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (50)
# ==========================================================================
smtp inet n - - - - smtpd -v
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 nqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
flush unix n - - 1000? 0 flush
smtp unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# The Cyrus deliver program has changed incompatibly.
#
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}

# only used by postfix-tls
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587 inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

Just as extra info, I used the tutorial at http://www.workaround.org/articles/ispmail/ to set this stuff up.

Author:  rrijkse [ Sat Feb 26, 2005 8:01 pm ]
Post subject:  Found out a few more things.

i found out that i had two lines commented at the bottom of my master.cf file, when I uncommented those it allowed me to connect remotely on port 587, which worked, except for the authentication.
It didn't fix anything else on the 25 port smtp server, but maybe this will help solve that problem.

- Robbert

Author:  rrijkse [ Sun Feb 27, 2005 3:44 am ]
Post subject:  I can connect....

I can now connect to the smtp server, however the problem now is that it keeps rejecting my password. I am using mysql and it goes through pam, in the auth.log file it is still looking for the /etc/sasldb file.

- Robbert

Author:  rrijkse [ Sun Feb 27, 2005 3:46 am ]
Post subject: 

Well i got everything working.

The ONE thing that didnt' work was that pam didn't wanna use mysql as the authentication method. The solution to this is that you have to make sure that you make the /etc/pam.d/smtp and /var/spool/postfix/etc/pam.d/smtp are both world readable.

- Robbert

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/